Ensembl Server
БесплатноНе проверенEnables looking up genes, fetching sequences, predicting variant consequences, finding orthologs, and cross-database xrefs via Ensembl REST API through MCP.
Описание
Enables looking up genes, fetching sequences, predicting variant consequences, finding orthologs, and cross-database xrefs via Ensembl REST API through MCP.
README
@cyanheads/ensembl-mcp-server
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
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 |
|---|---|
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 |
Resources
| 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.
Prompts
| Prompt | Description |
|---|---|
ensembl_gene_dossier |
Structured workflow for assembling a complete gene profile: symbol → ID + location → sequence → variants → orthologs → xrefs |
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 name - Omit
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 flag- Batch modes (
ids/symbols) return asucceeded/failedsplit with per-item error strings instead of failing the call - Errors:
not_found,invalid_species,no_input,conflicting_input
ensembl_get_sequence tool
type:genomic(default, includes introns),cdna(spliced),cds(coding only),protein- Accepts a stable ID (
ENSG…/ENST…/ENSP…) or a region —species:chr:start-end, or barechr:start-endwithspeciesset expand_5prime/expand_3prime(default0) extend flanking base pairs for genomic and region queriesproteinandcdsrequire a transcript or protein ID, not a gene ID- Every response states
lengthso callers can budget context before consuming large sequences - Errors:
not_found,type_mismatch,missing_species
ensembl_query_region tool
regioninchr:start-endformat;featurearray defaults to["gene"], also acceptstranscript,variation,regulatory,exon; optionalbiotypefilter- Defaults to genes only — requesting
variationon a large locus can return 44,000+ features - Exon rows carry a
parentIdandrank, since one exon is reported once per parent transcript - Errors:
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 IDs- Returns 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 capped - Errors:
invalid_notation,not_found
ensembl_get_homology tool
- Exactly one of
symbol(+species, defaulthomo_sapiens) orid; optionaltarget_speciesfilter type:orthologues(default),paralogues, orallmax_resultscaps the homolog list (default25,0uncapped);totalCountalways reports the true count available- 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)- 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 optional - Errors:
not_found
ensembl://transcript/{id} resource
- Returns parent gene, location, biotype, canonical flag, and length for a transcript stable ID (
ENST…); version suffix optional - 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, 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: tracks
x-ratelimit-remaining, retries 429 withRetry-After, and retries transient 5xx - Batch POST endpoints used throughout —
POST /lookup/id(up to 50 IDs) andPOST /lookup/symbol/{species}reduce N+1 round trips in multi-gene workflows - GRCh37 legacy support via
ENSEMBL_BASE_URL— point the entire server athttps://grch37.rest.ensembl.orgfor clinical workflows on the older assembly - All coordinate-bearing responses echo the assembly name so agents never see a bare genomic position without assembly context
Agent-friendly output:
- Sequence character count stated on every
ensembl_get_sequenceresponse so callers can budget context before consuming large genomic sequences ensembl_list_speciesis explicitly the discovery step — tool descriptions call out the opaque internal-name format and direct agents to it before using species-dependent tools- Cross-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/mcp
Prerequisites
- 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.git
- Navigate into the directory:
cd ensembl-mcp-server
- Install dependencies:
bun install
- Configure 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_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.
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-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.
Project structure
| 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/ |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools and resources in the
createApp()arrays insrc/index.ts - Wrap 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 test
License
Apache-2.0 — see LICENSE for details.
Установка Ensembl Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/cyanheads/ensembl-mcp-serverFAQ
Ensembl Server MCP бесплатный?
Да, Ensembl Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Ensembl Server?
Нет, Ensembl Server работает без API-ключей и переменных окружения.
Ensembl Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Ensembl Server в Claude Desktop, Claude Code или Cursor?
Открой Ensembl Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolRedis
Interact with Redis key-value stores.
автор: modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
автор: modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
автор: raw-labstadas-github/a2asearch-mcp
MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access
автор: tadas-githubjulien040/anyquery
Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi
автор: julien040drakonkat/wizzy-mcp-tmdb
A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.
автор: drakonkatCompare Ensembl Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
