MCP Healthcare Server
An MCP server for clinical workflows with tools for patient lookup, appointment booking, prescriptions, drug interactions, symptom triage, lab results, insurance eligibility, and telehealth, enforcing role-based access control and audit logging.
README
MCP Healthcare Server
A Model Context Protocol (MCP) server for clinical workflows, built per the
design in deep-research-report.md. The server exposes a governed set of
tools (patient lookup, appointment booking, prescription, drug-interaction
check, symptom triage, lab results, insurance eligibility, telehealth) and
enforces role-based access control and audit logging on every call.
This implementation is a development scaffold: data is held in memory
(seeded from src/data/*.json) and there is no real EHR/FHIR integration.
It is a safe environment to exercise the MCP surface and the security
enforcement layer.
Quick start
npm install
npm run dev # tsc-watch-style restart on src changes
# or
npm run build && npm start
The server speaks MCP over stdio and is ready to attach to any MCP-aware
client (Claude Desktop, MCP Inspector, custom agents).
Tool surface
| Tool | Role required | Purpose |
|---|---|---|
search_patient |
any clinical | Look up a patient by MRN or name+DOB |
get_patient_history |
any clinical | Recent appointments, conditions, meds |
find_available_slots |
any clinical | Provider availability, filterable by specialty |
book_appointment |
clinician / admin | Schedule a new appointment |
reschedule_appointment |
clinician / admin | Move an existing appointment |
get_active_medications |
any clinical | Patient's current medication list |
check_drug_interaction |
clinician / pharmacist / admin | Pairwise interaction check |
create_prescription |
clinician / admin | Write a prescription, surfaces allergy + interaction warnings |
analyze_symptoms |
any clinical | Rule-based triage with urgency + specialty |
suggest_specialist |
any clinical | Recommend a specialty for a description |
get_recent_lab_results |
any clinical | Fetch lab data, filter by test name |
analyze_lab_results |
any clinical | Summarize, count abnormalities, flag criticals |
check_eligibility |
clinician / admin | Verify insurance coverage and copay |
create_prior_authorization_request |
clinician / admin | Submit a prior auth request |
create_telehealth_session |
clinician / admin | Create a video session, return URL |
send_telehealth_link |
clinician / admin | Queue session link for delivery (stub) |
Every tool call must include a userId from src/data/users.json. The
server resolves the user, checks role permissions, then runs the handler.
Denials and runtime errors are recorded in the audit log.
Security model
- Audit log — one JSON line per call to
logs/audit-<YYYY-MM-DD>.log. Captures timestamp, userId, tool, SHA-256 of the input (16 hex chars — avoids writing PHI in plaintext), outcome, and duration. - RBAC — defined in
src/auth/rbac.ts. Read tools accept any clinical role. Write tools requireclinicianoradmin. Pharmacy tools also acceptpharmacist. Unknown user → denial. - Input validation — Zod schemas on every tool; the MCP SDK rejects malformed inputs before the handler runs.
File layout
src/
index.ts # bootstrap (stdio transport)
server.ts # createServer(): McpServer + audit + exit hooks
config.ts # env loading (LOG_DIR, DATA_DIR)
types.ts # domain types
audit/logger.ts # append-only audit log
auth/rbac.ts # user lookup + role checks
store/memoryStore.ts # in-memory store + loadSeed()
tools/
registry.ts # central tool context + module list
patient.ts # search_patient, get_patient_history
appointment.ts # find_available_slots, book, reschedule
prescription.ts # create_prescription, check_drug_interaction, get_active_medications
symptoms.ts # analyze_symptoms, suggest_specialist
lab.ts # get_recent_lab_results, analyze_lab_results
eligibility.ts # check_eligibility, create_prior_authorization_request
telehealth.ts # create_telehealth_session, send_telehealth_link
data/ # seed JSON (patients, providers, drugs, labs, etc.)
logs/ # audit log output (gitignored)
Seed users (for testing)
| userId | name | role |
|---|---|---|
u-clin-1 |
Dr. Aisha Khan | clinician |
u-clin-2 |
Dr. Marcus Lee | clinician |
u-nurse-1 |
Nurse Priya Shah | nurse |
u-recep-1 |
Jordan Park | receptionist |
u-pharm-1 |
Rita Chen, PharmD | pharmacist |
u-admin-1 |
Sam Whittaker | admin |
Out of scope (TODO for production)
- Real FHIR / HL7 / PACS / DICOM adapters
- OAuth2 / SMART-on-FHIR launch
- Persistent database (in-memory only)
- LLM-backed symptom analysis (rule-based placeholder)
- HIPAA-grade audit retention, encryption at rest, key rotation
- Rate limiting, network segmentation
References
See deep-research-report.md for the full design rationale, architecture
options, compliance checklist, and roadmap that informed this implementation.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。