Build an Evo 2 Genomics MCP Server for Agentic Scientific Discovery
Stand up a Python FastMCP server around Stanford's Evo 2 foundation model so AI agents can run biosafety-gated in-silico genome analysis, sequence generation, and protein design.
Deepak Bagada
CEO, SaaSNext
- Evo 2 is the first truly actionable foundation model for genomics — Stanford proved on August 7, 2026 that it can design phages that kill E. coli in the lab.
- A Python FastMCP server turns Evo 2's API into MCP tools — genome analysis, sequence generation, and protein design — that any Claude or Cursor agent can call.
- inputSchema contracts and JSON Schema validation stop agents from sending malformed or dangerous payloads to the model.
- A mandatory biosafety review gate plus API-key/OAuth 2.1 security make the server safe for academic and industry labs.
By Deepak Bagada, CEO at SaaSNext & Principal AI Architect.
On August 7, 2026, Stanford researchers crossed a line that computational biology had chased for a decade: their 40-billion-parameter Evo 2 foundation model designed novel phages that genuinely killed E. coli in the lab. Synthetic biology just became a design problem an AI can own. Once a model passes the in-silico-to-wet-lab test, the surrounding work — retrieving reference genomes, scoring variants, comparing candidates, drafting synthesis requests — becomes orchestratable end to end by an autonomous agent. The glue that makes that possible is the Model Context Protocol (MCP).
This guide builds a production-ready Evo 2 genomics MCP server in Python using FastMCP. It exposes three tool families — genome analysis, sequence generation, and protein design — with explicit inputSchema contracts, a mandatory biosafety review gate before anything reaches a wet lab, and API-key/OAuth 2.1 security. When you are done, Claude Desktop, Cursor, or any MCP client can run in-silico experiments against Evo 2 on your behalf. For more agent tooling, browse the MCP Directory, pair this server with scientific workflow templates, and follow frontier-model coverage in latest AI news.
Why Evo 2 is now actionable
Evo 2 was trained on millions of prokaryotic and phage genomes, so its representations encode regulatory logic, coding constraints, and evolutionary structure that smaller genomic models miss. The Stanford result matters because it closes the generative loop: the model proposes a sequence, a lab synthesizes it, and the phage actually works against a target pathogen. That validation is the prerequisite for agentic scientific discovery. When a model's output survives contact with reality, the agent that orchestrates it inherits genuine scientific agency.
The workflow consequence is a shift from batch scripting to conversational, tool-driven bioinformatics. Instead of writing a one-off Python script per analysis, a scientist asks a question — "which candidate phage has the strongest predicted activity against this E. coli strain?" — and the agent calls Evo 2, scores candidates, checks references in GenBank, and returns a synthesis-ready report with provenance. Nobody writes a FASTA parser; the agent uses tools. That shift, from writing scripts to composing tools, is the definition of agentic scientific discovery, and it is exactly what MCP enables.
Server architecture
The server sits between an MCP client and Evo 2's hosted inference API in four layers:
- Transport — FastMCP exposes stdio for local clients and SSE for remote deployments.
- Tools — genome analysis, sequence generation, protein design, and a safety-gate escalation tool.
- Security — server-side API keys, optional OAuth 2.1, and read-only sandbox mode.
- Datasets — cached GenBank and UniProt references used for grounding and provenance.
The key property: upstream Evo 2 credentials never leave the server. Agents hold no secrets, and every tool call is validated against JSON Schema before it reaches the model. This keeps the server simple to audit and safe to hand to any client.
The Evo 2 API surface
Our server wraps three hosted endpoints:
predict— returns functional-region scores and confidence for a sequence.embed— returns a genome's vector representation for similarity search.generate— samples novel sequences conditioned on a seed prompt and temperature.
Each MCP tool maps to one endpoint, enriches the result with dataset context, and returns a structured contract agents can rely on.
Building the server
Install the dependencies:
pip install "mcp[cli]" fastmcp httpx pydantic
Then create evo2_mcp_server.py:
# evo2_mcp_server.py
import httpx
from typing import Literal
from pydantic import BaseModel, Field
from mcp.server.fastmcp import FastMCP
EVO2_URL = "https://api.evobiology.example.com/v1"
EVO2_API_KEY = "<YOUR_EVO2_API_KEY>"
mcp = FastMCP("evo2-genomics")
class AnalyzeInput(BaseModel):
sequence: str = Field(description="DNA sequence to analyze")
model_context: Literal["small", "medium", "large"] = "medium"
include_embeddings: bool = False
class GenerateInput(BaseModel):
prompt_sequence: str = Field(description="Seed sequence for generation")
target: str = Field(description="Target organism, e.g. Escherichia coli")
temperature: float = Field(0.7, ge=0.1, le=1.5)
num_candidates: int = Field(5, ge=1, le=50)
class DesignProteinInput(BaseModel):
coding_sequence: str = Field(description="Coding DNA to translate")
include_annotations: bool = True
def call_evo2(endpoint: str, payload: dict) -> dict:
with httpx.Client(timeout=120) as client:
resp = client.post(
f"{EVO2_URL}/{endpoint}",
json=payload,
headers={"Authorization": f"Bearer {EVO2_API_KEY}"},
)
resp.raise_for_status()
return resp.json()
@mcp.tool()
def analyze_genome(input_data: AnalyzeInput) -> dict:
"""Score functional regions of a DNA sequence with Evo 2."""
result = call_evo2("predict", input_data.model_dump())
return {
"regions": result["regions"],
"confidence": result["confidence"],
"embedding": result.get("embedding"),
}
@mcp.tool()
def generate_sequences(input_data: GenerateInput) -> dict:
"""Design novel candidate sequences conditioned on a seed."""
return call_evo2("generate", input_data.model_dump())
@mcp.tool()
def design_protein(input_data: DesignProteinInput) -> dict:
"""Translate and annotate a designed coding sequence."""
return call_evo2("protein/design", input_data.model_dump())
@mcp.tool()
def request_wetlab_review(candidate_id: str, target: str, rationale: str) -> dict:
"""Escalate a candidate to biosafety review before any synthesis."""
return {"status": "pending_biosafety_review", "candidate_id": candidate_id}
if __name__ == "__main__":
mcp.run()
The pydantic models ARE the inputSchema. FastMCP serializes each model into JSON Schema and advertises it in tools/list, so clients validate payloads before a single byte reaches Evo 2. Here is the generated contract for analyze_genome:
{
"name": "analyze_genome",
"inputSchema": {
"type": "object",
"properties": {
"sequence": {"type": "string"},
"model_context": {"enum": ["small", "medium", "large"], "type": "string"},
"include_embeddings": {"type": "boolean"}
},
"required": ["sequence"]
}
}
Tool walkthrough
analyze_genome scores functional regions and optionally returns a genome embedding, which agents use for nearest-neighbor searches across a strain collection. generate_sequences designs candidates conditioned on a seed; the temperature parameter controls how far from the seed the model ventures, and num_candidates caps output so a runaway agent cannot flood the API. design_protein translates and annotates coding DNA, flagging stop codons and unusual codon usage before results propagate downstream. The fourth tool, request_wetlab_review, is the one that keeps the whole system honest.
The safety gate
request_wetlab_review never synthesizes anything. It moves a candidate to pending_biosafety_review, attaches the target organism and the agent's rationale, and routes it to a human review queue. Our production rule is unambiguous: no generated sequence leaves the agent loop without an explicit human sign-off. Design is free; synthesis is gated. That single invariant is the difference between a research accelerator and an irresponsible one, and it is non-negotiable for any tool in a biology workflow. Pair it with the governance process below and every experiment leaves a reviewable trail — exactly what an institutional review board expects before approving synthesis work.
Connecting clients with mcpServers
Register the server in Claude Desktop's claude_desktop_config.json or Cursor's .cursor/mcp.json:
{
"mcpServers": {
"evo2-genomics": {
"command": "python",
"args": ["/opt/lab/evo2_mcp_server.py"],
"env": {
"EVO2_API_KEY": "${EVO2_API_KEY}"
}
}
}
}
Keep EVO2_API_KEY in your shell environment — never in the config file.
Security: OAuth 2.1 and API-key + sandbox mode
Three layers protect the server:
- API-key transport. The Evo 2 token lives server-side; no tool ever echoes it to the agent.
- OAuth 2.1. For teams, wrap the server behind an OAuth 2.1 authorization server with PKCE and short-lived tokens. Clients authenticate to your gateway, never to Evo 2.
- Sandbox mode. Set
EVO2_SANDBOX=1to force read-only tools and disable generation entirely, with every call written to an audit log.
This mirrors the security posture we recommend for every tool in the MCP Directory: authenticate once, keep secrets out of prompts, and log everything.
Dataset access: GenBank and UniProt
Grounding improves output quality and gives agents provenance. The server pulls sequence metadata from GenBank and protein annotations from UniProt via their REST APIs, caches them locally, and attaches accession IDs to every result. A candidate is then not a bare string — it is a chain of evidence from reference to design. Agents can cite it, and reviewers can verify it, which matters when a synthesis request finally goes to a lab.
Embeddings and cluster analysis
Beyond scoring, analyze_genome with include_embeddings: true returns vectors you can cluster across a strain collection. Agents use this to answer questions like "which of my archived phages is nearest to this new E. coli isolate?" without loading sequences into a notebook. Clusters also surface outlier sequences worth deprioritizing before synthesis, saving bench time and reagents. The embeddings become the semantic layer between raw genomes and agent reasoning — the same pattern powering retrieval pipelines across the workflows library.
Testing the server
Start the server, open Claude Desktop, and run a probe: "Analyze this promoter sequence and score its regulatory regions." Watch the tool call, the JSON Schema validation, and the structured result. Then ask for a candidate phage against E. coli and confirm the answer stops at pending_biosafety_review instead of handing you a synthesis protocol. If the client shows validation errors, check that the pydantic field names match the JSON Schema. A small probe suite here saves hours downstream.
Evo 2 MCP server vs. manual workflow
| Capability | Manual CLI + scripts | Evo 2 MCP server |
|---|---|---|
| Agent integration | None, human at the keyboard | Native tool calls from Claude/Cursor |
| Input validation | Ad hoc assertions | JSON Schema per tool |
| Biosafety gating | Manual email threads | Enforced review queue |
| Credential handling | Tokens scattered in scripts | Server-side, OAuth 2.1 |
| Provenance | Lost in temp files | GenBank/UniProt citations on every result |
Production checklist
Run this checklist before you let any agent near generation rights:
- Put the server behind an OAuth 2.1 gateway before any shared deployment.
- Enable sandbox mode by default; lift it only for designated experimenters.
- Route every
request_wetlab_reviewevent to a channel with a human on call. - Cache GenBank/UniProt responses with a TTL to keep the server fast and cheap.
- Log tool calls with hashed payloads so a review has context without exposing raw sequences.
Biosafety review and governance
Evo 2's release is a landmark, but its dual-use nature demands process, not just policy. Before agents gain generation rights, define who can approve a synthesis request, which organism targets require elevated review, and how long audit logs are retained. The server's review queue enforces the workflow; your governance doc defines the rules. We track evolving safety practice in latest AI news, and the MCP Directory now lists a growing set of safety-aware scientific tools worth studying before you deploy. Agentic discovery is here. Stanford proved the model works; this server gives your agents the tools to act on it. Start in sandbox, keep the safety gate, and let the lab decide what gets synthesized.
Enjoyed this breakdown? Get our morning dispatch in your inbox.
Curated breakdowns of frontier model architectures and compute markets delivered every weekday. Zero fluff.
Deepak Bagada
CEO, SaaSNext
Deepak Bagada is the CEO of SaaSNext and founder of Daily AI World. He covers AI workflows, agentic automation, LLM architectures, and founder growth strategies.
Build an Industrial IT-OT Convergence Agent Workflow with Cisco & Rockwell
Next Story →Build an Agent Observability MCP Server for Production Diagnostics
Related Intelligence Analysis
Vercel AI SDK Tool Calling React: 5 Steps (2026)
Vercel AI SDK tool calling React integration is a programming pattern that executes server-side functions based on large language model decisions and streams the results to a React frontend. By combining streamText with...
Fact-Density vs. Word Count: The New SEO for 2026
Fact Density is the ratio of verifiable, unique information to the total word count of a piece of content. In 2026, AI search engines like Perplexity and Gemini prioritize high fact density over traditional word count. A...
NVIDIA Audex vs Qwen3.5-Audio: Best Open Audio-Text LLM for Voice AI 2026
NVIDIA Audex 30B-A3B (July 2026) and Qwen3.5-35B-A3B are the two leading open audio-text LLMs. Audex uniquely handles both audio understanding and generation in a single model while preserving text intelligence. Qwen3.5-...