返回市场
ENSEMBL-MCP服务器

ENSEMBL-MCP服务器

作者:effieklimi5 星标更新:2025-06-07

项目介绍

🧬 Ensembl API MCP 服务器

smithery 徽章

一个功能齐全的模型上下文协议(MCP)服务器,公开了Ensembl的REST API。使用TypeScript MCP SDK构建。

  • 全面覆盖 – 10个工具映射到功能区域而不是100多个单独的端点,但仍几乎公开整个API。
  • 生产就绪 – 全程使用TypeScript,强大的错误处理,整洁的API客户端层。
  • 生物学家友好 – 按生物学任务分组(基因、变异、比较……),而不是按低级REST路径。

列表于:


使用案例:

  • 🧬 基因信息 – 通过ID或符号获取详情
  • 🔍 基因搜索 – 跨任何物种扫描基因
  • 🧬 序列检索 – 获取任何基因组区域的DNA
  • 🔬 变异数据 – 探索变异及其注释
  • 📊 转录本信息 – 检查转录本和异构体
  • 🌍 多物种 – Ensembl中的每个物种都在这里
  • 🔗 交叉引用 – 一次调用跳转到外部数据库
  • 速率限制 – 内置节流确保你在Ensembl限制内

安装

选择您偏好的安装方法:

方案1:通过Smithery

  1. 访问Smithery - Ensembl MCP 服务器。最常见的平台选项包括:
# claude 代码:
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": "/绝对路径/到/ensembl-mcp-server"
        }
      }
    }
    
  3. 重启Claude Desktop - Ensembl工具将出现在可用工具中

开发设置

# 带热重载的开发
npm run dev

# 运行测试
npm test

# 生产构建(可选)
npm run build
npm run start:prod

贡献

我们很乐意得到您的帮助!以下是开始的方法:

快速联系

开发工作流程

  1. 分叉仓库
  2. 克隆您的分叉:
    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             (带有调控过滤器)
GET /overlap/translation/:id                     (蛋白质上的调控特征)
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自动安装ensembl-mcp-server用于Claude Desktop:

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