i
DATAIST
Review · 2025-09-10

Paper2Agent turns a paper's code into an agent you can query

Paper2Agent turns a paper's code into an agent you can query

A paper is text, figures, and, somewhere in a repository, code. Then the grind starts: tracking down dependencies, setting up an environment, working out the API and the data formats. For a lot of people that is a high barrier to entry. Paper2Agent proposes something simpler: turn papers into AI agents you can address in natural language and run their methods on the spot. What used to be a passive PDF becomes a working tool — which sounds like magic.

How it works

The foundation is MCP (Model Context Protocol), the shared language through which large language models reach tools and data. Paper2Agent works in two layers. First, Paper2MCP automatically pulls the functions, data and prompts out of the paper and its code and assembles a remote MCP server. That server is then attached to an LLM, producing an agent bound to one specific piece of work.

An MCP server has three key parts:

  • Tools — executable functions with the environment already configured;
  • Resources — standardized assets: text, code, tables, datasets, figures;
  • Prompts — short instructions for complex multi-step pipelines, so the agent acts reliably and in the right order.

The server can be deployed on Hugging Face Spaces, for instance, and connected to any compatible chat agent. For the demo the authors used Claude Code: separate subagents configure the environment, pull functions out of the tutorials, write tests and assemble everything into an MCP server.

An overview of Paper2Agent. (A) The system turns papers into interactive AI agents by building remote MCP servers with tools, resources and prompts; connecting an AI to the server produces a paper-bound agent for a range of tasks. (B) The workflow: code is extracted and the environment configured automatically for reproducibility; the key analytical functions are wrapped as MCP tools and checked with iterative tests; the finished MCP server is deployed remotely and integrated with an AI, enabling natural-language interaction with the paper's methods and analyses.

Three examples that already work

Genomics

For AlphaGenome, Paper2Agent assembled 22 tools on an ordinary laptop in roughly three hours with no manual intervention: variant scoring, sequence-based predictions, tissue ontologies, visualizations. Tested on 15 queries from the original tutorial, it got 100% accuracy on the numbers; another 15 new queries came back error-free again, measured against running the code by hand.

A telling case: the agent planned the steps itself, ran scoring across modalities, filtered for the relevant tissues, built visualizations and produced a coherent report. It prioritized one gene while still surfacing strong signals for others. The result is that a single query gets the user a re-reading of a complicated polygenic locus — with the reasoning and the numbers attached.

An overview of the AlphaGenome agent built by Paper2Agent: (A) construction of the AlphaGenome MCP server and agent; (B) the exposed MCP tools and resources for variant scoring and visualization; (C) benchmarks show 100% accuracy on reproduction queries and on new tasks; (D) automatic planning and interpretation of GWAS loci through plan–act–observe loops.

Spatial transcriptomics

Here it generated 6 tools: spatial expression prediction, prediction intervals, and uncertainty-aware analyses. The agent holds a conversation: it says which inputs it needs and runs the pipeline itself. Ask it to compute a prediction interval for a gene from specified files, and it runs the whole process and returns results that match the manual analysis. The paper's data availability section has also been turned into a resource registry with unified metadata and direct links through repository APIs — you can simply ask it to download the mouse data from Zenodo and run the analysis.

An overview of the TISSUE agent built by Paper2Agent: (A) construction of the TISSUE MCP server and agent; (B) Q&A support for uncertainty-aware spatial transcriptomics analysis; (C) reproducibility confirmed by matching the results of the human researchers; (D) structured MCP resources provide standardized dataset access and automatic downloads.

Single-cell analysis

The focus here is the standard pipeline: quality control, normalization, feature selection, dimensionality reduction, graph construction, clustering, annotation. In about 45 minutes Paper2Agent extracted 7 tools and wrote prompts to hold the steps in the right order. The user only has to pass a file path; the agent analyzes the data, runs the default pipeline and, where the task calls for it, departs from the defaults carefully. On three public datasets the results matched the researchers' reference tutorials.

An overview of the Scanpy agent built by Paper2Agent: (A) construction of the MCP server and agent; (B) MCP prompts define a standardized pipeline for preprocessing and clustering single-cell data; (C) the agent reproduces the researcher's results given nothing but a path to the dataset.

Why it matters

  • The cost of adoption drops: instead of weeks of setup, a conversation with an agent and tools that already run.
  • Reproducibility improves: tests and standardized resources turn someone else's work into a dependable service.
  • Scalability: several MCP servers can be attached to a single chat agent, building a multi-agent system out of method agents and data agents.
  • A new quality metric for papers: if the code is badly put together, the agent won't build — the reproducibility problem becomes visible.

Under the hood sit an orchestrator and four subagents: environment setup, finding and running tutorials, tool extraction, and testing and refinement. All of it is packaged into an MCP server and deployed remotely. That server can be connected to any compatible LLM, and you talk to the paper's methods the way you would talk to an assistant.

💾 Code

🤖 Agent

AI paper breakdowns

Every day we read the new AI papers and retell what matters in plain language — no hype, no filler. If you want to see where AI agents are heading before everyone else, subscribe.

New breakdowns every day.

On Telegram