Taiwan-Health-MCP

mcp
Security Audit
Warn
Health Warn
  • License — License: MIT
  • No description — Repository has no description
  • Active repo — Last push 0 days ago
  • Community trust — 122 GitHub stars
Code Warn
  • network request — Outbound network request in loader/loaders/loinc_taiwan_seed.py
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This MCP server integrates Taiwan-specific healthcare data (FDA drug info, ICD-10, LOINC, SNOMED CT, etc.) and provides 46 tools for querying medical terminologies, drug interactions, and clinical guidelines, fully supporting the FHIR R4 standard.

Security Assessment
Risk: Medium. The server requires downloading large medical terminologies and interacts with a complex infrastructure stack (PostgreSQL, Redis, pgBouncer). The automated code scan detected an outbound network request in the data loader (`loader/loaders/loinc_taiwan_seed.py`), which is consistent with fetching external datasets. While no dangerous system permissions or hardcoded secrets were found, deploying this tool inherently involves exposing clinically sensitive data. Because it routes external AI queries to your local database, strictly securing your `.env` file and local network ports is critical.

Quality Assessment
Quality is high. The project is actively maintained (last pushed 0 days ago) and has garnered 122 GitHub stars, indicating solid community trust. It is properly licensed under the permissive MIT license. The documentation is quite thorough, offering clear Docker setup instructions and detailing its production-ready architecture. The only minor flaw is that the repository itself lacks a short text description in its metadata.

Verdict
Use with caution — the code itself is safe, but the complex infrastructure and sensitive medical data payload require you to implement strict network and access controls before deploying.
README.md

Taiwan Health MCP Server

🇹🇼 台灣醫療健康資料整合 MCP 伺服器
整合 ICD-10-CM、SNOMED CT、RxNorm、LOINC、FDA 藥品/保健食品/營養、TWCore IG、臨床指引,支援 FHIR R4 標準

FHIR
Python
MCP
License


✨ 專案特色

  • 🇹🇼 台灣在地化 — 整合台灣 FDA、衛福部官方開放資料,支援繁體中文
  • 🔗 國際標準 — 符合 FHIR R4、ICD-10-CM 2025、LOINC 2.80、SNOMED CT、RxNorm、ATC
  • 🏥 46 個 MCP 工具 — 涵蓋診斷、藥品、檢驗、指引、術語、藥物交互作用
  • 🏗️ 生產就緒 — PostgreSQL 16 + pgBouncer + Redis + Prometheus,支援每秒數百請求
  • 🔄 自動同步 — FDA 藥品/保健食品/營養資料每週自動更新

🚀 快速開始

前置需求

  • Docker + Docker Compose
  • 至少 4 GB 可用記憶體

1. 準備環境

git clone https://github.com/healthymind-tech/Taiwan-Health-MCP.git
cd Taiwan-Health-MCP
cp .env.example .env
# 編輯 .env,至少設定 POSTGRES_PASSWORD

2. 啟動服務

docker compose up -d

這會啟動四個容器:postgrespgbouncerredisapp(MCP server)。

3. 載入術語資料

術語資料(ICD、LOINC、SNOMED CT 等)需手動下載並放置後執行 loader:

# 全部載入(建議首次部署)
docker compose --profile loader run --rm data-loader --all

# 或依需求單項載入
docker compose --profile loader run --rm data-loader --icd        # ICD-10-CM 2025
docker compose --profile loader run --rm data-loader --loinc      # LOINC 2.80
docker compose --profile loader run --rm data-loader --twcore     # TWCore IG
docker compose --profile loader run --rm data-loader --guideline  # 臨床指引
docker compose --profile loader run --rm data-loader --snomed     # SNOMED CT(5-15 分鐘)
docker compose --profile loader run --rm data-loader --rxnorm     # RxNorm

FDA 藥品/保健食品/營養資料會在伺服器首次啟動時自動從 FDA Open Data API 下載,無需手動載入。

4. 確認服務正常

# 查看服務狀態
docker compose ps

# 健康檢查(需先建立 MCP session)
curl http://localhost:8000/mcp -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}'

5. 連接 Claude Desktop

claude_desktop_config.json 加入:

{
  "mcpServers": {
    "taiwan-health": {
      "url": "http://localhost:8000/mcp",
      "transport": "streamable-http"
    }
  }
}

🏗️ 基礎架構

元件 版本 用途
PostgreSQL 16-alpine 主要資料庫(所有術語資料)
pgBouncer edoburu/latest 連線池(transaction mode,500 client → 30 PG 連線)
Redis 7-alpine 回應快取(TTL 策略,@cached 裝飾器)
Prometheus 指標監控(預設 port 9090)
FastMCP 1.x MCP server 框架
asyncpg 高效能 PostgreSQL 非同步驅動

PostgreSQL Schema

audit | icd | drug | health_food | food_nutrition | loinc | guideline | twcore | snomed | rxnorm


📋 核心功能(46 個 MCP 工具)

群組 工具數 功能
ICD-10 4 ICD-10-CM 診斷碼搜尋、併發症推論、衝突檢查
藥品 (FDA) 3 藥品查詢、詳細資訊、外觀識別
健康食品 (FDA) 2 健康食品查詢、保健分析
營養 (FDA) 4 營養成分、膳食分析、食品原料
健康食品+ICD 整合 1 疾病-保健食品對應分析
FHIR Condition 3 ICD-10 → FHIR R4 Condition 轉換、驗證
FHIR Medication 4 藥品 → FHIR R4 Medication/MedicationKnowledge
檢驗 (LOINC) 5 LOINC 碼查詢、參考值、結果判讀、批次判讀
臨床指引 5 指引查詢、用藥/檢查建議、治療目標、臨床路徑
TWCore IG 3 台灣核心 CodeSystem 查詢(30+ 健保碼系統)
SNOMED CT 6 概念搜尋、階層查詢、ICD-10 雙向對應
RxNorm 3 藥物交互作用檢查、藥品名稱解析、成分查詢

📦 資料集

資料集 版本 授權 說明
ICD-10-CM 2025 (NLM) 公開 診斷碼
ICD-10-PCS 2025 (CMS) 公開 手術/處置碼(78,948 筆,--icd 同時載入)
LOINC 2.80 LOINC License(免費) 87,000+ 檢驗碼
SNOMED CT International 20250601 SNOMED License(免費) 370,000+ 臨床概念、IS-A 階層
RxNorm 2024-06-03 公開 (NLM) 藥品命名、藥物交互作用
TWCore IG v1.0.0 公開 (MOHW) 30+ 台灣健保 CodeSystem
Taiwan FDA 藥品 每週更新 公開 (FDA) 66,000+ 藥品許可證
Taiwan FDA 健康食品 每週更新 公開 (FDA) 核可健康食品
Taiwan FDA 營養 每週更新 公開 (FDA) 食品營養成分資料庫
臨床指引 自整理 台灣醫學會指引(種子資料)

⚠️ 重要限制

  • 健康食品疾病對應 — 開發者整理,未經醫學驗證,不適合直接面向患者
  • FHIR 驗證 — 僅檢查必要欄位;生產環境請使用 HL7 FHIR Validator
  • ICD-10-PCS — 已內建 2025 版(78,948 筆),--icd 自動同時載入 CM 和 PCS;icd.procedures 未載入時工具自動降級
  • SNOMED CT — 需有效的 SNOMED International 授權(多數用途免費)
  • 藥物交互作用 — RxNorm interacts_with 不含嚴重程度評級,須由臨床醫師確認
  • pgBouncer transaction mode — 不相容於 LISTEN/NOTIFY 和 named prepared statements(asyncpg 已設 statement_cache_size=0

🤝 貢獻

歡迎貢獻!詳見 CONTRIBUTING.md

主要需求:

  • 補充/驗證臨床指引種子資料
  • 新增 LOINC 中文對照
  • 補充健康食品疾病對應(需醫學審核)
  • 補充/驗證臨床指引種子資料

📞 聯絡


🙏 致謝

  • 台灣衛生福利部、TFDA(ICD、藥品、健康食品、營養資料)
  • Regenstrief Institute(LOINC)
  • SNOMED International(SNOMED CT)
  • National Library of Medicine(RxNorm、ICD-10-CM)
  • HL7 International(FHIR)
  • WHO(ICD、ATC)
  • Twinkle AI — 感謝社群串接本專案打造 Twinkle Health Agent

⭐ 如果這個專案對您有幫助,請給我們一個 Star!

Reviews (0)

No results found