Look up genes, sequences, variants, homologs, and cross-database xrefs from Ensembl REST.
Look up genes, fetch sequences, predict variant consequences, find orthologs, and retrieve cross-database xrefs from Ensembl REST via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://ensembl.caseyjhand.com/mcp
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.
| Tool | Description |
|---|---|
ensembl_list_species | List species supported by Ensembl with display name, common name, assembly, taxon ID, and division |
ensembl_lookup_gene | Resolve a gene by symbol + species or by stable ID to its Ensembl ID, genomic location, biotype, and transcript list |
ensembl_get_sequence | Fetch the DNA, cDNA, CDS, or protein sequence for a gene, transcript, protein, or genomic region |
ensembl_query_region | Find genomic features (genes, transcripts, variants, regulatory elements, exons) overlapping a chromosomal region |
ensembl_predict_variant | Predict functional consequences of a sequence variant using the Ensembl Variant Effect Predictor (VEP) |
ensembl_get_homology | Find orthologs and/or paralogs of a gene across species with percent identity and taxonomy level |
ensembl_get_xrefs | Retrieve cross-database references for a gene — HGNC, UniProt, EntrezGene, OMIM, RefSeq, Reactome, and others |
| Resource | Description |
|---|---|
ensembl://gene/{id} | Gene record by stable ID (ENSG…) — location, biotype, description, and transcript list |
ensembl://transcript/{id} | Transcript record by stable ID (ENST…) — parent gene, location, biotype, canonical flag, and length |
ensembl://species | Supported Ensembl species for the endpoint default division (vertebrates on the default endpoint) |
ensembl://species/{division} | Supported species in one division (EnsemblVertebrates, EnsemblPlants, EnsemblFungi, EnsemblMetazoa, EnsemblProtists) |
All resource data is also reachable via the ensembl_list_species tool, which additionally filters by name.
| Prompt | Description |
|---|---|
ensembl_gene_dossier | Structured workflow for assembling a complete gene profile: symbol → ID + location → sequence → variants → orthologs → xrefs |
ensembl_list_species toolEnsemblVertebrates, EnsemblPlants, EnsemblFungi, EnsemblMetazoa, EnsemblProtists) or nameContains for a local substring match against name, display name, and common namedivision to return the endpoint default division (vertebrates, ~356 species on the default GRCh38 endpoint)homo_sapiens are opaque to non-biologistsensembl_lookup_gene toolsymbol (+ optional species, default homo_sapiens), id, ids (batch, up to 20), or symbols (batch, up to 20)expand_transcripts (default false) adds the full transcript list with biotype and canonical flagids/symbols) return a succeeded/failed split with per-item error strings instead of failing the callnot_found, invalid_species, no_input, conflicting_inputensembl_get_sequence tooltype: genomic (default, includes introns), cdna (spliced), cds (coding only), proteinENSG…/ENST…/ENSP…) or a region — species:chr:start-end, or bare chr:start-end with species setexpand_5prime / expand_3prime (default 0) extend flanking base pairs for genomic and region queriesprotein and cds require a transcript or protein ID, not a gene IDlength so callers can budget context before consuming large sequencesnot_found, type_mismatch, missing_speciesensembl_query_region toolregion in chr:start-end format; feature array defaults to ["gene"], also accepts transcript, variation, regulatory, exon; optional biotype filtervariation on a large locus can return 44,000+ featuresparentId and rank, since one exon is reported once per parent transcriptinvalid_region, invalid_speciesensembl_predict_variant toolvariant accepts HGVS (transcript-relative or genomic), region+allele (chr:start:end:strand/allele), or a dbSNP rsIDmax_transcript_consequences (default 10) and max_pubmed_ids_per_variant (default 10) cap large VEP results; set either to 0 for the full set, or include_all_colocated_pubmed: true for uncapped PubMed IDstranscriptConsequencesTotal, pubmedTotal) are always reported even when cappedinvalid_notation, not_foundensembl_get_homology toolsymbol (+ species, default homo_sapiens) or id; optional target_species filtertype: orthologues (default), paralogues, or allmax_results caps the homolog list (default 25, 0 uncapped); totalCount always reports the true count availablenot_found, no_input, conflicting_inputensembl_get_xrefs toolid (ENSG…/ENST…) required; optional dbname filter (e.g. HGNC, Uniprot_gn, EntrezGene, MIM_GENE, RefSeq_mRNA, Reactome, GO)xrefs/id endpoint, returning the full cross-reference set (56+ entries for well-annotated genes like BRCA2)not_foundensembl://gene/{id} resourceENSG…); version suffix optionalnot_foundensembl://transcript/{id} resourceENST…); version suffix optionalnot_foundensembl://species resourceensembl://species/{division} insteadensembl://species/{division} resourcedivision required: EnsemblVertebrates, EnsemblPlants, EnsemblFungi, EnsemblMetazoa, or EnsemblProtistsensembl_gene_dossier promptgene_symbol required; species optional (default homo_sapiens)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:
x-ratelimit-remaining, retries 429 with Retry-After, and retries transient 5xxPOST /lookup/id (up to 50 IDs) and POST /lookup/symbol/{species} reduce N+1 round trips in multi-gene workflowsENSEMBL_BASE_URL — point the entire server at https://grch37.rest.ensembl.org for clinical workflows on the older assemblyAgent-friendly output:
ensembl_get_sequence response so callers can budget context before consuming large genomic sequencesensembl_list_species is explicitly the discovery step — tool descriptions call out the opaque internal-name format and direct agents to it before using species-dependent toolsensembl_get_xrefs are described as inputs for protein and literature servers; the ensembl_gene_dossier prompt sequences all 6 tools into one research workflowA 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"
}
}
}
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/mcp
git clone https://github.com/cyanheads/ensembl-mcp-server.git
cd ensembl-mcp-server
bun install
cp .env.example .env
# edit .env if you need to override ENSEMBL_BASE_URL (e.g. for GRCh37)
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
| Variable | Description | Default |
|---|---|---|
ENSEMBL_BASE_URL | Ensembl REST API base URL. Override for GRCh37 (https://grch37.rest.ensembl.org) or a local mirror. | https://rest.ensembl.org |
MCP_TRANSPORT_TYPE | Transport: stdio or http | stdio |
MCP_HTTP_PORT | HTTP server port | 3010 |
MCP_HTTP_ENDPOINT_PATH | HTTP endpoint path | /mcp |
MCP_SESSION_MODE | HTTP session mode: auto, stateful, or stateless. Schema default auto resolves to stateful; this server explicitly uses stateless. | stateless |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.) | info |
LOGS_DIR | Directory for log files (Node.js only) | <project-root>/logs |
OTEL_ENABLED | Enable OpenTelemetry | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run 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 build -t ensembl-mcp-server .
docker run --rm -p 3010:3010 ensembl-mcp-server
The 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.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources/prompts and inits services |
src/config | Server-specific environment variable parsing and validation with Zod |
src/mcp-server/tools | Tool definitions (*.tool.ts) — 7 tools |
src/mcp-server/resources | Resource definitions (*.resource.ts) — gene, transcript, species |
src/mcp-server/prompts | Prompt definitions (*.prompt.ts) — gene dossier workflow |
src/services/ensembl | Ensembl REST API client — HTTP, rate-limit handling, retry, error normalization |
tests/ | Unit and integration tests mirroring src/ |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagecreateApp() arrays in src/index.tsIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/ensembl-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-ensembl-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/ensembl-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/ensembl-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.