ena-biosamples-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ena-biosamples-mcp How many cattle sequencing runs are in ENA?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ena-biosamples-mcp
An MCP server that lets researchers ask questions about public genomics data in the European Nucleotide Archive (ENA) and BioSamples in plain English, from any MCP client (Claude, IDE agents, custom agents).
Question in, insight out: "How many domestic cattle samples were collected in the UK, and is their metadata good enough for a livestock project?" becomes a handful of API calls and a checked, explained answer.
Demo
1. Counting records with a country filter

2. Checking metadata against a livestock project's requirements

The second check found a real data-quality issue: the first UK "cattle" samples are rumen bacteria from an in vitro fermentation study, submitted under a metagenome checklist, so they can never carry sex or breed. Their coordinates are also written in degrees-minutes-seconds while labelled as decimal degrees.
Related MCP server: BV-BRC MCP Server
Tools
Tool | Example question | Source |
| "How many cattle sequencing runs are in ENA?" | ENA Portal API |
| "Show me cattle samples collected in the United Kingdom" | ENA Portal API |
| "What tissue and breed is sample SAMEA103957639?" | BioSamples API |
| "Does this sample have sex and breed for a FAANG-style project?" | BioSamples API |
check_sample_metadata always checks the fields ENA requires on every sample (organism,
collection date, geographic location) and accepts extra required fields per project. Each field is
reported as ok, absent, declared_missing (an INSDC missing-value term such as
"not collected") or invalid_format (e.g. a collection date that isn't ISO 8601).
Quick start
Claude desktop app (stdio)
Requires uv. Add to the MCP config and restart the app:
{
"mcpServers": {
"ena-biosamples": {
"command": "/full/path/to/uv",
"args": ["--directory", "/path/to/ena-biosamples-mcp", "run", "ena-mcp"]
}
}
}Docker (Streamable HTTP)
docker build -t ena-biosamples-mcp .
docker run --rm -p 8000:8000 ena-biosamples-mcp
# MCP endpoint: http://localhost:8000/mcpDevelopment
uv sync
uv run pytest # unit tests, no network
uv run ruff check .
uv run python scripts/smoke_live.py # live check against ENA and BioSamplesSettings can be overridden with ENA_MCP_* environment variables; see .env.example.
Design notes
Service layer. All HTTP calls live in
ena_service.pyandbiosamples_service.py. MCP tools inserver.pyonly delegate, and tests swap in a mock transport.Metadata rules are pure functions (
metadata_check.py), so consortium-specific rules can be added and tested without touching the network.Verified against the live APIs, not just the docs. Findings that shaped the code:
The ENA count endpoint returns TSV with a header line, not a bare number.
country="United Kingdom*"returns 0 results whilecountry="United Kingdom"returns 5,188, so countries are matched exactly (case-insensitive).country="*Kingdom*"returns the same 5,188, so no region-suffixed UK values are missed."cattle" resolves to the genus Bos, which also covers yak and zebu. Results carry a note telling the client to ask for a species such as Bos taurus.
Clear errors. Unknown species, private samples and wrong accession types come back as readable messages the model can relay to the user.
Roadmap
Validate coordinates (decimal degrees vs. degrees-minutes-seconds), found during the demo
Check samples against full ENA and consortium checklists (e.g. FAANG, ERGA)
Aggregate tools, e.g. samples per country or per year for a species
Response caching and polite rate limiting for bulk questions
License
MIT
Available Tools
4 toolscheck_sample_metadataA
Check whether an ENA/BioSamples sample's metadata is complete and well-formed.
Always checks the fields ENA requires on every sample (organism, collection date, geographic location). Flags fields that are absent, filled with an INSDC missing-value term (e.g. "not collected"), or badly formatted (collection date not ISO 8601).
Args: accession: BioSamples accession, e.g. "SAMEA7658521". extra_fields: Additional attributes to require, e.g. ["sex", "breed", "tissue"] for a livestock (FAANG-style) project.
Inputs: accession (required), extra_fields. Returns: fields, passed, summary, accession
count_recordsB
Count records for a species in the European Nucleotide Archive (ENA, EMBL-EBI).
Args: species: Scientific or common name, e.g. "Bos taurus" or "cattle". record_type: "read_run" (sequencing runs), "sample", or "assembly". include_subspecies: Also count subspecies and breeds under this taxon.
Inputs: species (required), record_type, include_subspecies. Returns: count, query, taxon, record_type, +1 more
get_biosampleA
Get an EMBL-EBI BioSamples record with all its attributes.
Attributes include organism, geographic location, tissue, breed and sex where submitted.
Args: accession: BioSamples accession, e.g. "SAMEA7658521". Use the accession returned by search_samples.
Inputs: accession (required). Returns: name, tax_id, accession, update_date, +2 more
search_samplesA
Find samples in the European Nucleotide Archive (ENA, EMBL-EBI) for a species.
Optionally filter by country of origin.
Returns the total number of matching samples plus up to limit records with
accession, country, collection date, first public date, submitting centre and description.
Args: species: Scientific or common name, e.g. "Bos taurus" or "cattle". country: Country name, e.g. "United Kingdom" or "Kenya". Omit for all countries. limit: Max samples to return (1-100). Default 20. include_subspecies: Also include subspecies and breeds under this taxon.
Inputs: species (required), limit, country, include_subspecies. Returns: query, taxon, samples, returned, +2 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
count_records and search_samples overlap on the species+samples axis, since search_samples already returns a total count alongside records, which could cause hesitation about which to call for a simple sample tally. Otherwise the retrieval (get_biosample) and validation (check_sample_metadata) tools are clearly distinct despite sharing an accession argument.
All four tools follow a clean verb_noun snake_case pattern (count_records, search_samples, get_biosample, check_sample_metadata) with consistent, predictable verb semantics.
Four tools is on the lean side but coherent for a focused ENA/BioSamples lookup server, covering count, search, fetch, and validate without redundancy. It could arguably support one more retrieval tool, but nothing feels bloated.
The search→get→validate lifecycle for BioSamples is well covered and closure is sensible. Minor gaps: count_records tallies read_run and assembly records but there is no way to retrieve those records, and search_samples only filters by country.
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
Public MCP endpoint for collaborative research and knowledge discovery.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceMCP server for querying BV-BRC biological data, submitting analysis jobs (assembly, annotation, BLAST, etc.), and managing workspace files via natural language.MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying and retrieving bacterial and viral genomic data, features, antimicrobial resistance, and epitopes from the BV-BRC API using natural language.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for querying the EBI PRIDE Archive, a proteomics (mass-spectrometry) data repository, through natural language or direct tool calls.272 npmMIT

@pipeworx/enaofficial
AlicenseNot gradedqualityCmaintenanceEnables searching ENA's public sequencing data by organism, study, platform, country or date, retrieving FASTQ/BAM download URLs and checksums, and discovering available result types and fields.146 npmMIT