paper2mcp

Convert Python, R, or command-line research repositories into tested MCP tools through useful tool selection, minimal wrappers around existing code, parallel specialists, and independent verification.

SKILL.md

GitHub

Paper2MCP

Academic Harness on DSH

  • Launch specialists with subagent. Each call returns { kind: "activation", subagentId } immediately; record the id as schema-1 agent_id, wait for every child's completion notice, and read its assigned report before the next verify_workflow.py gate.
  • Verifiers and the delivery verifier: new subagent spawns, distinct from every implementer. Never subagent_fork.
  • Heavy scientific implement/verify: subagent_pro. It inherits the session model when no custom endpoint/model/key route is configured, so route difficulty-bound work there regardless.
  • Isolated env: uv venv "$PROJECT_ENV" --python … then uv pip install --python "$PROJECT_PYTHON". FastMCP baseline is in runtime.md.
  • requires_gpu: runpod_run / modal_run. Do not silently substitute CPU.
  • Client registration is paper_mcp register on this host, and only when requested. Do not run claude mcp add.
  • After a successful ZIP, write <cwd>/.dsh/paper-mcps.json from USAGE.md (see output delivery). Env names only.

Build a tested MCP server from a research repository. Select useful operations, bind each to an existing implementation, and expose it through a minimal wrapper. Scientific computation stays in the repository's code; the skill coordinates selection, execution, implementation, and verification.

Start here

  1. Obtain the repository URL or local checkout, output project directory, and any requested tasks, source/tutorial filter, or resource limits. Ask only for missing required inputs.
  2. Read orchestration for workspace setup, agent assignments, handoffs, and resume behavior.
  3. Read language and hardware routing. Choose Python, R, or CLI by the interface being converted. Use the Python stages below or the R / CLI route.
  4. Apply tool selection and minimal wrappers during scanning, implementation, and independent verification. Read runtime requirements when preparing environments and validating the server. Load only the current stage and relevant role instructions.

Workflow

Stage Coordinator Python specialists Completion marker
1. Environment and tool selection Setup and selection Environment manager and scanner, concurrently environment_and_selection_done
2. Source execution and reference results Execution Parallel executors reference_execution_done
3. Implementation, then independent verification Implementation and testing Parallel implementers, then fresh verifiers implementation_and_verification_done
4. MCP integration Integration Coordinator mcp_integration_done
5. Runtime installation validation Requirements Coordinator runtime_validation_done
6. Documentation and ZIP delivery Documentation and output delivery Coordinator and independent delivery verifier delivery_done

R and CLI have their own environment and transport instructions. They share selection, source reuse, agent independence, and completion requirements.

Essential requirements

  • Choose tools by independently useful tasks on new inputs. Check public interfaces and official examples/tests for gaps in tutorials. Merge duplicates and keep incidental steps internal; headings do not determine tool boundaries.
  • Bind every tool to concrete source code. Prefer direct API/script/CLI calls; extract existing tutorial code only when no callable implementation exists. Do not invent scientific algorithms to fill repository gaps.
  • Run the bound upstream code with traceable inputs before implementation. Preserve native results, relevant figures, metadata, and reproducibility settings for comparison.
  • Keep generated code focused on necessary input checks, upstream calls, and useful output serialization. Expose needed source-supported parameters and test them. Keep benchmark recomputation out of production wrappers.
  • Finish all implementation assignments before launching verifiers. Every verifier must be a fresh agent distinct from every implementer. Verification checks source reuse, code quality, reference agreement, changed inputs, and relevant failures.
  • Record blocked, merged, deferred, and excluded work with reasons. Never weaken scientific assertions or silently drop a requested tool to report success.

Helpers and completion

Write stage success markers only after their evidence and workflow gate pass. Worker completion alone does not establish success. Final delivery requires runtime validation, recipient-facing USAGE.md, and a ZIP that passes installation and real calls after extraction at a new location. Follow the output contract; keep examples and intermediate artifacts outside the default ZIP.

Lead the final response with dist/<repo-name>-mcp.zip, then the delivered tools, installation/startup directions or usage link, actual validation scope, and external requirements. Keep detailed selection and validation evidence in the working project. State important deferred/excluded work and limits; selected-tool verification does not establish whole-repository correctness. Client registration is performed only when requested.

Read optional extensions only for requested resources/prompts, user-query evaluations, containers, or remote deployment.