rewire.it

Genomics MCP: genomic data access for AI agents

Genomics MCP is a local MCP server that gives AI agents bounded, provenance-tracked access to real genomic data: discover public files, then read bounded regions from bigWig, BAM, CRAM and VCF. Includes a case study where Claude used only its tools to compare BCL11A enhancer signal across 26 public ENCODE files.

GitHub: rewire-bio/genomics-mcp

Genomics MCP is a local Model Context Protocol server that gives an AI agent bounded, provenance-tracked access to real genomic data: a 1 kb window of a public bigWig, a region of an indexed BAM, a variant's ClinVar record. Every result records where it came from.1 I'm building it at rewire-bio with Claude Code.

To test it, I had Claude (claude-opus-5) answer a predeclared question about the BCL11A intron-2 erythroid enhancer (+58) using only this server's 23 tools. In 14.4 minutes it read 182 values from 26 public ENCODE DNase-seq files, and an independent, model-free replay matched every one.2 Every late erythroid culture file showed more +58 signal than every non-erythroid reference file, reproducing known biology in one donor's culture rather than revealing anything new.

What an agent can get

The 23 tools, in five groups, give an agent three kinds of access:1

  • Discovery across EGA, ENA (including SRA accessions), ENCODE, GEO and NCBI Datasets, with sample metadata exactly as the archive supplies it.
  • Bounded reads from indexed files such as bigWig, BAM/CRAM and VCF, with an explicit assembly and 0-based half-open coordinates.
  • Reference evidence from HGNC, Ensembl, ClinVar, gnomAD, UniProt and Open Targets.

The server tests range support first: it asks for one byte and expects a 206, and a plain 200 marks the file download_required.3 Every result carries a status (ok, partial or error), provenance and any truncation, and an unexpected failure is an error, never an empty success.4 Each query stays bounded: by default 1 Mb regions, 1 MiB responses and a 30 s deadline, and local file access is limited to the folders you allow.1

Install and a first query

There is no PyPI package (as of 28 September 2026). From source, on macOS arm64 or Linux x86_64, you need Python 3.12, uv, a C compiler, and libcurl and zlib headers so that pyBigWig can read remote files:5

git clone https://github.com/rewire-bio/genomics-mcp
cd genomics-mcp && git checkout v0.1.0
uv sync --locked --no-dev
uv run --no-dev genomics-mcp --check-config
claude mcp add genomics -e GENOMICS_MCP_ALLOWED_ROOTS=/path/to/your/data \
  -- uv --directory "$PWD" run --no-dev genomics-mcp

--check-config should report "server_version": "0.1.0". GENOMICS_MCP_ALLOWED_ROOTS lists the local folders the server may read; public HTTPS data needs no configuration. claude mcp add registers the server for the current folder only; add --scope user to use it anywhere.

For example, asked "What is the mean signal of ENCODE file ENCFF648LHT over GRCh38 chr2:[60494504, 60495504)?", an agent would issue a get_signal call like this one:

{"file": {"uri": "https://encode-public.s3.amazonaws.com/2020/11/06/27ced81a-82ce-4998-8f14-004195eb958f/ENCFF648LHT.bigWig",
          "format": "bigwig", "assembly": "GRCh38", "source": "encode",
          "accession": "ENCFF648LHT", "visibility": "public"},
 "interval": {"contig": "chr2", "start": 60494504, "end": 60495504, "assembly": "GRCh38"}}

The result, trimmed and flattened:

{"status": "ok",
 "summary": {"type": "mean", "value": 0.03655854641646147, "exact": true},
 "provenance": [{"method": "pyBigWig 0.3.26 stats(exact=True) via HTTP byte ranges"}]}

Case study: the BCL11A enhancer

The BCL11A intron-2 enhancer is a test with a known answer. Bauer and colleagues named its DNase I hypersensitive sites +55, +58 and +62 in primary human erythroblasts, and showed by deleting the orthologous enhancer in mouse cell lines that it is required in erythroid but not B-lymphoid cells.6 The therapy CASGEVY edits a GATA1 binding site in this erythroid-specific enhancer region.7 Within the enhancer, Canver and colleagues found that deleting +58 alone in the human erythroid line HUDEP-2 phenocopied deleting the whole enhancer.8

A separate Claude Code session wrote and committed the protocol before any target window was read; the agent under test only ran it.2 The protocol fixed 26 ENCODE4 bigWig files on GRCh38: twenty from one adult donor's CD34+ progenitors in erythroid culture (day 0 to day 20), and six references from GM12878, HepG2, CD14+ monocytes and K562. It also fixed the windows: 1 kb over each hypersensitive site, the BCL11A and GAPDH promoters, and two background windows. The agent resolved coordinates, batched and retried its 29 calls over 14.4 minutes, and wrote the interpretation.

BCL11A +58 enhancer signal in 26 ENCODE DNase-seq files, in three panels (raw signal, signal over local background, signal over the GAPDH promoter); every late erythroid file sits above every non-erythroid reference in all three The E58 window in 26 public ENCODE DNase-seq files, read by the agent over MCP. Panels: raw signal, E58 over local background, and E58 over the GAPDH promoter, on log axes. Each point is one file; all time-course files come from one adult donor, so replicates are not independent donors, and no statistical test was done. Marker shape shows ENCODE's SPOT audit flag. Data: ENCODE9; values from the case study, all 182 cells replay-verified.2

The predeclared lineage contrast compares the 11 late erythroid files (days 11-20) against the 5 non-erythroid references: no ranges overlap on any of the enhancer measures. An independent, model-free replay script re-read all 182 cells directly with pyBigWig and matched every value the agent reported.2 The agent's measured values and contrasts were correct; its prose was not: it miscounted its own calls and misdescribed parts of the day-by-day trend, a reminder that an agent's narrative summary needs the same scrutiny as any other claim, even when the underlying numbers check out.

Some caveats limit what this shows. It is one donor's in vitro culture, not independent donors or a population; ENCODE flags several of the erythroid-culture and reference files for low or extremely low SPOT scores;9 and K562 comes from another lab, protocol and pipeline, so it sits outside the contrast. One case study does not establish general reliability across other loci, datasets or agent models. Full metrics, the day-by-day results table, the run's retry log, and the replay script are in the public case-study repository.2

Try it

Install v0.1.0 and ask your agent for the E58 mean of ENCFF648LHT above; the tool should return 0.03655854641646147. The full case study, including the protocol, transcript, tool-call log and replay script, is public at examples/agent-case-study.2

If you try Genomics MCP, I'd like to hear what you build with it.

References

Footnotes

  1. rewire-bio. Genomics MCP README (23 tools in five groups; limits, scope, credentials; local only). https://github.com/rewire-bio/genomics-mcp/blob/87d30236460d4d3a95c4ff6df98e53de2e8a5ceb/README.md ; repository: https://github.com/rewire-bio/genomics-mcp ; v0.1.0 release: https://github.com/rewire-bio/genomics-mcp/releases/tag/v0.1.0 ↩ ↩2 ↩3

  2. rewire-bio. Genomics MCP agent case study: protocol (commit c30f740), transcript, tool calls, ENCODE audits, results, the model's unedited report with corrections, and replay script. Merged to main at commit 472955c379341b8b4c7cff623ff14e0b0de424b0; not in the v0.1.0 tag. https://github.com/rewire-bio/genomics-mcp/tree/main/examples/agent-case-study ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  3. rewire-bio. Genomics MCP: data access (range probing, download_required). https://github.com/rewire-bio/genomics-mcp/blob/87d30236460d4d3a95c4ff6df98e53de2e8a5ceb/docs/data-access.md ↩

  4. rewire-bio. Genomics MCP: product requirements (result envelope and error semantics). https://github.com/rewire-bio/genomics-mcp/blob/87d30236460d4d3a95c4ff6df98e53de2e8a5ceb/PRD.md ↩

  5. rewire-bio. Genomics MCP: installation and tested platforms (container and MCPB tested on Linux amd64 only). https://github.com/rewire-bio/genomics-mcp/blob/87d30236460d4d3a95c4ff6df98e53de2e8a5ceb/docs/install.md ↩

  6. Bauer DE et al. (2013). An erythroid enhancer of BCL11A subject to genetic variation determines fetal hemoglobin level. Science 342(6155):253-257. Sites named from DNase hypersensitivity in primary human erythroblasts; the erythroid versus B-lymphoid loss-of-function test deleted the orthologous mouse enhancer in mouse MEL and pre-B lines. https://pubmed.ncbi.nlm.nih.gov/24115442/ (full text: https://pmc.ncbi.nlm.nih.gov/articles/PMC4018826/) ↩

  7. Vertex Pharmaceuticals / US FDA. CASGEVY (exagamglogene autotemcel) prescribing information, 07/2026 revision. Section 11 DESCRIPTION describes editing at a GATA1 binding site in the erythroid-specific enhancer region of BCL11A; the label does not name a specific hypersensitive site. https://www.fda.gov/media/174615/download ↩

  8. Canver MC et al. (2015). BCL11A enhancer dissection by Cas9-mediated in situ saturating mutagenesis. Nature 527(7577):192-197. Deletion results from HUDEP-2 clones; the paper notes that only loss-of-function studies can show an enhancer is required. https://pubmed.ncbi.nlm.nih.gov/26375006/ (full text: https://pmc.ncbi.nlm.nih.gov/articles/PMC4644101/) ↩

  9. ENCODE Project. DNase-seq experiments (GRCh38); records and audits as of 2026-09-28. Erythroid time course, donor ENCDO937OUY: https://www.encodeproject.org/experiments/ENCSR098PTC/ , https://www.encodeproject.org/experiments/ENCSR148VUP/ , https://www.encodeproject.org/experiments/ENCSR564JUY/ , https://www.encodeproject.org/experiments/ENCSR845CFB/ , https://www.encodeproject.org/experiments/ENCSR420NOA/ , https://www.encodeproject.org/experiments/ENCSR855FOP/ , https://www.encodeproject.org/experiments/ENCSR937UWI/ , https://www.encodeproject.org/experiments/ENCSR362JSZ/ , https://www.encodeproject.org/experiments/ENCSR493IAY/ , https://www.encodeproject.org/experiments/ENCSR115YPI/ . GM12878: https://www.encodeproject.org/experiments/ENCSR000EMT/ . HepG2: https://www.encodeproject.org/experiments/ENCSR149XIL/ . CD14+ monocyte: https://www.encodeproject.org/experiments/ENCSR000EPK/ . K562: https://www.encodeproject.org/experiments/ENCSR000EKS/ ↩ ↩2

Frequently asked

How do I install Genomics MCP for Claude Code?
Clone the repository, check out v0.1.0, run uv sync --locked --no-dev and register it with claude mcp add. You need Python 3.12, uv, a C compiler, and libcurl and zlib headers; there was no PyPI package as of 28 September 2026.
Does the server download whole genomic files?
Not for indexed files such as bigWig, BAM and VCF. It first checks that the host honours HTTP range requests, then reads only the requested region.
Did the AI agent choose the question or the data?
No. A separate Claude Code session wrote the protocol, including the question, 26 file URLs, windows and metrics, before any target window was read. The agent resolved coordinates, batched and retried calls, and interpreted the results.
What did the BCL11A case study show?
In 26 public ENCODE DNase-seq files, every late erythroid culture file had more +58 enhancer signal than every non-erythroid reference file. That reproduces known biology in one donor's culture; it is not a discovery or causal evidence. Full metrics, retry logs and the replay script are in the public case-study repository.
How can I check the agent's numbers myself?
Check out main, where the example lives, and run the offline replay script on the saved run; it reports 182 of 182 values matched. You can also re-read any window yourself with pyBigWig over HTTPS range requests.

Help improve this article

Found an error or a better source? Leave a note here, or highlight a passage to comment on it.