# Cicatriiz
## 基本信息
- Slug: `cicatriiz-healthcare-mcp-public`
- Source: modelscope
- Publisher: @Cicatriiz/healthcare-mcp-public
- Categories: health-and-wellness / research-and-data / databases
- Hosted: No
- License: BSD 2-Clause "Simplified" License
- Source URL: https://www.modelscope.cn/mcp/servers/@Cicatriiz/healthcare-mcp-public
## 简介
暂无描述。
## MCP Server 详情

# 医疗MCP服务器

[![smithery 徽章](https://smithery.ai/badge/@Cicatriiz/healthcare-mcp-public)](https://smithery.ai/server/@Cicatriiz/healthcare-mcp-public)
一个实现模型上下文协议（MCP）的服务器，为AI助手提供访问医疗数据和医学信息工具的能力。

## 概览

医疗MCP服务器是一个专门的服务器，它实现了模型上下文协议（MCP），以使AI助手能够访问医疗数据和医学信息工具。它让AI模型可以从权威来源检索准确且最新的医学信息。

## 功能特点

- **FDA药品信息**：从FDA数据库中搜索并获取全面的药品信息
- **PubMed研究**：从PubMed的科学文章数据库中搜索医学文献
- **健康主题**：从Health.gov获取基于证据的健康信息
- **临床试验**：搜索正在进行和已完成的临床试验
- **医学术语**：查找ICD-10编码及医学术语定义
- **缓存**：高效的缓存系统与连接池减少API调用次数并提高性能
- **使用跟踪**：匿名使用跟踪以监控API使用情况
- **错误处理**：强大的错误处理与日志记录
- **多接口支持**：同时支持stdio（用于命令行界面）和HTTP/SSE接口
- **API文档**：带有Swagger UI的交互式API文档
- **全面测试**：广泛的测试套件，包括pytest和覆盖率报告

## 安装

### 通过Smithery安装

要通过[Smithery](https://smithery.ai/server/@Cicatriiz/healthcare-mcp-public)自动为Claude Desktop安装医疗数据和医学信息服务器：

bash
npx -y @smithery/cli install @Cicatriiz/healthcare-mcp-public --client claude


### 手动安装

1. 克隆仓库：
   bash
   git clone https://github.com/Cicatriiz/healthcare-mcp-public.git
   cd healthcare-mcp-public
   

2. 创建虚拟环境：
   bash
   python -m venv venv
   source venv/bin/activate  # 在Windows上: venvScriptsactivate
   

3. 安装依赖项：
   bash
   pip install -r requirements.txt
   

4. 设置环境变量（可选）：
   bash
   # 从示例创建.env文件
   cp .env.example .env
   # 使用您的API密钥编辑.env文件（可选）
   

5. 运行服务器：
   bash
   python run.py
   

## 使用

### 在不同传输模式下运行

- **stdio模式**（默认，适用于命令行）:
  bash
  python run.py
  

- **HTTP/SSE模式**（适用于Web客户端）:
  bash
  python run.py --http --port 8000
  

### 测试工具

您可以使用新的基于pytest的测试套件来测试MCP工具：

bash
# 使用pytest和覆盖率运行所有测试
python -m tests.run_tests --pytest

# 运行特定测试文件
python -m tests.run_tests --test test_fda_tool.py

# 测试HTTP服务器
python -m tests.run_tests --server --port 8000


为了向后兼容，您仍然可以运行旧版测试：

bash
# 运行所有测试（旧风格）
python -m tests.run_tests

# 测试单个工具（旧风格）
python -m tests.run_tests --fda        # 测试FDA药品查询
python -m tests.run_tests --pubmed     # 测试PubMed搜索
python -m tests.run_tests --health     # 测试健康主题
python -m tests.run_tests --trials     # 测试临床试验搜索
python -m tests.run_tests --icd        # 测试ICD-10编码查询


## API参考

医疗MCP服务器提供了程序化API以便直接集成以及RESTful HTTP API供Web客户端使用。

### 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`: 报告的不良事件

**示例响应:**
json
{
  "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年）

**示例响应:**
json
{
  "status": "success",
  "query": "diabetes treatment",
  "total_results": 123456,
  "date_range": "5",
  "articles": [
    {
      "pmid": "12345678",
      "title": "糖尿病治疗的新进展",
      "authors": ["Smith J", "Johnson A"],
      "journal": "糖尿病研究杂志",
      "publication_date": "2023-01-15",
      "abstract": "本研究探讨了新的治疗选择...",
      "url": "https://pubmed.ncbi.nlm.nih.gov/12345678/"
    }
  ]
}


#### 健康主题

GET /api/health_finder?topic={topic}&language={language}


**参数:**
- `topic`: 搜索健康信息的主题
- `language`: 内容的语言（en 或 es，默认：en）

**示例响应:**
json
{
  "status": "success",
  "search_term": "diabetes",
  "language": "en",
  "total_results": 15,
  "topics": [
    {
      "title": "2型糖尿病",
      "url": "https://health.gov/myhealthfinder/topics/health-conditions/diabetes/diabetes-type-2",
      "last_updated": "2023-05-20",
      "section": "健康状况",
      "description": "关于管理2型糖尿病的信息",
      "content": ["糖尿病是一种疾病...", "治疗方法包括..."]
    }
  ]
}


#### 临床试验搜索

GET /api/clinical_trials?condition={condition}&status={status}&max_results={max_results}


**参数:**
- `condition`: 要搜索的医学状况或疾病
- `status`: 试验状态（招募中、已完成、进行中、不再招募、或全部）
- `max_results`: 返回的最大结果数量（默认：10，最大：100）

**示例响应:**
json
{
  "status": "success",
  "condition": "乳腺癌",
  "search_status": "recruiting",
  "total_results": 256,
  "trials": [
    {
      "nct_id": "NCT12345678",
      "title": "针对乳腺癌的新治疗方法研究",
      "status": "Recruiting",
      "phase": "Phase 2",
      "study_type": "Interventional",
      "conditions": ["乳腺癌", "HER2阳性乳腺癌"],
      "locations": [
        {
          "facility": "纪念医院",
          "city": "纽约",
          "state": "NY",
          "country": "美国"
        }
      ],
      "sponsor": "国家癌症研究所",
      "url": "https://clinicaltrials.gov/study/NCT12345678",
      "eligibility": {
        "gender": "女性",
        "min_age": "18岁",
        "max_age": "75岁",
        "healthy_volunteers": "否"
      }
    }
  ]
}


#### ICD-10 代码查询

GET /api/medical_terminology?code={code}&description={description}&max_results={max_results}


**参数:**
- `code`: 要查找的ICD-10代码（如果提供了描述则可选）
- `description`: 要搜索的医疗状况描述（如果提供了代码则可选）
- `max_results`: 返回的最大结果数量（默认：10，最大：50）

**示例响应:**
json
{
  "status": "success",
  "search_type": "description",
  "search_term": "糖尿病",
  "total_results": 25,
  "codes": [
    {
      "code": "E11",
      "description": "2型糖尿病",
      "category": "内分泌、营养和代谢性疾病"
    },
    {
      "code": "E10",
      "description": "1型糖尿病",
      "category": "内分泌、营养和代谢性疾病"
    }
  ]
}#### 通用工具执行

POST /mcp/call-tool


**请求体:**
json
{
  "name": "fda_drug_lookup",
  "arguments": {
    "drug_name": "aspirin",
    "search_type": "general"
  },
  "session_id": "optional-session-id"
}


### 程序化 API

当以编程方式使用 MCP 服务器时，可以使用以下函数：

#### FDA 药物查询

python
fda_drug_lookup(drug_name: str, search_type: str = "general")


**参数:**
- `drug_name`: 要搜索的药物名称
- `search_type`: 要检索的信息类型
  - `general`: 基本药物信息（默认）
  - `label`: 药物标签信息
  - `adverse_events`: 报告的不良事件

#### PubMed 搜索

python
p…

