医疗保健MCP服务器
](https://smithery.ai/server/@Cicatriiz/healthcare-mcp-public) 模型上下文协议(MCP)服务器,为AI助手提供对医疗数据和医疗信息工具的访问。
概述
医疗保健MCP服务器是一个专门的Node.js服务器,它实现了模型上下文协议(MCP),为AI助手提供对医疗保健数据和医疗信息工具的访问。它使人工智能模型能够从权威来源检索准确、最新的医疗信息。此存储库提供了一个包含完整Node.js实现的DXT包。
DXT扩展
此存储库包含一个打包的DXT(桌面扩展)文件,便于在兼容的开发环境中安装。下载 healthcare-mcp.dxt 一键安装。
特性
- 美国食品药品监督管理局药品信息:从美国食品药品监督管理局数据库中搜索和检索全面的药物信息(改进了响应解析)
- PubMed研究:从PubMed的科学文章数据库中搜索医学文献
- 健康主题:从health.gov获取循证健康信息(更新至API v4)
- 临床试验:搜索正在进行和已完成的临床试验(更新的API参数)
- 医学术语:查找ICD-10代码和医学术语定义
- medRxiv搜索:搜索medRxiv上的预印本文章
- 医疗计算器:计算体重指数(BMI)
- NCBI书架搜索:在NCBI书架上搜索生物医学书籍和文件
- DICOM元数据提取:从DICOM文件中提取元数据
- 缓存:具有连接池的高效缓存系统,可减少API调用并提高性能
- 使用情况跟踪:用于监视API使用情况的匿名使用情况跟踪
- 错误处理:强大的错误处理和日志记录
- 多个接口:支持stdio(用于CLI)和HTTP/SSE接口
- API文档:带有Swagger UI的交互式API文档
- 综合测试:具有Node.js测试和API验证的扩展测试套件
安装
选项1:DXT扩展(推荐)
- 下载
healthcare-mcp.dxt来自此存储库 - 使用兼容的MCP客户端(如Claude Desktop)打开
- 按照安装提示进行操作
- 通过GUI配置可选设置
选项2:通过Smithery安装
通过以下方式自动安装克劳德桌面医疗保健数据和医疗信息服务器 铁匠铺:
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 lookupapi参考
Healthcare MCP服务器提供用于直接集成的程序化API和用于web客户端的RESTful HTTP API。
RESTful API端点
在HTTP模式下运行时,以下端点可用:
健康检查
GET /health返回服务器及其服务的状态。
美国食品药品监督管理局药品查询
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:试验状态(招募、已完成、正在进行、未重新招募或全部)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_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:试验状态(招募、已完成、正在进行、未重新招募或全部)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书架搜索
ncbi_bookshelf_search(query, max_results = 10)参数:
query:NCBI书架搜索查询max_results:要返回的最大结果数
提取DICOM元数据
extract_dicom_metadata(file_path)参数:
file_path:DICOM文件的路径
数据源
此MCP服务器利用了几个公开可用的医疗保健API:
许可证
MIT许可证
