Home Manifesto Blog Connect

A Pharmacogenomics MCP Server for Claude, Cursor and VS Code

The Short Answer

If you want an AI agent to answer pharmacogenomics questions from cited guidelines rather than from memory, connect it to a Model Context Protocol (MCP) server that holds the guidance. DeepDNA runs one at https://deepdna.ai/mcp: remote, free, no key, no account. In Claude Code it is one line:

claude mcp add --transport http deepdna https://deepdna.ai/mcp

The server gives an agent five tools, all read-only. They read curated, cited records: genes, rsID variants, drug–gene pairs, and a screen that takes a medication list and says which drugs have a record. Each record says what it rests on: 72 of the 83 pairs cite a CPIC or DPWG guideline, the rest a drug label or the primary literature. The knowledge base covers 16 genes, 15 of which have drug pairs. It does not read DNA files and it does not call phenotypes or doses.

Why an Agent Shouldn't Answer This From Memory

Ask a general model what CYP2C19 means for clopidogrel and you'll usually get something close to right. "Close" is the problem. Guidelines change: CPIC's clopidogrel guideline was updated in 2022, and an answer drawn from training data can mix the old and new recommendations without saying which is which. The model also rarely tells you where its answer came from, so there's nothing to check.

A tool fixes both. The agent asks, the server returns the record with its sources, and the answer the user reads can quote them. That is the whole idea behind connecting knowledge through MCP rather than hoping the model remembers it.

Connecting It

The server speaks Streamable HTTP, so any client that supports remote MCP servers can use it.

Cursor and clients that read an mcpServers file:

{
  "mcpServers": {
    "deepdna": { "type": "http", "url": "https://deepdna.ai/mcp" }
  }
}

VS Code, in .vscode/mcp.json:

{
  "servers": {
    "deepdna": { "type": "http", "url": "https://deepdna.ai/mcp" }
  }
}

Claude Desktop and claude.ai: add https://deepdna.ai/mcp as a custom connector. Step-by-step setup for each client, including ChatGPT and Gemini CLI: connect the MCP server.

It is listed in the official MCP registry as ai.deepdna/knowledge, and the remote server's setup lines also live in the deepdna-mcp repository on GitHub.

The Tools

Tool What it does
check_medications Splits a list of generic drug names into drugs with a curated record (gene, and whether it rests on a guideline, a drug label or the literature) and drugs not covered
lookup_drug_gene One gene, or one gene and one drug: guideline if there is one, summary, phenotype groups, sources
lookup_gene Everything curated about a gene, including what a consumer genotyping array can and cannot tell you about it
lookup_variant One variant by rsID, with its alleles, effect and sources. Takes the rsID only, never a genotype
list_genes What the knowledge base covers

There are also two ready-made prompts, medication_review and explain_variant, for clients that show MCP prompts as commands.

What a Medication Screen Returns

Here is check_medications on a short list, run against the same code and data the server uses:

{
  "checked": 4,
  "with_curated_records": [
    { "drug": "clopidogrel", "genes": [{ "gene": "CYP2C19", "basis": "CPIC guideline", "summary": "…", "sources": ["…"] }] },
    { "drug": "simvastatin", "genes": [{ "gene": "SLCO1B1", "basis": "CPIC guideline", "summary": "…", "sources": ["…"] }] },
    { "drug": "codeine", "genes": [{ "gene": "CYP2D6", "basis": "CPIC guideline", "summary": "…", "sources": ["…"] }] }
  ],
  "not_covered": ["paracetamol"]
}

This is abridged: the real response also carries each pair's guideline field, full summaries and sources, a coverage_note and the disclaimer. Paracetamol appearing under not_covered means it isn't in this knowledge base, not that it has no pharmacogenomic interaction, and the result lists what the records say, not what the person should take. An agent that drops those sentences is overstating the result.

The basis field matters too: it says whether each pair rests on a CPIC or DPWG guideline, a drug label or the primary literature, so an agent can tell a guideline recommendation from a published association before it repeats either.

This screen needs no genotype at all. It answers the question that usually comes first: does genetics plausibly matter for any of these medicines? If the answer is yes, the usual next step is to ask a prescriber or pharmacist whether pharmacogenomic testing makes sense, and the agent can say exactly which genes are involved.

What About the User's Genotype?

lookup_variant takes an rsID and nothing else. DeepDNA's tools have no field for a genotype: an argument a tool doesn't declare, such as a genotype, is refused and not used, stored or counted, and what is typed into a declared field is recorded only as a short lookup label (an rsID, a gene from our list of known pharmacogenes, or a drug we cover); anything else, whatever it is, is recorded as "(other)". If your agent can read the user's raw DNA file, it does the comparison itself, in the agent and outside DeepDNA, with the record's reading block: the reference and variant alleles on the plus strand of GRCh37, the orientation 23andMe raw data uses. For the CYP2C19 *2 variant that's reference G and variant A, so a file line reading AG holds one copy of the variant allele. Our local package, deepdna-mcp, does that reading on the user's own computer and sends DeepDNA nothing from the file: read a 23andMe file with Claude without uploading it.

Don't read more into it than that. A metabolizer status depends on every relevant variant in the gene, on phasing and, for some genes, on copy number. A single position can't settle it, and any tool that implies otherwise overstates the evidence. The reading block helps the agent stay within that: countable is false where a position can't be read on its own (part of a haplotype, an allele that common star alleles of different function share, or an insertion or deletion), and strand_ambiguous marks A/T and C/G positions, where the letters are the same on both strands, so you can't tell which strand a file uses. For rare pathogenic variants such as those in BRCA1, SNP chips like the ones consumer tests use are unreliable: in a 2021 BMJ study of UK Biobank participants, only 4.2% of positive BRCA1/BRCA2 chip calls were confirmed by sequencing.

For star-allele and phenotype calls from a VCF, use a dedicated pipeline such as PharmCAT, then let the agent look up the guidance for the phenotype it produces. Even PharmCAT needs a separate CYP2D6 call, and array data misses rare alleles and copy-number changes. Our Python walkthrough counts CYP2C19 and SLCO1B1 marker alleles from a raw file, explains why that is not a clinical phenotype, and fetches the cited guidance.

What the Server Does Not Do

On privacy: no account, no key. We count requests: the method and tool, the gene, rsID or drug looked up, whether we had an answer, the client's name and user-agent, and a country code. We don't store IP addresses, request bodies or medication lists, and anything typed into a tool that isn't an rsID, a listed pharmacogene or a drug we cover is recorded only as "(other)", so please don't type a personal genetic result into it. The details are in our privacy policy.

Frequently Asked Questions

Is there an MCP server for pharmacogenomics?

Yes. DeepDNA's server at https://deepdna.ai/mcp is remote, free and needs no key. It returns cited drug–gene records (CPIC or DPWG where a guideline exists), gene and rsID records, and a medication screen. Community-built servers that wrap the ClinPGx API also exist; check what each one covers and how it cites its sources.

Can an AI agent tell me my metabolizer status from a 23andMe file?

Not reliably from single lookups. Metabolizer status depends on several variants, their phase and sometimes copy number. Use a pipeline built for star-allele calling, such as PharmCAT, and confirm anything that could change a prescription with a clinical test.

Does DeepDNA receive my genotype or my DNA file?

No. The tools take gene symbols, rsIDs and drug names, no tool accepts a file, and a genotype sent as an extra argument is refused and not used. Any comparison with your own data happens in your agent, outside DeepDNA. Your agent, and the AI provider running it, do see whatever file you give them.

Which drugs does it cover?

Eighty-three drug–gene pairs across 15 of its 16 genes, including clopidogrel, warfarin, simvastatin, codeine, tamoxifen, fluorouracil, capecitabine, azathioprine, mercaptopurine, tacrolimus and several antidepressants; 72 of them cite a CPIC or DPWG guideline. list_genes shows the genes, and lookup_drug_gene without a drug lists one gene's drugs.


This article is for educational purposes only and does not constitute medical advice. Pharmacogenomic guidance describes what guidelines say about genotype groups; decisions about medicines belong to a prescriber or pharmacist, ideally with a validated clinical test.

This article was created with AI assistance and reviewed by the DeepDNA editorial team.

Ask your AI agent

DeepDNA is an MCP server and API for AI agents: cited records on genes, variants and drug–gene pairs, free and open, no key. Connect it to Claude, ChatGPT, Cursor or VS Code in one step. A free local package reads the curated positions of a raw DNA file on your own computer.

Connect the MCP server

Ask your AI agent.

DeepDNA is an MCP server and API with cited records on genes, variants and drug–gene pairs. Add https://deepdna.ai/mcp to Claude, ChatGPT, Cursor or VS Code: free and open, no key, no DeepDNA account. A free local package reads the curated positions of a raw DNA file on your own computer.

Connect the MCP server
DeepDNA is an MCP server for AI agents. Free, no key. Connect