mcpField
U
Unofficial PubChem MCP Server

Unofficial PubChem MCP Server

本地服务
github.com/Augmented-Nature科研与教育4845 周前更新

关于 Unofficial PubChem MCP Server

这是一个非官方的 MCP 服务,用于访问 PubChem 化学数据库,提供分子属性、生物测定数据和化学信息学工具。它面向化学、药物发现和生命科学研究人员,README 称其覆盖超过 1.1 亿种化合物。

主要功能

  1. 01化合物检索与结构相似性搜索
  2. 02分子属性、描述符与类药性评估
  3. 03生物测定与活性数据查询
  4. 04GHS 危害分类与毒性信息查询
  5. 05与 ChEMBL、UniProt 等数据库的跨库工作流
  6. 06按 CID 批量查询最多 200 个化合物

适用场景

  1. 01按名称或 SMILES 查找化合物并获取其属性
  2. 02检索化合物的生物活性数据以支持药物发现
  3. 03查询化合物的安全与毒性信息

MCP 相关

该项目是一个 MCP 服务,通过工具和资源模板(如 pubchem://compound/{cid})向 MCP 客户端提供 PubChem 数据访问。

配置

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

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

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

详细介绍

PubChem MCP 服务 Logo

非官方 PubChem MCP 服务

一个用于访问 PubChem 化学数据库的综合性模型上下文协议(MCP)服务。该服务可访问超过 1.1 亿种化合物,并提供丰富的分子属性、生物测定数据和化学信息学工具。

功能

🔍 化学搜索与检索(6 个工具)
  • search_compounds - 按名称、CAS 编号、分子式或标识符搜索
  • get_compound_info - 按 CID 获取详细的化合物信息
  • search_by_smiles - 精确匹配 SMILES 字符串
  • search_by_inchi - 搜索 InChI/InChI key
  • search_by_cas_number - 查询 CAS 注册号
  • get_compound_synonyms - 获取所有名称和同义词
🧬 结构分析与相似性(5 个工具)
  • search_similar_compounds - Tanimoto 相似性搜索
  • substructure_search - 查找包含子结构的化合物
  • superstructure_search - 查找包含查询结构的更大化合物
  • get_3d_conformers - 3D 结构信息
  • analyze_stereochemistry - 手性和异构体分析
⚗️ 化学属性与描述符(6 个工具)
  • get_compound_properties - 分子量、logP、TPSA 等
  • calculate_descriptors - 全面的分子描述符
  • predict_admet_properties - ADMET 预测
  • assess_drug_likeness - Lipinski 五规则分析
  • 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} - 2D/3D 结构信息
  • pubchem://properties/{cid} - 分子属性
  • pubchem://bioassay/{aid} - 生物测定数据
  • pubchem://similarity/{smiles} - 相似性搜索结果
  • pubchem://safety/{cid} - 安全与毒性数据

安装

# Clone or create the server directory
cd pubchem-server

# Install dependencies
npm install

# Build the server
npm run build

# Run the server
npm start

使用方法

基本化合物搜索
// Search for compounds by name
{
  "tool": "search_compounds",
  "arguments": {
    "query": "aspirin",
    "max_records": 10
  }
}

// Get detailed compound information
{
  "tool": "get_compound_info",
  "arguments": {
    "cid": 2244
  }
}
结构分析
// Find similar compounds
{
  "tool": "search_similar_compounds",
  "arguments": {
    "smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
    "threshold": 85,
    "max_records": 50
  }
}

// Analyze molecular properties
{
  "tool": "get_compound_properties",
  "arguments": {
    "cid": 2244,
    "properties": ["MolecularWeight", "XLogP", "TPSA"]
  }
}
生物活性分析
// Get bioassay information
{
  "tool": "get_assay_info",
  "arguments": {
    "aid": 1159607
  }
}

// Search compounds by target
{
  "tool": "search_by_target",
  "arguments": {
    "target": "cyclooxygenase",
    "max_records": 100
  }
}
安全信息
// Get safety classifications
{
  "tool": "get_safety_data",
  "arguments": {
    "cid": 2244
  }
}
批量处理
// Process multiple compounds
{
  "tool": "batch_compound_lookup",
  "arguments": {
    "cids": [2244, 5090, 3672],
    "operation": "property"
  }
}

与其他 MCP 服务集成

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

完整的化学信息学流程
1. Target Discovery: UniProt → STRING → AlphaFold
2. Chemical Discovery: PubChem ← → ChEMBL
3. Complete Workflow: Protein → Structure → Interactions → Small Molecules → Bioactivity
跨数据库工作流
  • 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. Search for anti-inflammatory compounds
{
  "tool": "search_compounds",
  "arguments": {
    "query": "anti-inflammatory",
    "max_records": 100
  }
}

// 2. Analyze drug-likeness
{
  "tool": "assess_drug_likeness",
  "arguments": {
    "cid": 2244
  }
}

// 3. Check safety profile
{
  "tool": "get_safety_data",
  "arguments": {
    "cid": 2244
  }
}

// 4. Find bioactivity data
{
  "tool": "search_by_target",
  "arguments": {
    "target": "COX-2",
    "activity_type": "IC50"
  }
}
化学相似性分析
// 1. Find similar compounds
{
  "tool": "search_similar_compounds",
  "arguments": {
    "smiles": "your_query_smiles",
    "threshold": 90
  }
}

// 2. Compare molecular properties
{
  "tool": "batch_compound_lookup",
  "arguments": {
    "cids": [1234, 5678, 9012],
    "operation": "property"
  }
}

// 3. Analyze structural features
{
  "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 = {Accessed: 2025-06-29}

评论

支持 Markdown

第一次接触 MCP?

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

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