Can’t Reproduce Research? Paper2Agent Turns Papers into AI Agents

Computational papers often share code that readers must clone, install, configure and debug before they can use the methods. This friction keeps valuable techniques locked inside PDFs and limits reproducibility. Paper2Agent solves this by turning a paper and its repository into a ready‑to‑use Model Context Protocol (MCP) server. Any MCP‑compatible agent—such as Claude Code or Codex—can then invoke the paper’s functions through natural language, effectively giving readers a virtual corresponding author.

The pipeline works in six strict steps: locate and download the codebase, build an isolated virtual environment, index tutorials, run those tutorials to capture reference outputs, extract parameterized MCP tools from the tutorials and validate them, and finally assemble the validated tools into a single MCP server. Validation requires that expected files appear, numeric results match within 3 %, and perceptual hashes of figures differ by fewer than 20 bits; tools get up to six attempts before being excluded.

Each server exposes three components: MCP tools that wrap the paper’s methods as executable functions, MCP resources that hold the manuscript, code links, datasets and figures, and MCP prompts that encode multi‑step workflows derived from the paper. Prebuilt servers for AlphaGenome, Scanpy and TISSUE are available on Hugging Face Spaces, and a hosted version runs at paper2agent.ai. The code is MIT‑licensed and installs as a skill for Claude Code or Codex.

Benchmarks show Paper2Agent outperforms baseline approaches. On tutorial‑derived queries it achieved 98.7 % accuracy versus 82.7 % for Claude + Repo and 37.3 % for Biomni, with median runtimes 1.9× and 3.1× faster, respectively. On novel queries it reached 100 % accuracy. Across 74 agentified bioRxiv papers, 593 of 599 proposed tools passed validation. Cost per query is about US $0.20 and 1.6 minutes, compared with US $0.38 and 4.3 minutes for the baseline. The system also rejects out‑of‑scope queries and recovers from common failures such as missing dependencies or typos.

By converting papers into interactive MCP servers, Paper2Agent removes the setup barrier, accelerates reuse, and makes computational methods instantly accessible to anyone with an MCP‑compatible agent. #AI #MachineLearning #Research #OpenSource #MCP #Productivity