关于 Healthcare MCP Server
Healthcare MCP Server 是一个 MCP 服务,为 AI 助手提供医疗与健康信息工具,涵盖 FDA 药品信息、PubMed、medRxiv、临床试验、ICD-10 编码、DICOM 元数据和 BMI 计算等。适合需要基于权威数据源回答医疗相关问题的开发者与应用。项目同时提供 DXT 扩展、npm 包与源码安装方式。
主要功能
- 01FDA 药品信息查询
- 02PubMed、medRxiv 与 NCBI Bookshelf 文献检索
- 03临床试验与 ICD-10 编码查询
- 04DICOM 文件元数据提取与 BMI 计算
- 05stdio 与 HTTP/SSE 两种接口
适用场景
- 01为 AI 助手查询药品标签与不良事件报告
- 02检索医学文献和临床试验进展
- 03查找 ICD-10 编码或从 DICOM 文件中读取元数据
MCP 相关
该项目是一个 MCP 服务,向 MCP 客户端暴露 fda_drug_lookup、pubmed_search、clinical_trials_search、lookup_icd_code、calculate_bmi 等工具,可通过 DXT、npm 或 stdio 接入。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Healthcare MCP 服务
一种 Model Context Protocol(MCP)服务,为 AI 助手提供医疗保健数据和医疗信息工具。
概述
Healthcare MCP Server 是一个专用的 Node.js 服务,实现了 Model Context Protocol(MCP),为 AI 助手提供医疗保健数据和医疗信息工具。它支持 AI 模型从权威来源检索准确、最新的医疗信息。本仓库提供一个包含完整 Node.js 实现的 DXT 软件包。
DXT 扩展
本仓库包含一个打包好的 DXT(桌面扩展)文件,可在兼容的开发环境中轻松安装。下载 healthcare-mcp.dxt 即可一键安装。
功能
- FDA 药物信息:从 FDA 数据库搜索和检索全面的药物信息(改进了响应解析)
- PubMed 研究:从 PubMed 的科学文章数据库搜索医学文献
- 健康主题:获取 Health.gov 提供的循证健康信息(已更新至 API v4)
- 临床试验:搜索正在进行和已完成的临床试验(已更新 API 参数)
- 医学术语:查询 ICD-10 编码和医学术语定义
- medRxiv 搜索:搜索 medRxiv 上的预印本文章
- 医学计算器:计算身体质量指数(BMI)
- NCBI Bookshelf 搜索:搜索 NCBI Bookshelf 中的生物医学书籍和文档
- DICOM 元数据提取:从 DICOM 文件中提取元数据
- 缓存:高效的缓存系统和连接池,可减少 API 调用并提升性能
- 使用情况跟踪:匿名跟踪使用情况,以监控 API 使用情况
- 错误处理:健壮的错误处理和日志记录
- 多种接口:支持 stdio(用于 CLI)和 HTTP/SSE 接口
- API 文档:提供 Swagger UI 交互式 API 文档
- 全面测试:包含 Node.js 测试和 API 验证的完整测试套件
安装
选项 1:DXT 扩展(推荐)
- 从本仓库下载
healthcare-mcp.dxt - 使用兼容的 MCP 客户端(例如 Claude Desktop)打开
- 按照安装提示操作
- 通过图形界面配置可选设置
选项 2:通过 Smithery 安装
通过 Smithery 自动为 Claude Desktop 安装 Healthcare Data and Medical Information Server:
npx -y @smithery/cli install @Cicatriiz/healthcare-mcp-public --client claude
选项 3:通过 npm 安装
-
安装软件包:
npm install healthcare-mcp -
运行服务:
npx healthcare-mcp
选项 4:从源代码手动安装
-
克隆仓库:
git clone https://github.com/Cicatriiz/healthcare-mcp-public.git cd healthcare-mcp-public/server -
安装依赖:
npm install -
设置环境变量(可选):
# Create .env file from example cp .env.example .env # Edit .env with your API keys (optional) -
运行服务:
npm start
用法
运行服务
-
stdio 模式(默认,用于 MCP 客户端):
npm start -
HTTP/SSE 模式(用于 Web 客户端):
npm run server:http
测试工具
你可以使用内置测试脚本测试 MCP 工具:
# Test all tools
npm test
# Test individual tools
npm run test:fda # Test FDA drug lookup
npm run test:pubmed # Test PubMed search
npm run test:health # Test Health Topics
npm run test:trials # Test Clinical Trials search
npm run test:icd # Test ICD-10 code lookup
API 参考
Healthcare MCP Server 提供用于直接集成的编程 API,以及供 Web 客户端使用的 RESTful HTTP API。
RESTful API 端点
以 HTTP 模式运行时,可使用以下端点:
健康检查
GET /health
返回服务及其服务组件的状态。
FDA 药物查询
GET /api/fda?drug_name={drug_name}&search_type={search_type}
参数:
drug_name:要搜索的药物名称search_type:要检索的信息类型general:基本药物信息(默认)label:药品标签信息adverse_events:已报告的不良事件
响应示例:
{
"status": "success",
"drug_name": "aspirin",
"search_type": "general",
"total_results": 25,
"results": [
{
"brand_name": "ASPIRIN",
"generic_name": "ASPIRIN",
"manufacturer": "Bayer Healthcare",
"product_type": "HUMAN OTC DRUG",
"route": "ORAL",
"active_ingredients": [
{
"name": "ASPIRIN",
"strength": "325 mg/1"
}
]
}
]
}
PubMed 搜索
GET /api/pubmed?query={query}&max_results={max_results}&date_range={date_range}
参数:
query:医学文献搜索查询max_results:返回结果的最大数量(默认值:5,最大值:50)date_range:限定在指定年数内发表的文章(例如,'5'表示最近 5 年)
示例响应:
{
"status": "success",
"query": "diabetes treatment",
"total_results": 123456,
"date_range": "5",
"articles": [
{
"pmid": "12345678",
"title": "New advances in diabetes treatment",
"authors": ["Smith J", "Johnson A"],
"journal": "Journal of Diabetes Research",
"publication_date": "2023-01-15",
"abstract": "This study explores new treatment options...",
"url": "https://pubmed.ncbi.nlm.nih.gov/12345678/"
}
]
}
健康主题
GET /api/health_finder?topic={topic}&language={language}
参数:
topic:要搜索信息的健康主题language:内容语言(en 或 es,默认值:en)
示例响应:
{
"status": "success",
"search_term": "diabetes",
"language": "en",
"total_results": 15,
"topics": [
{
"title": "Diabetes Type 2",
"url": "https://health.gov/myhealthfinder/topics/health-conditions/diabetes/diabetes-type-2",
"last_updated": "2023-05-20",
"section": "Health Conditions",
"description": "Information about managing type 2 diabetes",
"content": ["Diabetes is a disease...", "Treatment options include..."]
}
]
}
临床试验搜索
GET /api/clinical_trials?condition={condition}&status={status}&max_results={max_results}
参数:
condition:要搜索的医疗状况或疾病status:试验状态(recruiting、completed、active、not_recruiting 或 all)max_results:返回结果的最大数量(默认值:10,最大值:100)
示例响应:
{
"status": "success",
"condition": "breast cancer",
"search_status": "recruiting",
"total_results": 256,
"trials": [
{
"nct_id": "NCT12345678",
"title": "Study of New Treatment for Breast Cancer",
"status": "Recruiting",
"phase": "Phase 2",
"study_type": "Interventional",
"conditions": ["Breast Cancer", "HER2-positive Breast Cancer"],
"locations": [
{
"facility": "Memorial Hospital",
"city": "New York",
"state": "NY",
"country": "United States"
}
],
"sponsor": "National Cancer Institute",
"url": "https://clinicaltrials.gov/study/NCT12345678",
"eligibility": {
"gender": "Female",
"min_age": "18 Years",
"max_age": "75 Years",
"healthy_volunteers": "No"
}
}
]
}
ICD-10 代码查询
GET /api/medical_terminology?code={code}&description={description}&max_results={max_results}
参数:
code:要查询的 ICD-10 代码(如果提供了描述,则可选)description:要搜索的医疗状况描述(如果提供了代码,则可选)max_results:返回结果的最大数量(默认值:10,最大值:50)
示例响应:
{
"status": "success",
"search_type": "description",
"search_term": "diabetes",
"total_results": 25,
"codes": [
{
"code": "E11",
"description": "Type 2 diabetes mellitus",
"category": "Endocrine, nutritional and metabolic diseases"
},
{
"code": "E10",
"description": "Type 1 diabetes mellitus",
"category": "Endocrine, nutritional and metabolic diseases"
}
]
}
通用工具执行
POST /mcp/call-tool
请求正文:
{
"name": "fda_drug_lookup",
"arguments": {
"drug_name": "aspirin",
"search_type": "general"
},
"session_id": "optional-session-id"
}
MCP 工具
通过兼容的客户端使用 MCP 服务时,可使用以下工具:
FDA 药物查询
fda_drug_lookup(drug_name, search_type = "general")
参数:
drug_name:要搜索的药物名称search_type:要检索的信息类型general:药物基本信息(默认值)label:药物标签信息adverse_events:已报告的不良事件
PubMed 搜索
pubmed_search(query, max_results = 5, date_range = "")
参数:
query:医学文献搜索查询max_results:返回结果的最大数量(默认值:5)date_range:限定在指定年数内发表的文章(例如,'5'表示最近 5 年)
健康主题
health_topics(topic, language = "en")
参数:
topic:要搜索信息的健康主题language:内容语言(en 或 es,默认值:en)
临床试验搜索
clinical_trials_search(condition, status = "recruiting", max_results = 10)
参数:
condition:要搜索的医疗状况或疾病status:试验状态(recruiting、completed、active、not_recruiting 或 all)max_results:返回结果的最大数量
ICD-10 代码查询
lookup_icd_code(code = null, description = null, max_results = 10)
参数:
code:要查询的 ICD-10 代码(如果提供了描述,则可选)description:要搜索的医疗状况描述(如果提供了代码,则可选)max_results:返回结果的最大数量
medRxiv 搜索
medrxiv_search(query, max_results = 10)
参数:
query:medRxiv 文章搜索查询max_results:返回结果的最大数量
计算 BMI
calculate_bmi(height_meters, weight_kg)
参数:
height_meters:身高,单位为米weight_kg:体重,单位为千克
NCBI Bookshelf 搜索
ncbi_bookshelf_search(query, max_results = 10)
参数:
query:NCBI Bookshelf 搜索查询max_results:返回结果的最大数量
提取 DICOM 元数据
extract_dicom_metadata(file_path)
参数:
file_path:DICOM 文件路径
数据源
此 MCP 服务使用多个公开可用的医疗保健 API:
许可证
MIT 许可证
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。