mcpField
🧬
🧬 Ensembl API MCP Server

🧬 Ensembl API MCP Server

本地服务
github.com/effieklimi开发工具837 周前更新

关于 🧬 Ensembl API MCP Server

Ensembl API MCP Server 将 Ensembl REST API 按生物学任务整合为面向研究人员的工具。它涵盖基因、序列、变异、比较基因组学和分类学等数据查询。

主要功能

  1. 01查询基因及跨物种信息
  2. 02检索 DNA、RNA 和蛋白质序列
  3. 03查找变异及其注释
  4. 04转换基因组与转录本坐标
  5. 05查询同源关系和基因树
  6. 06检索本体术语及分类信息

适用场景

  1. 01按基因 ID 或符号查找基因信息
  2. 02获取指定区域的 DNA 序列
  3. 03分析变异效应和表型关联
  4. 04比较物种间的同源基因

MCP 相关

该 MCP 服务将 Ensembl REST API 的功能封装为 10 个按任务划分的工具,供 MCP 客户端查询基因、序列、变异及比较基因组学等数据。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"ensembl": {
"command": "npx",
"args": [
"-y",
"@smithery/cli"
]
}
}
}
启动命令npx -y @smithery/cli

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@smithery/cli

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

🧬 Ensembl API MCP 服务

smithery badge

一款功能齐全的模型上下文协议(MCP)服务,可调用 Ensembl 的 REST API。使用 TypeScript MCP SDK 构建。

  • 全面覆盖 – 10 个工具按功能领域划分,而非拆分成 100 多个独立端点,同时仍覆盖几乎整个 API。
  • 可用于生产环境 – 全程使用 TypeScript,具备稳健的错误处理和整洁的 API 客户端层。
  • 方便生物学家使用 – 按生物学任务(基因、变异、compara……)分组,而非按底层 REST 路径分组。

收录于:


使用场景:

  • 🧬 基因信息 – 按 ID 或符号获取详细信息
  • 🔍 基因搜索 – 搜索任意物种中的基因
  • 🧬 序列检索 – 获取任意基因组区域的 DNA
  • 🔬 变异数据 – 探索变异及其注释
  • 📊 转录本信息 – 检查转录本和异构体
  • 🌍 多物种 – Ensembl 中的所有物种,尽在此处
  • 🔗 交叉引用 – 一次调用即可跳转到外部数据库
  • ⚡ 速率限制 – 内置节流机制,确保请求不超出 Ensembl 限制

安装

选择你偏好的安装方式:

选项 1:通过 Smithery
  1. 访问 Smithery - Ensembl MCP Server。常见的平台选项包括:
# claude code:
npx -y @smithery/cli@latest install @effieklimi/ensembl-mcp-server --client claude --key your-smithery-secret-key

# cursor:
npx -y @smithery/cli@latest install @effieklimi/ensembl-mcp-server --client cursor --key your-smithery-secret-key

# vscode:
npx -y @smithery/cli@latest install @effieklimi/ensembl-mcp-server --client vscode --key your-smithery-secret-key

# windsurf:
npx -y @smithery/cli@latest install @effieklimi/ensembl-mcp-server --client windsurf --key your-smithery-secret-key

如需其他平台选项,请查看 MCP 的 Smithery 链接。

选项 2:本地开发环境设置

适用于开发或自定义配置:

  1. 克隆并安装依赖项:

    git clone https://github.com/effieklimi/ensembl-mcp-server.git
    cd ensembl-mcp-server
    npm install
    
  2. 手动配置 Claude Desktop:

    编辑配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json

    添加以下服务配置:

    {
      "mcpServers": {
        "ensembl": {
          "command": "npm",
          "args": ["run", "start"],
          "cwd": "/absolute/path/to/ensembl-mcp-server"
        }
      }
    }
    
  3. 重启 Claude Desktop - Ensembl 工具将显示在可用工具中

开发环境设置
# Development with hot reload
npm run dev

# Run tests
npm test

# Production build (optional)
npm run build
npm run start:prod

参与贡献

欢迎你来帮忙!开始参与的方式如下:

快速联系
开发工作流
  1. Fork 此仓库
  2. 克隆你的 Fork:
    git clone https://github.com/YOUR_USERNAME/ensembl-mcp-server.git
    cd ensembl-mcp-server
    
  3. 安装依赖项:
    npm install
    
  4. 运行测试,确保一切正常:
    npm test
    
  5. 启动开发服务:
    npm run dev
    
  6. 进行修改并全面测试
  7. 提交拉取请求
可用脚本
  • npm run dev - 启动开发模式并启用热重载
  • npm run start - 运行服务
  • npm test - 运行所有测试
  • npm run build - 编译 TypeScript(可选)
  • npm run start:prod - 运行编译后的版本

十个工具(及其端点)

1 · ensembl_feature_overlap

查找与某个区域或其他特征重叠的基因、转录本或调控元件。

GET /overlap/region/:species/:region
GET /overlap/id/:id

常见提问:“chr17:43-44 Mb 上有哪些基因?”——“哪些特征与 BRCA1 重叠?”


2 · ensembl_regulatory

调控特征、结合矩阵及相关注释。

GET /overlap/region/:species/:region             (with regulatory filters)
GET /overlap/translation/:id                     (regulatory features on proteins)
GET /species/:species/binding_matrix/:binding_matrix_stable_id

使用场景:TF 结合位点、调控注释。


3 · ensembl_protein_features

蛋白质层面的结构域和功能位点。

GET /overlap/translation/:id

使用场景:蛋白质结构域、信号肽、催化残基。


4 · ensembl_meta

服务元数据、物种列表、发布信息和诊断信息。

GET /info/ping
GET /info/rest
GET /info/software
GET /info/data
GET /info/species
GET /info/divisions
GET /info/assembly/:species
GET /info/biotypes/:species
GET /info/analysis/:species
GET /info/external_dbs/:species
GET /info/variation/:species
GET /archive/id/:id
POST /archive/id

常见提问:“你们有哪些人类组装版本?”——服务健康检查。


5 · ensembl_lookup

转换 ID ↔ 符号、获取交叉引用、重新编码变异。

GET  /lookup/id/:id
GET  /lookup/symbol/:species/:symbol
POST /lookup/id
POST /lookup/symbol
GET  /xrefs/id/:id
GET  /xrefs/symbol/:species/:symbol
GET  /xrefs/name/:species/:name
GET  /variant_recoder/:species/:id
POST /variant_recoder/:species

使用场景:“BRCA1 的 Ensembl ID 是什么?”——交叉引用 UniProt。


6 · ensembl_sequence

检索 DNA、RNA 或蛋白质序列。

GET  /sequence/id/:id
GET  /sequence/region/:species/:region
POST /sequence/id
POST /sequence/region

使用场景:基因 FASTA、转录本 cDNA、基因组区域。


7 · ensembl_mapping

坐标转换(基因组 ↔ cDNA/CDS/蛋白质)和组装版本转换。

GET /map/cdna/:id/:region
GET /map/cds/:id/:region
GET /map/translation/:id/:region
GET /map/:species/:asm_one/:region/:asm_two

使用场景:将 CDS 映射到 GRCh38,将蛋白质转换为基因组坐标。


8 · ensembl_compara

比较基因组学——同源关系、基因树、比对。

GET /homology/id/:species/:id
GET /homology/symbol/:species/:symbol
GET /genetree/id/:id
GET /genetree/member/symbol/:species/:symbol
GET /genetree/member/id/:species/:id
GET /cafe/genetree/id/:id
GET /cafe/genetree/member/symbol/:species/:symbol
GET /cafe/genetree/member/id/:species/:id
GET /alignment/region/:species/:region

使用场景:查找直系同源基因、构建系统发育树、获取物种比对结果。


9 · ensembl_variation

变异查询、VEP 后果、LD、表型映射。

GET  /variation/:species/:id
GET  /variation/:species/pmcid/:pmcid
GET  /variation/:species/pmid/:pmid
POST /variation/:species
GET  /vep/:species/hgvs/:hgvs_notation
POST /vep/:species/hgvs
GET  /vep/:species/id/:id
POST /vep/:species/id
GET  /vep/:species/region/:region/:allele
POST /vep/:species/region
GET  /ld/:species/:id/:population_name
GET  /phenotype/variant/:species/:id
GET  /phenotype/region/:species/:region
GET  /transcript_haplotypes/:species/:id

使用场景:VEP 预测、LD 区块、表型关联。


10 · ensembl_ontotax

本体术语搜索和 NCBI 分类法遍历。

GET /ontology/id/:id
GET /ontology/name/:name
GET /taxonomy/id/:id
GET /taxonomy/name/:name

使用场景:查询 GO 术语、表型本体、分类学分类。


通过 Smithery 安装

通过 Smithery 为 Claude Desktop 自动安装 ensembl-mcp-server:

npx -y @smithery/cli install @effieklimi/ensembl-mcp-server --client claude

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。