Token导航 LogoToken导航TokenDH.com
Biosciences MCP logo
数据服务stdio官方级别未说明来源级核验

Biosciences MCP

MCP Server

FastMCP生命科学API封装,使LLM代理能够查询生物数据库以进行药物发现和再利用。

工具数

23

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude数据分析Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

open-biosciences

提供方

open-biosciences

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run pytest -m unit -v

详细介绍

生物科学mcp

用于生命科学API的FastMCP包装,使LLM试剂能够查询生物数据库以进行药物发现和重新利用。部分 开放生物科学 平台。

状态

活动--第2波(平台)迁移完成。 12台FastMCP服务器,697+个测试(399个单元+294个集成+4个e2e),为FastMCP云部署准备好的统一网关。

此回购包含哪些内容

  • 12个FastMCP服务器实现 涵盖HGNC、UniProt、ChEMBL、开放靶点、STRING、BioGRID、Ensembl、Entrez、PubChem、IUPHAR/GtoPdb、WikiPathways和ClinicalTrials.gov
  • 13个异步客户端库 用于对所有服务器进行编程访问(基于httpx)
  • Pydantic v2型号 包括响应信封、交叉引用模式和域实体
  • 统一网关服务器 将所有12台服务器聚合到一个端点后面(src/biosciences_mcp/servers/gateway.py)
  • 697+次测试 按pytest标记组织(单元、集成、e2e)

所有服务器都实现了模糊到事实协议(ADR-001§3):自然语言发现,然后是严格的基于CURIE的查找。

快速开始

# Install dependencies (including dev extras)
uv sync --extra dev

# Run unit tests (no network required)
uv run pytest -m unit -v

服务器层

标签服务器
0药物发现核心ChEMBL,开放靶点
1基因/蛋白质基金会HGNC、UniProt、STRING、BioGRID
2药理学IUPHAR/GtoPdb,PubChem
3路径与试验维基路径,ClinicalTrials.gov
4基因组学和标识符集合,输入

按服务器实现的工具

服务器工具CURIE格式
HGNCsearch_genes, get_geneHGNC:1100
UniProtsearch_proteins, get_proteinUniProtKB:P38398
中国search_compounds, get_compound, get_compounds_batchCHEMBL:25
开放目标search_targets, get_target, get_associationsENSG00000141510
字符串search_proteins, get_interactions, get_network_image_urlSTRING:9606.ENSP*
生物资源数据库search_genes, get_interactions基因符号
恩森布尔search_genes, get_gene, get_transcriptENSG*, ENST*
输入search_genes, get_gene, get_pubmed_linksNCBIGene:7157
PubChemsearch_compounds, get_compoundPubChem:CID2244
IUPHAR/GtoPdbsearch_ligands, get_ligand, search_targets, get_targetIUPHAR:2713
维基路径search_pathways, get_pathway, get_pathways_for_gene, get_pathway_componentsWP:WP534
ClinicalTrials.govsearch_trials, get_trial, get_trial_locationsNCT:00461032

模糊到事实协议

所有服务器都执行两阶段工作流程(ADR-001§3):

  1. 第一阶段——模糊发现:工具接受自然语言,返回排名靠前的CURIE考生
  2. 第二阶段——严格查找:工具只接受已解析的CURIE(例如。, HGNC:1100, UniProtKB:P38398)
  3. 故障模式:将原始字符串传递给严格工具返回 UNRESOLVED_ENTITY 错误
# Example: fuzzy search -> CURIE resolution -> strict lookup
result = await client.call_tool("search_genes", {"query": "BRCA1"})
curie = result["items"][0]["id"]  # "HGNC:1100"
gene = await client.call_tool("get_gene", {"hgnc_id": curie})

FastMCP云

部署通过Prefect Horizon web UI进行管理,网址为 horizon.prefect.io — 没有 fastmcp deploy FastMCP 2.x中的CLI命令。请参阅 CLAUDE.md 获取分步说明。

部署后,网关端点为:

https://biosciences-mcp.fastmcp.app/mcp

认证

FastMCP Cloud需要Bearer API密钥。集 BIOSCIENCES_API_KEY 在您的环境中 (从Prefect Horizon控制台获取)。不要提交此密钥。

通过克劳德代码(.mcp.json)连接

{
  "mcpServers": {
    "biosciences-mcp": {
      "type": "http",
      "url": "https://biosciences-mcp.fastmcp.app/mcp",
      "headers": {
        "Authorization": "Bearer ${BIOSCIENCES_API_KEY}"
      }
    }
  }
}

所需的环境变量

创建部署时在Horizon控制台中设置这些:

变量描述必填
BIOGRID_API_KEYBioGRID交互API密钥(免费注册)对于BioGRID是
NCBI_API_KEYEntrez/PubMed费率限制增加(可选,免费)

大多数生命科学API(HGNC、UniProt、ChEMBL、Open Targets、STRING、Ensembl、PubChem、IUPHAR/GtoPdb、WikiPathways、ClinicalTrials.gov)都是完全公开的,不需要API密钥。

本地开发

# Run the gateway in interactive dev mode (MCP Inspector UI)
fastmcp dev src/biosciences_mcp/servers/gateway.py

# Run a specific server
uv run fastmcp run src/biosciences_mcp/servers/hgnc.py
uv run fastmcp dev src/biosciences_mcp/servers/.py

测试命令

# By tier
uv run pytest -m unit -v                              # 399 unit tests — no network
uv run pytest -m integration -v                       # 294 integration tests — live APIs
uv run pytest -m e2e -v                               # 4 e2e tests — requires live gateway
uv run pytest -m "not integration" -v                 # Fast local dev (unit only)

# By API
uv run pytest -m "unit and hgnc" -v
uv run pytest -m "unit and clinicaltrials" -v
uv run pytest -m "integration and chembl" -v

# E2e against the deployed cloud endpoint
FASTMCP_CLOUD_ENDPOINT=https://biosciences-mcp.fastmcp.app/mcp \
  uv run pytest -m e2e -v

封装结构

src/biosciences_mcp/
├── clients/          # Async HTTP clients (httpx-based)
│   ├── base.py       # LifeSciencesClient base class
│   ├── hgnc.py
│   ├── uniprot.py
│   └── ...           # 13 clients total
├── models/           # Pydantic v2 models
│   ├── envelopes.py  # PaginationEnvelope, ErrorEnvelope
│   ├── cross_references.py
│   └── ...           # Domain entity models
└── servers/          # FastMCP server definitions
    ├── gateway.py    # Unified gateway (mounts all 12 servers)
    ├── hgnc.py
    └── ...           # 12 servers

代理人所有权

由维护 MCP平台工程师 代理人(代理人3)。看 代理商.md 了解完整的团队定义。

依赖项

方向存储库关系
上游生物科学计划方案和ADR(ADR-001、ADR-004)
下游生物科学深度试剂LangGraph代理使用MCP工具
下游生物科学时间时间活动调用MCP工具
下游生物科学研究图形生成器工作流使用MCP工具

相关存储库

许可证

麻省理工学院

目录标签

目录标签

PythonClaude数据分析药物发现本地部署基因查询蛋白质查询生物数据库生命科学

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

23

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP