Stanford Researchers Release Paper2Agent: Turning Research Papers Into AI Agents That Reproduce Results and Run on New Data






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:

  1. Locate and download the codebase.
  2. An environment manager builds an isolated virtual environment.
  3. A tutorial scanner indexes usable tutorials.
  4. A tutorial executor runs them end to end and records reference outputs.
  5. A tool extractor turns tutorials into parameterized MCP tools, and a test verifier validates them.
  6. 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.

Interactive Explainer

‘+esc(s.n);
b.addEventListener(‘click’,function(){stop();setStep(k)});track.appendChild(b)});
var nodes=track.querySelectorAll(‘.node’);
function setStep(k){cur=k;nodes.forEach(function(n,j){n.classList.toggle(‘cur’,j===k);n.classList.toggle(‘done’,j

STEP ‘+(k+1)+’ | AGENT

‘+esc(s.a)+’

‘;
send();}
function stop(){if(timer){clearInterval(timer);timer=null;$(‘pPlay’).innerHTML=’▶ Play pipeline’}}
$(‘pPlay’).addEventListener(‘click’,function(){if(timer){stop();return}
if(cur>=steps.length-1)setStep(0);$(‘pPlay’).innerHTML=’❚❚ Pause’;
timer=setInterval(function(){if(cur>=steps.length-1){stop();return}setStep(cur+1)},reduce?2500:1700)});
$(‘pReset’).addEventListener(‘click’,function(){stop();setStep(0)});
setStep(0);

/* 02 server */
var agents={
ag:{name:’AlphaGenome’,
comps:[{c:’c-tool’,k:’MCP tools’,d:’Executable functions with a pre-configured environment.’,x:’score_variant_effect(), visualize_variant_effects()’},
{c:’c-res’,k:’MCP resources’,d:’Static assets: manuscript, code and supplements.’,x:’Links to the training data used to train the model’},
{c:’c-prm’,k:’MCP prompts’,d:’Multi-step workflow instructions inferred from the paper.’,x:’Chain of tools for interpreting GWAS loci’}],
chats:[
[[‘u’,’Score variant chr19:8134523:G>A using ATAC-seq predictions for lung (UBERON:0002048). What is the quantile_score for this cell type?’],[‘t’,’call score_variant(…)’],[‘a’,’quantile_score: -0.0203067882 (ground truth: -0.0203067882)’]],
[[‘u’,’Where does the AlphaGenome training data come from?’],[‘t’,’read resource: training data links’],[‘a’,’Returns the training data links stored in the server resources.’]],
[[‘u’,’Use AlphaGenome to interpret why chr1:109274968:G>T associates with LDL cholesterol.’],[‘t’,’prompt: plan, score_variant_batch(), visualize_variant_effects()’],[‘a’,’Plan, act, observe loop. The agent prioritized SORT1 (quantile 0.99983) and wrote a report.’]]
]},
sc:{name:’Scanpy’,
comps:[{c:’c-tool’,k:’MCP tools’,d:’7 validated tools for preprocessing and clustering.’,x:’quality_control_basic_filtering(), clustering_analysis()’},
{c:’c-res’,k:’MCP resources’,d:’Reference material the agent can query.’,x:’Scanpy documents link’},
{c:’c-prm’,k:’MCP prompts’,d:’Encodes the standard pipeline order.’,x:’QC, normalization, feature selection, dimensionality reduction, graph, clustering, annotation’}],
chats:[
[[‘u’,’Perform standard quality control on my single-cell data: data.h5ad’],[‘t’,’call quality_control_basic_filtering(…)’],[‘a’,’Quality control completed. Filtered to 17,041 cells and 23,424 genes. (Fig. 3a example)’]],
[[‘u’,’Show me the Scanpy docs for clustering.’],[‘t’,’read resource: Scanpy documents link’],[‘a’,’Returns the documentation link exposed by the server.’]],
[[‘u’,’My data is data.h5ad’],[‘t’,’prompt: preprocess_and_cluster_scanpy’],[‘a’,’Inspects the data first, then runs the full pipeline in order and summarizes results.’]]
]},
ti:{name:’TISSUE’,
comps:[{c:’c-tool’,k:’MCP tools’,d:’Uncertainty-aware spatial transcriptomics functions.’,x:’calibrate_uncertainties_and_prediction_intervals(), multiple_imputation_hypothesis_testing()’},
{c:’c-res’,k:’MCP resources’,d:’Structured dataset registry with automated downloads.’,x:’Spatial transcriptomics data used in TISSUE’},
{c:’c-prm’,k:’MCP prompts’,d:’Guided multi-step analysis.’,x:’Instructions for uncertainty-aware spatial transcriptomics analysis’}],
chats:[
[[‘u’,’Use TISSUE to generate the prediction interval for gene Acta2.’],[‘t’,’call calibrate_uncertainties_and_prediction_intervals(…)’],[‘a’,’Returns the prediction interval map. Output matched human researcher results (Extended Data Fig. 1c).’]],
[[‘u’,’Download the spatial transcriptomics data used in the TISSUE paper.’],[‘t’,’read resource: datasets, Zenodo REST API’],[‘a’,’Data downloaded automatically.’]],
[[‘u’,’Use TISSUE to perform uncertainty-aware dimensionality reduction on my spatial data.’],[‘t’,’prompt: uncertainty-aware analysis’],[‘a’,’Runs the guided workflow and returns a PCA figure.’]]
]}
};
var curAgent=”ag”,curComp=0,chatTimers=[];
function renderComps(){var a=agents[curAgent];$(‘chatName’).textContent=a.name;
$(‘comps’).innerHTML=a.comps.map(function(c,k){return ‘

‘+esc(c.k)+’

‘+esc(c.d)+’

'+esc(c.x)+'

‘}).join(”);
$(‘comps’).querySelectorAll(‘.comp’).forEach(function(el){el.addEventListener(‘click’,function(){curComp=+el.dataset.k;renderComps();renderChat(curComp)})});}
function renderChat(k){chatTimers.forEach(clearTimeout);chatTimers=[];var msgs=agents[curAgent].chats[k],body=$(‘chatBody’);
body.innerHTML=msgs.map(function(m){return ‘

‘+(m[0]===’t’?’⚙ ‘:”)+esc(m[1])+’

‘}).join(”);
body.style.display=’flex’;body.style.flexDirection=’column’;body.style.gap=’10px’;
var bs=body.querySelectorAll(‘.bub’);bs.forEach(function(b,j){chatTimers.push(setTimeout(function(){b.classList.add(‘show’);send()},reduce?0:150+j*650))});}
root.querySelectorAll(‘#srvSeg button’).forEach(function(b){b.addEventListener(‘click’,function(){
root.querySelectorAll(‘#srvSeg button’).forEach(function(x){x.classList.remove(‘on’)});b.classList.add(‘on’);curAgent=b.dataset.k;curComp=0;renderComps();renderChat(0)})});
renderComps();renderChat(0);

/* 03 gate */
var MAX=6,att=0,closed=false;
var attEl=$(‘gAtt’);for(var q=0;q=MAX){v.className=”verdict fail”;v.textContent=”6 attempts used. MCP decorator removed, failure comment added, tool excluded.”;closed=true}
else{v.className=”verdict fail”;v.textContent=”Failed. The agent diagnoses, applies a fix and retries. Adjust inputs to simulate the fix.”;$(‘gRun’).disabled=false}
if(closed)$(‘gRun’).disabled=true;send()},d*3+100)});
$(‘gReset’).addEventListener(‘click’,function(){att=0;closed=false;$(‘gRun’).disabled=false;resetCks();$(‘gVerdict’).className=”verdict”;$(‘gVerdict’).textContent=”Run the test to see the verdict”;upd()});
upd();

/* 04 bench */
var B={
tut:{rows:[[‘Paper2Agent’,98.7,1.3,’#F5843B’],[‘Claude + Repo’,82.7,3.4,’#3BA3E3′],[‘Biomni’,37.3,4.0,’#6F8F99′]],
stats:[[‘1.9x’,’lower median runtime vs Claude + Repo’],[‘3.1x’,’lower median runtime vs Biomni’],[’22’,’AlphaGenome tools, all validated’]],
note:’15 tutorial-derived queries, 5 independent runs, graded by 2 experts (96.7% inter-rater agreement).’},
nov:{rows:[[‘Paper2Agent’,100.0,0.0,’#F5843B’],[‘Claude + Repo’,78.7,4.4,’#3BA3E3′],[‘Biomni’,56.0,3.4,’#6F8F99′]],
stats:[[‘2.9x’,’lower median runtime vs Claude + Repo’],[‘3.8x’,’lower median runtime vs Biomni’],[‘US $14′,’one-time build cost, about 45 min’]],
note:’15 novel queries not taken from tutorials, 5 independent runs.’},
open:{rows:[[‘Paper2Agent’,82.7,2.4,’#F5843B’],[‘Biomni’,72.2,2.2,’#6F8F99′],[‘Claude + Repo’,56.7,2.3,’#3BA3E3′]],
stats:[[’30’,’researcher-style queries’],[‘Multi-step’,’tool composition and biological synthesis’],[‘Opus 4.6′,’baseline upgrade did not erase the gains’]],
note:’Open-ended AlphaGenome queries scored by 2 domain experts using a predefined rubric.’},
big:{rows:[[‘Paper2Agent (Sonnet 4)’,91.2,1.6,’#F5843B’],[‘Claude + Repo (Sonnet 4.6)’,86.3,1.1,’#7CC4F0′],[‘Claude + Repo (Sonnet 4)’,80.3,2.3,’#3BA3E3′]],
stats:[[’74 / 100′,’bioRxiv biology papers agentified’],[‘593 / 599′,’proposed tools passed validation’],[‘US $0.20′,’per query vs US $0.38 (1.6 vs 4.3 min)’]],
note:’300 tutorial-derived questions across the 74 agentified papers. Both comparisons P < 0.0001.’}
};
var curBench=”tut”;
function renderBench(k){curBench=k;var b=B[k];
$(‘bars’).innerHTML=b.rows.map(function(r){return ‘

‘+esc(r[0])+’‘+r[1].toFixed(1)+’% ± ‘+r[2].toFixed(1)+’

‘}).join(”);
$(‘bStats’).innerHTML=b.stats.map(function(s){return ‘

‘+esc(s[0])+’

‘+esc(s[1])+’

‘}).join(”);
$(‘bNote’).textContent=b.note;
var fs=$(‘bars’).querySelectorAll(‘.bf’);requestAnimationFrame(function(){requestAnimationFrame(function(){fs.forEach(function(f){f.style.width=f.dataset.w+’%’})})});send();}
root.querySelectorAll(‘#bSeg button’).forEach(function(b){b.addEventListener(‘click’,function(){
root.querySelectorAll(‘#bSeg button’).forEach(function(x){x.classList.remove(‘on’)});b.classList.add(‘on’);renderBench(b.dataset.k)})});
renderBench(‘tut’);

/* 05 collab */
var CS=[
{lit:[‘a1′],fl:[],t:’Step 1. The AlphaGenome agent scores psoriasis variant rs887314 in CD4+ T cells. GPR137 ranks as the top affected gene (RNA-seq quantile score 0.997).’},
{lit:[‘a2′,’a3′,’a4’],fl:[‘f2′,’f3′],t:’Step 2. The AI co-scientist inspects the scCRISPRi supplementary tables and Perturb-seq summary statistics, then proposes 10 validation strategies.’},
{lit:[‘a4’],fl:[‘f1′,’f2′,’f3′],t:’Step 3. A human researcher selects signature-correlation analysis. The agent correlates the CRE perturbation signature with knockdown signatures for the 5 top candidates across 3 culture conditions.’},
{lit:[‘a1′,’a2′,’a3′,’a4’],fl:[‘f1′,’f2′,’f3′],t:’Step 4. Only GPR137 knockdown matches, and only under stimulation. BAD and 3 other candidates show no significant correlation. The authors read GPR137 as activation-dependent. Toggle conditions below.’}
];
var cs=0;
var RHO=[
{g:[0.29,’0.21′,false],b:[-0.12,’0.6′],n:20},
{g:[0.613,’3.79 x 10^-3′,true],b:[0.09,’0.7′],n:21},
{g:[0.630,’4.71 x 10^-3′,true],b:[0.05,’0.85′],n:19}
];
function renderRho(k){root.querySelectorAll(‘#rSeg button’).forEach(function(x){x.classList.toggle(‘on’,+x.dataset.k===k)});var r=RHO[k];
$(‘mkG’).style.left=((r.g[0]+1)/2*100)+’%’;$(‘mkB’).style.left=((r.b[0]+1)/2*100)+’%’;
$(‘rBody’).innerHTML=’

GPR137‘+r.g[0]+’‘+r.g[1].replace(‘^-3′,’-3‘).replace(‘ x ‘,’ × ‘)+’BAD‘+r.b[0]+’‘+r.b[1]+’n = ‘+r.n+’ downstream genes

‘;send();}
root.querySelectorAll(‘#rSeg button’).forEach(function(b){b.addEventListener(‘click’,function(){renderRho(+b.dataset.k)})});
function renderC(){var s=CS[cs];[‘a1′,’a2′,’a3′,’a4’].forEach(function(id){$(id).classList.toggle(‘lit’,s.lit.indexOf(id)>-1)});
[‘f1′,’f2′,’f3’].forEach(function(id){$(id).classList.toggle(‘lit’,s.fl.indexOf(id)>-1)});
$(‘cStep’).innerHTML=s.t;$(‘cStep’).style.animation=’none’;void $(‘cStep’).offsetWidth;$(‘cStep’).style.animation=”;
$(‘cCount’).textContent=(cs+1)+’ / ‘+CS.length;$(‘cPrev’).disabled=cs===0;$(‘cNext’).disabled=cs===CS.length-1;
$(‘cRho’).style.display=cs===CS.length-1?’block’:’none’;if(cs===CS.length-1){$(‘mkG’).style.left=”50%”;$(‘mkB’).style.left=”50%”;setTimeout(function(){renderRho(1)},60)}send();}
$(‘cPrev’).addEventListener(‘click’,function(){if(cs>0){cs–;renderC()}});
$(‘cNext’).addEventListener(‘click’,function(){if(cs
“>

AlphaGenome Agent Results

For AlphaGenome, Paper2Agent built 22 tools in about 45 minutes for US $14. All 22 passed validation without human intervention. The team compared the agent with Claude Code plus repository access (Claude + Repo) and Biomni.

BenchmarkPaper2AgentClaude + RepoBiomni
15 tutorial-derived queries98.7 ± 1.3%82.7 ± 3.4%37.3 ± 4.0%
15 novel queries100.0 ± 0.0%78.7 ± 4.4%56.0 ± 3.4%
30 open-ended queries82.7 ± 2.4%56.7 ± 2.3%72.2 ± 2.2%

Results span 5 runs, graded by 2 human experts with 96.7% inter-rater agreement. On tutorial queries, median runtime fell 1.9× versus Claude + Repo and 3.1× versus Biomni. The gains persisted when the baseline was upgraded to Claude Opus 4.6.

The agent also re-examined an LDL cholesterol variant, chr1:109274968:G>T. It ranked SORT1 as the likely causal gene. The original AlphaGenome paper emphasized CELSR2 and PSRC1. GTEx shows significant liver eQTLs for all 3 genes. The research team say this shows how hard causal gene assignment is at such loci.

Scanpy, TISSUE and Scale Tests

The Scanpy agent received 7 validated tools in about 45 minutes for US $13. On 4 public datasets, it matched human researchers on cell counts, gene counts and top marker genes. A TISSUE agent reproduced human results on spatial transcriptomics data.

Scale tests covered 3 corpora with no manual cleanup:

  • 100 bioRxiv computational biology papers: 74 were agentified, and 593 of 599 proposed tools passed validation.
  • 300 questions: Paper2Agent scored 91.2%, versus 80.3% (Sonnet 4) and 86.3% (Sonnet 4.6) for Claude + Repo.
  • Cost per query: US $0.20 and 1.6 minutes, compared with US $0.38 and 4.3 minutes.
  • 10 non-biology papers, including TabPFN, SAM 2 and SAELens: 98.1% accuracy on 42 execution tasks.
  • 26 data-focused papers: resource layer 89.0% versus 82.0% for browser use, 34× cheaper and 15× faster.

Paper2Agent also rejected 100% of out-of-scope queries in a permuted benchmark. It recovered from injected dependency, file-path, typo and deprecated API failures.

Paper Agents Collaborating

The research team connected 3 agents: AlphaGenome, an MPRA-coupled scCRISPRi screen and a CD4+ T cell Perturb-seq dataset. AlphaGenome flagged GPR137 at psoriasis locus rs887314, with an RNA-seq quantile score of 0.997. The AI co-scientist proposed 10 validation strategies, and a researcher picked signature correlation.

Only GPR137 knockdown matched the CRE perturbation signature. The match appeared under stimulation: Spearman 0.613 at Stim8hr and 0.630 at Stim48hr. BAD and 3 other candidates showed no significant correlation. A second study paired AlphaGenome with an ADHD GWAS and nominated rs1626703 among 209 candidates. That hypothesis still needs experimental validation.

Key Takeaways

  • Paper2Agent converts papers and repos into tested MCP servers with tools, resources and prompts.
  • The AlphaGenome agent took about 45 minutes, cost US $14, and scored 100% on novel queries.
  • 74 of 100 bioRxiv papers were agentified, with 593 of 599 tools validated.
  • 3 paper agents jointly supported GPR137 as the probable psoriasis causal gene.
  • The code is MIT-licensed, with prebuilt MCP servers on Hugging Face Spaces.

Check out the Paper and Repo. All credit goes to the researcher of this project. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us


Asif Razzaq is the CEO of Marktechpost AI Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.



Source link

  • Related Posts

    Knowledgator Releases GLiFormer: A 575M-Parameter Encoder That Hits 91.10 F1 on Nested JSON Extraction Without Generating Tokens

    Knowledgator Engineering has released GLiFormer, a schema-conditioned encoder framework for information extraction. One model handles named-entity recognition (NER), text classification, relation extraction, nested JSON structuring, and text embeddings. You pass…

    Prior Labs Releases TabPFN-3.5: A Tabular Foundation Model That Beats the Winning Otto Kaggle Solution With Default Settings

    Prior Labs has released TabPFN-3.5, the newest version of its tabular foundation model. It predicts on a table in a forward pass, with no per-dataset training or tuning. Prior Labs…

    Leave a Reply

    Your email address will not be published. Required fields are marked *