Computational papers ship code that readers must clone, install, configure and debug. That cost keeps useful methods locked inside PDFs. A Stanford team led by Jiacheng Miao and James Zou proposes a fix. Paper2Agent was published in Nature on 16 September 2026. It converts a paper and its codebase into a Model Context Protocol (MCP) server. Any MCP-compatible agent, such as Claude Code, can then run the paper’s methods through natural language. The authors describe the result as a virtual corresponding author.
Is it deployable? Yes. The code is MIT-licensed and installs as a skill for Claude Code or Codex. Prebuilt AlphaGenome, Scanpy and TISSUE servers run on Hugging Face Spaces. A hosted version is also available at paper2agent.ai.
How the Pipeline Works
Paper2Agent runs on Claude Code’s agent SDK. A central orchestrator dispatches specialized sub-agents through 6 steps:
- Locate and download the codebase.
- An environment manager builds an isolated virtual environment.
- A tutorial scanner indexes usable tutorials.
- A tutorial executor runs them end to end and records reference outputs.
- A tool extractor turns tutorials into parameterized MCP tools, and a test verifier validates them.
- The orchestrator assembles validated tools into 1 MCP server.
The validation gate is strict. A tool passes only when expected files appear and numbers match within 3%. Figures must also match references by perceptual hash, with Hamming distance under 20. The verifier gets up to 6 attempts per function. Tools that keep failing are excluded from the final server.
Each server exposes 3 components. MCP tools wrap the paper’s methods as executable functions: MCP resources hold the manuscript, code links, datasets and figures. MCP prompts encode multi-step workflows, such as the correct Scanpy preprocessing order. The research team used Claude Sonnet 4 for all Paper2Agent applications.