Skip to content

feat(paper2any): add MCP sidecar integration#92

Open
ZimoLiao wants to merge 1 commit intomainfrom
work/paper2any-mcp-lite
Open

feat(paper2any): add MCP sidecar integration#92
ZimoLiao wants to merge 1 commit intomainfrom
work/paper2any-mcp-lite

Conversation

@ZimoLiao
Copy link
Copy Markdown
Owner

@ZimoLiao ZimoLiao commented May 1, 2026

Summary

  • Replaces the older Paper2Any handoff-bundle approach from Add Paper2Any handoff bundles #91 with a clean optional MCP sidecar integration.
  • Adds scholaraio paper2any setup, mcp-serve, backend-serve, status, tools, and call so agents can configure and run real Paper2Any without vendoring upstream code into ScholarAIO.
  • Keeps OpenDCAI/Paper2Any under data/runtime/extensions/paper2any/Paper2Any, adds the Paper2Any skill/docs/config surface, and covers all known upstream CLI/API workflow families.

Test Plan

  • python -m ruff check scholaraio tests
  • python -m ruff format --check scholaraio tests
  • python -m pytest -q -p no:cacheprovider
  • python -m mkdocs build --strict
  • Real smoke: started scholaraio paper2any backend-serve against the real Paper2Any checkout and verified /health returned {"status":"ok"}.
  • Real service matrix was exercised through the ScholarAIO Paper2Any MCP sidecar: pdf2ppt and image2ppt produced real PPTX artifacts; key-gated workflows failed at upstream credential/system-dependency boundaries rather than fake outputs.

Notes

This PR intentionally keeps the ScholarAIO code lightweight. Multipart/file-upload Paper2Any API routes are not rewrapped in ScholarAIO; file-based workflows should use paper2any_run_cli, while JSON backend routes can use paper2any_call_api.

Closes #64

This was referenced May 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36576ad38e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +352 to +356
input_path = str(arguments.get("input") or "").strip()
output_dir = str(arguments.get("output_dir") or "").strip()
if not input_path or not output_dir:
return _tool_result("paper2any_run_cli requires input and output_dir", arguments, is_error=True)
requested_output_dir = Path(output_dir).expanduser().resolve()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve input path before running Paper2Any CLI workflow

paper2any_run_cli keeps input as a raw string while resolving output_dir, then runs the script with cwd=root. When callers pass a relative input path (as shown in the new docs examples), that path is interpreted relative to the Paper2Any checkout instead of the caller’s working directory, so valid files like workspace/.../paper.pdf fail with file-not-found unless the user supplies an absolute path. Normalize input to an absolute path (or otherwise preserve caller-relative semantics) before building the subprocess command.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Paper2Any

1 participant