Ensembl REST API MCP
Genomics data lookups (genes, sequences, variant effect prediction, homology) proxied from the public Ensembl REST API via Kong's OpenAPI-to-MCP conversion wrapper.
MCP endpoint: https://gateway.aihub.a-star.edu.sg/ensembl
Upstream: https://rest.ensembl.org
Auth required: none (open route)
Tools
lookup-id
Look up an Ensembl stable ID (gene, transcript, protein, exon) and return its metadata
- Method:
GET - Upstream path:
/ensembl/lookup/id/{id}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| id | path | True | string | Ensembl stable ID, e.g. ENSG00000157764 |
| species | query | False | string | Species name |
| expand | query | False | integer | Expand to include immediate children (1 or 0) |
lookup-symbol
Look up a gene/feature by external symbol, e.g. BRCA2
- Method:
GET - Upstream path:
/ensembl/lookup/symbol/{species}/{symbol}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| species | path | True | string | Species name, e.g. human |
| symbol | path | True | string | Gene symbol, e.g. BRCA2 |
| expand | query | False | integer | Expand to include immediate children (1 or 0) |
sequence-by-id
Fetch the sequence for an Ensembl stable ID
- Method:
GET - Upstream path:
/ensembl/sequence/id/{id}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| id | path | True | string | Ensembl stable ID |
| type | query | False | string | One of genomic, cds, cdna, protein |
sequence-by-region
Fetch the genomic sequence for a region
- Method:
GET - Upstream path:
/ensembl/sequence/region/{species}/{region}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| species | path | True | string | Species name, e.g. human |
| region | path | True | string | Region string chr:start-end |
xrefs-for-id
Return external database cross-references for an Ensembl stable ID
- Method:
GET - Upstream path:
/ensembl/xrefs/id/{id}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| id | path | True | string | Ensembl stable ID |
overlap-region
List features overlapping a genomic region
- Method:
GET - Upstream path:
/ensembl/overlap/region/{species}/{region}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| species | path | True | string | Species name, e.g. human |
| region | path | True | string | Region string chr:start-end, e.g. 7:140424943-140624564 |
| feature | query | True | string | Feature type, e.g. gene, transcript, exon, cds, variation, regulatory |
vep-hgvs
Predict the functional consequences of a variant given in HGVS notation
- Method:
GET - Upstream path:
/ensembl/vep/{species}/hgvs/{hgvs_notation}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| species | path | True | string | Species name, e.g. human |
| hgvs_notation | path | True | string | HGVS variant notation |
homology-for-id
Return homologues (orthologues/paralogues) for an Ensembl gene ID
- Method:
GET - Upstream path:
/ensembl/homology/id/{id}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| id | path | True | string | Ensembl gene stable ID |
| target_species | query | False | string | Restrict results to this species |
| type | query | False | string | One of orthologues, paralogues, all |
info-species
List all species available in this Ensembl REST API instance
- Method:
GET - Upstream path:
/ensembl/info/species
info-assembly
Return current genome assembly information for a species
- Method:
GET - Upstream path:
/ensembl/info/assembly/{species}
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
| species | path | True | string | Species name, e.g. human |
Example usage
# 1. Initialize the MCP session
SID=$(curl -s -X POST https://gateway.aihub.a-star.edu.sg/ensembl \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2026-06-18","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}' \
-D - -o /dev/null --max-time 20 | grep -i mcp-session-id | tr -d '\r' | awk '{print $2}')
# 2. Call the "lookup-id" tool
curl -s -X POST https://gateway.aihub.a-star.edu.sg/ensembl \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: $SID" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"lookup-id","arguments":{"path_id": "..."}}}'