返回市场
增强自然PubChem MCP服务器

增强自然PubChem MCP服务器

作者:Augmented-Nature29 星标更新:2025-06-29

项目介绍

PubChem MCP Server Logo

非官方PubChem MCP服务器

一个全面的模型上下文协议(MCP)服务器,用于访问PubChem化学数据库。该服务器提供了超过1.1亿种化学化合物的访问权限,包括广泛的分子属性、生物测定数据和化学信息学工具。

功能

🔍 化学搜索与检索(6个工具)

  • search_compounds - 按名称、CAS编号、公式或标识符搜索
  • get_compound_info - 通过CID获取详细的化合物信息
  • search_by_smiles - 精确匹配SMILES字符串
  • search_by_inchi - InChI/InChI键搜索
  • search_by_cas_number - 查找CAS注册号
  • get_compound_synonyms - 所有名称和同义词

🧬 结构分析与相似性(5个工具)

  • search_similar_compounds - Tanimoto相似性搜索
  • substructure_search - 寻找包含子结构的化合物
  • superstructure_search - 寻找包含查询的较大化合物
  • get_3d_conformers - 三维结构信息
  • analyze_stereochemistry - 手性和异构体分析

⚗️ 化学性质与描述符(6个工具)

  • get_compound_properties - 分子量、logP、TPSA等
  • calculate_descriptors - 综合分子描述符
  • predict_admet_properties - ADMET预测
  • assess_drug_likeness - 脂质金五规则分析
  • analyze_molecular_complexity - 合成可及性
  • get_pharmacophore_features - 药效团映射

🧪 生物测定与活性数据(5个工具)

  • search_bioassays - 查找生物测定
  • get_assay_info - 详细的测定协议
  • get_compound_bioactivities - 化合物的所有活性数据
  • search_by_target - 查找针对目标测试的化合物
  • compare_activity_profiles - 跨化合物比较

⚠️ 安全与毒性(4个工具)

  • get_safety_data - GHS危害分类
  • get_toxicity_info - LD50、致癌性数据
  • assess_environmental_fate - 生物降解分析
  • get_regulatory_info - FDA、EPA法规

🔗 交叉引用与集成(4个工具)

  • get_external_references - 链接到ChEMBL、DrugBank等
  • search_patents - 化学专利信息
  • get_literature_references - PubMed引用
  • batch_compound_lookup - 批量处理(最多200种化合物)

资源模板

通过URI模式访问PubChem数据:

  • pubchem://compound/{cid} - 完整的化合物数据
  • pubchem://structure/{cid} - 二维/三维结构信息
  • pubchem://properties/{cid} - 分子性质
  • pubchem://bioassay/{aid} - 生物测定数据
  • pubchem://similarity/{smiles} - 相似性搜索结果
  • pubchem://safety/{cid} - 安全性和毒性数据

安装

# 克隆或创建服务器目录
cd pubchem-server

# 安装依赖
npm install

# 构建服务器
npm run build

# 运行服务器
npm start

使用

基本化合物搜索

// 按名称搜索化合物
{
  "tool": "search_compounds",
  "arguments": {
    "query": "阿司匹林",
    "max_records": 10
  }
}

// 获取详细的化合物信息
{
  "tool": "get_compound_info",
  "arguments": {
    "cid": 2244
  }
}

结构分析

// 查找相似化合物
{
  "tool": "search_similar_compounds",
  "arguments": {
    "smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
    "threshold": 85,
    "max_records": 50
  }
}

// 分析分子性质
{
  "tool": "get_compound_properties",
  "arguments": {
    "cid": 2244,
    "properties": ["MolecularWeight", "XLogP", "TPSA"]
  }
}

生物活性分析

// 获取生物测定信息
{
  "tool": "get_assay_info",
  "arguments": {
    "aid": 1159607
  }
}

// 按目标搜索化合物
{
  "tool": "search_by_target",
  "arguments": {
    "target": "环氧化酶",
    "max_records": 100
  }
}

安全信息

// 获取安全分类
{
  "tool": "get_safety_data",
  "arguments": {
    "cid": 2244
  }
}

批量处理

// 处理多个化合物
{
  "tool": "batch_compound_lookup",
  "arguments": {
    "cids": [2244, 5090, 3672],
    "operation": "property"
  }
}

与其他MCP服务器的集成

此PubChem服务器完美地与其他化学/生物数据库集成:

完整的化学信息学工作流程

1. 目标发现:UniProt → STRING → AlphaFold
2. 化学发现:PubChem ← → ChEMBL
3. 完整的工作流程:蛋白质 → 结构 → 交互 → 小分子 → 生物活性

跨数据库工作流程

  • UniProt → PubChem:查找蛋白质靶点 → 查找小分子配体
  • PubChem → ChEMBL:发现化合物 → 分析生物活性数据
  • STRING → PubChem:蛋白质相互作用 → 化学调节剂

API速率限制

PubChem API指南:

  • 每秒5次请求
  • 每分钟最大400次请求
  • 不需要API密钥
  • 鼓励尊重使用

数据来源

  • 1.1亿+化合物,具有完整的化学数据
  • 150万+生物测定,具有生物活性
  • 化学性质和计算描述符
  • 3D构象和结构数据
  • 安全分类和毒性信息
  • 交叉引用到500+外部数据库

错误处理

服务器包括全面的错误处理:

  • 无效的化合物ID返回清晰的错误消息
  • API超时被优雅地处理
  • 内置速率限制合规性
  • 对所有输入进行TypeScript验证

贡献

此服务器使用:

  • TypeScript以确保类型安全
  • Axios进行HTTP请求
  • MCP SDK以符合协议
  • PubChem REST API进行数据访问

许可证

MIT许可证 - 详情见LICENSE文件。

支持

对于以下问题:

  • 服务器功能:检查错误消息和API响应
  • PubChem API:参考官方PubChem文档
  • 化学数据:验证化合物标识符和搜索词

示例

药物发现工作流程

// 1. 搜索抗炎化合物
{
  "tool": "search_compounds",
  "arguments": {
    "query": "抗炎",
    "max_records": 100
  }
}

// 2. 分析药物相似性
{
  "tool": "assess_drug_likeness",
  "arguments": {
    "cid": 2244
  }
}

// 3. 检查安全性概况
{
  "tool": "get_safety_data",
  "arguments": {
    "cid": 2244
  }
}

// 4. 查找生物活性数据
{
  "tool": "search_by_target",
  "arguments": {
    "target": "COX-2",
    "activity_type": "IC50"
  }
}

化学相似性分析

// 1. 查找相似化合物
{
  "tool": "search_similar_compounds",
  "arguments": {
    "smiles": "your_query_smiles",
    "threshold": 90
  }
}

// 2. 比较分子性质
{
  "tool": "batch_compound_lookup",
  "arguments": {
    "cids": [1234, 5678, 9012],
    "operation": "property"
  }
}

// 3. 分析结构特征
{
  "tool": "analyze_stereochemistry",
  "arguments": {
    "cid": 1234
  }
}

架构

服务器采用模块化架构:

  • 类型安全验证适用于所有API输入
  • 全面的错误处理带有清晰的消息
  • 高效的批量处理适用于多个化合物
  • 资源模板直接数据访问
  • 集成准备适用于多数据库工作流程

这使其成为最全面的化学信息学MCP服务器!

引用

如果您在研究或出版物中使用了这个项目,请按如下方式引用:

author = {Moudather Chelbi},
title = {PubChem MCP Server},
year = {2025},
howpublished = {https://github.com/Augmented-Nature/PubChem-MCP-Server},
note = {访问日期:2025-06-29}