ensembl-mcp-server
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., "@ensembl-mcp-serverlook up the gene BRCA2 in human"
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.
Public Hosted Server: https://ensembl.caseyjhand.com/mcp
Overview
Gene, sequence, and variant data for vertebrates and other model organisms from the Ensembl REST API. Look up genes, fetch sequences, predict variant consequences, find orthologs, and cross-reference external databases from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Tools
Tool | Description |
| List species supported by Ensembl with display name, common name, assembly, taxon ID, and division |
| Resolve a gene by symbol + species or by stable ID to its Ensembl ID, genomic location, biotype, and transcript list |
| Fetch the DNA, cDNA, CDS, or protein sequence for a gene, transcript, protein, or genomic region |
| Find genomic features (genes, transcripts, variants, regulatory elements, exons) overlapping a chromosomal region |
| Predict functional consequences of a sequence variant using the Ensembl Variant Effect Predictor (VEP) |
| Find orthologs and/or paralogs of a gene across species with percent identity and taxonomy level |
| Retrieve cross-database references for a gene — HGNC, UniProt, EntrezGene, OMIM, RefSeq, Reactome, and others |
Resources
Resource | Description |
| Gene record by stable ID ( |
| Transcript record by stable ID ( |
| Supported Ensembl species for the endpoint default division (vertebrates on the default endpoint) |
| Supported species in one division ( |
All resource data is also reachable via the ensembl_list_species tool, which additionally filters by name.
Prompts
Prompt | Description |
| Structured workflow for assembling a complete gene profile: symbol → ID + location → sequence → variants → orthologs → xrefs |
Related MCP server: Ensembl MCP Server
Capability reference
ensembl_list_species tool
Optional
division(EnsemblVertebrates,EnsemblPlants,EnsemblFungi,EnsemblMetazoa,EnsemblProtists; omitted, the endpoint default — vertebrates, ~356 species on GRCh38) andnameContains, a substring match against name, display name, and common nameReturns the internal name every other tool expects (
homo_sapiens), plus display name, common name, taxon ID, assembly, and division
ensembl_lookup_gene tool
Exactly one of
symbol(+species, defaulthomo_sapiens),id,ids, orsymbols(batches up to 20);expand_transcripts(defaultfalse) adds the transcript list with biotype and canonical flagA single lookup returns
gene; a batch returns asucceeded/failedsplit with per-item errors instead of failing the call. Errors:not_found,invalid_species,no_input,conflicting_input
ensembl_get_sequence tool
A stable ID (
ENSG…/ENST…/ENSP…) or a region (species:chr:start-end, orchr:start-endwithspecies; at most 10,000,000 bases);typeisgenomic(default),cdna,cds, orprotein, the last three from a transcript or protein ID only;expand_5prime/expand_3primeadd flanking basesReturns a window set by
offset(default0) andmax_length(default10000,0uncapped);lengthis the full sequence length, andtruncated/nextOffsetsay where to resumeErrors:
not_found,type_mismatch,missing_species,invalid_region
ensembl_query_region tool
speciesandregion(chr:start-end, at most 5,000,000 bases);featuredefaults to["gene"]and also acceptstranscript,variation,regulatory,exon; optionalbiotypefiltermax_resultscaps the list (default100,0uncapped) whiletotalCountreports the true count;assemblyNamenames the coordinates' assembly, and exon rows carryparentIdandrank. Errors:invalid_region,invalid_species
ensembl_predict_variant tool
variantas HGVS (transcript-relative or genomic), region+allele (chr:start:end:strand/allele), or a dbSNP rsIDReturns the most severe consequence, per-transcript impact (HIGH/MODERATE/LOW/MODIFIER), and colocated known variants with clinical significance. Errors:
invalid_notation,not_foundmax_transcript_consequencesandmax_pubmed_ids_per_variant(default10each,0uncapped;include_all_colocated_pubmedlifts the PubMed cap) bound the result, whiletranscriptConsequencesTotalandpubmedTotalreport the full counts
ensembl_get_homology tool
Exactly one of
symbol(+species, defaulthomo_sapiens) orid;typeisorthologues(default),paralogues, orall; optionaltarget_speciesfiltermax_resultscaps the list (default25,0uncapped) whiletotalCountreports the true count. Errors:not_found,no_input,conflicting_input
ensembl_get_xrefs tool
id(ENSG…/ENST…) required; optionaldbnamefilter (e.g.HGNC,Uniprot_gn,EntrezGene,MIM_GENE,RefSeq_mRNA,Reactome,GO)Returns the full cross-reference set (56+ entries for a well-annotated gene such as BRCA2). Errors:
not_found
ensembl://gene/{id} resource
idis a gene stable ID (ENSG…); version suffix optionalReturns location, biotype, description, and transcript list. Errors:
not_found
ensembl://transcript/{id} resource
idis a transcript stable ID (ENST…); version suffix optionalReturns parent gene, location, biotype, canonical flag, and length. Errors:
not_found
ensembl://species resource
No parameters — returns the endpoint default division (vertebrates, ~356 species on the default GRCh38 endpoint)
For a named division, read
ensembl://species/{division}instead
ensembl://species/{division} resource
divisionrequired:EnsemblVertebrates,EnsemblPlants,EnsemblFungi,EnsemblMetazoa, orEnsemblProtistsReturns that division's species — internal name, display name, assembly, taxon ID, and division
ensembl_gene_dossier prompt
Arguments:
gene_symbolrequired;speciesoptional (defaulthomo_sapiens)Sequences a 7-step workflow: resolve the gene → fetch the protein sequence → find variants in the locus → predict variant consequences → find cross-species orthologs → get external database IDs → synthesize the dossier
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Ensembl-specific:
Keyless REST API — no API key required; Ensembl REST is fully public at 55,000 req/hr
Rate-limit-aware service layer: retries 429 honoring
Retry-After, and retries transient 5xx and HTML error pagesBatch POST endpoints used throughout —
POST /lookup/idandPOST /lookup/symbol/{species}(up to 1,000 items each upstream) reduce N+1 round trips in multi-gene workflowsGRCh37 legacy support via
ENSEMBL_BASE_URL— point the entire server athttps://grch37.rest.ensembl.orgfor clinical workflows on the older assemblyAll coordinate-bearing responses echo the assembly name so agents never see a bare genomic position without assembly context
Agent-friendly output:
ensembl_get_sequencereturns sequences in bounded windows (10,000 characters by default) with the full length and anextOffsetto continue, so a long gene or locus never lands in one response unaskedensembl_list_speciesis explicitly the discovery step — tool descriptions call out the opaque internal-name format and direct agents to it before using species-dependent toolsCross-tool chaining made explicit: xref IDs from
ensembl_get_xrefsare described as inputs for protein and literature servers; theensembl_gene_dossierprompt sequences all 6 tools into one research workflow
Getting started
Public Hosted Instance
A public instance is available at https://ensembl.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"ensembl-mcp-server": {
"type": "streamable-http",
"url": "https://ensembl.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"ensembl-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/ensembl-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"ensembl-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/ensembl-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"ensembl-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/ensembl-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
No API key required — Ensembl REST is fully public.
Installation
Clone the repository:
git clone https://github.com/cyanheads/ensembl-mcp-server.gitNavigate into the directory:
cd ensembl-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env if you need to override ENSEMBL_BASE_URL (e.g. for GRCh37)Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
Variable | Description | Default |
| Ensembl REST API base URL. Override for GRCh37 ( |
|
| Transport: |
|
| HTTP server port |
|
| HTTP endpoint path |
|
| HTTP session mode: |
|
| Authentication: |
|
| Log level ( |
|
| Directory for log files (Node.js only) |
|
| Log each failed tool call's arguments and result, redacted by key name and capped at |
|
| Enable OpenTelemetry |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t ensembl-mcp-server .
docker run --rm -p 3010:3010 ensembl-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/ensembl-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod |
| Tool definitions ( |
| Resource definitions ( |
| Prompt definitions ( |
| Ensembl REST API client — HTTP, rate-limit handling, retry, error normalization |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources in the
createApp()arrays insrc/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
UMLS MCP — wraps the NLM UMLS Terminology Services REST API (uts-ws.nlm.nih.gov/rest)
Official STRING database MCP server. Query for protein-protein interactions, enrichment, annotations, homology, and PPI networks.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing LLMs with access to the Ensembl genomics database, enabling AI assistants to query gene information, sequences, variants, and other genomic data across multiple species.108JavaScriptMIT
- FlicenseAqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server that provides access to the Ensembl REST API for genomic data, comparative genomics, and biological annotations.193-
- AlicenseBqualityDmaintenanceProvides access to the Ensembl genomics REST API with 30+ tools for genomic data including gene lookup, sequence retrieval, genetic variants, cross-species homology, phenotypes, and regulatory features.2597 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables querying ClinGen curated evidence for gene-disease validity, dosage, actionability, and variant pathogenicity via MCP tools.MIT