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
Filter by division (
EnsemblVertebrates,EnsemblPlants,EnsemblFungi,EnsemblMetazoa,EnsemblProtists) ornameContainsfor a local substring match against name, display name, and common nameOmit
divisionto return the endpoint default division (vertebrates, ~356 species on the default GRCh38 endpoint)Returns internal name (the value every other tool expects), display name, common name, taxon ID, assembly, and division
Required first step — species names like
homo_sapiensare opaque to non-biologists
ensembl_lookup_gene tool
Exactly one of
symbol(+ optionalspecies, defaulthomo_sapiens),id,ids(batch, up to 20), orsymbols(batch, up to 20)expand_transcripts(defaultfalse) adds the full transcript list with biotype and canonical flagBatch modes (
ids/symbols) return asucceeded/failedsplit with per-item error strings instead of failing the callErrors:
not_found,invalid_species,no_input,conflicting_input
ensembl_get_sequence tool
type:genomic(default, includes introns),cdna(spliced),cds(coding only),proteinAccepts a stable ID (
ENSG…/ENST…/ENSP…) or a region —species:chr:start-end, or barechr:start-endwithspeciesset; a region spans at most 10,000,000 bases, with start at or below endexpand_5prime/expand_3prime(default0) extend flanking base pairs for genomic and region queriesproteinandcdsrequire a transcript or protein ID, not a gene ID; region ids are genomic-onlyReturns a bounded window:
offset(0-based, default0) andmax_length(default10000,0for the rest uncapped) index the resolved sequence, flanks includedlengthis always the full sequence length;truncatedandnextOffsetsay whether more follows and where to resume, so walkingnextOffsetreconstructs the whole sequenceErrors:
not_found,type_mismatch,missing_species,invalid_region
ensembl_query_region tool
regioninchr:start-endformat, at most 5,000,000 bases;featurearray (at least one) defaults to["gene"], also acceptstranscript,variation,regulatory,exon; optionalbiotypefilterDefaults to genes only — requesting
variationon a large locus can match 44,000+ featuresmax_resultscaps the feature list (default100,0uncapped);totalCountalways reports the true count foundassemblyName(e.g.GRCh38) names the assembly the coordinates are onExon rows carry a
parentIdandrank, since one exon is reported once per parent transcriptErrors:
invalid_region,invalid_species
ensembl_predict_variant tool
variantaccepts HGVS (transcript-relative or genomic), region+allele (chr:start:end:strand/allele), or a dbSNP rsIDmax_transcript_consequences(default10) andmax_pubmed_ids_per_variant(default10) cap large VEP results; set either to0for the full set, orinclude_all_colocated_pubmed: truefor uncapped PubMed IDsReturns most severe consequence term, per-transcript impact (HIGH/MODERATE/LOW/MODIFIER), and colocated known variants with clinical significance
Totals (
transcriptConsequencesTotal,pubmedTotal) are always reported even when cappedErrors:
invalid_notation,not_found
ensembl_get_homology tool
Exactly one of
symbol(+species, defaulthomo_sapiens) orid; optionaltarget_speciesfiltertype:orthologues(default),paralogues, orallmax_resultscaps the homolog list (default25,0uncapped);totalCountalways reports the true count availableErrors:
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)Uses the
xrefs/idendpoint, returning the full cross-reference set (56+ entries for well-annotated genes like BRCA2)Errors:
not_found
ensembl://gene/{id} resource
Returns location, biotype, description, and transcript list for a gene stable ID (
ENSG…); version suffix optionalErrors:
not_found
ensembl://transcript/{id} resource
Returns parent gene, location, biotype, canonical flag, and length for a transcript stable ID (
ENST…); version suffix optionalErrors:
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, orEnsemblProtists
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) |
|
| 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)
Bioinformatics MCP for genomic variant interpretation, gene-disease evidence and literature.
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.25ISC
- AlicenseNot gradedqualityAmaintenanceEnables querying ClinGen curated evidence for gene-disease validity, dosage, actionability, and variant pathogenicity via MCP tools.MIT