a207-his-mcp

a207-his-mcp

Read-only MCP server providing pediatric CKD patient master data with tools for patient profiles, diagnosis, nutrition ceilings, guardian verification, and patient lists, designed for the CKDNutri project.

Category
Visit Server

README

a207-his-mcp

儿童慢性肾脏病(CKD)患者主数据 MCP 包(M1),模拟医院 HIS 患儿全量信息,供 CKDNutri 项目调度 Agent 与各业务子 Agent 锚定患儿身份与确诊事实。

本包为只读主数据源,不提供任何写入工具。分期以本服务返回的确诊值为准,调用方不得自行复算(MX-1 约束:营养师/家长助手命中分期词族时只读此处确诊值,不触发 M6 分期计算)。

五个工具

工具 说明
get_patient_profile 患儿档案:人口学、确诊分期、病因、透析方式、过敏史、医生营养上限。医生助手/风险预警/调度获全量视图(含 5 天饮食日记与跨月度生化);营养师视图不含生化;家长视图仅诊断、过敏与上限且必须携带 guardian_token
get_diagnosis 医生确诊的 CKD 分期与透析方式,供营养师/家长助手替代分期复算
verify_guardian_binding 核验监护人与患儿绑定关系,家长助手每次访问患儿数据前必经此步
list_patients 按条件(分期/透析/年龄带)筛选患儿清单,供联调与演示
get_nutrition_ceiling 医生设定的能量/蛋白/钾/磷/钠/液体上限,作为营养计算与食谱生成的硬约束

数据

  • data/patients.json:由 data/generate.py 确定性生成,覆盖 G2-G5 × HD/PD/非透析 × 各年龄带,36 例高拟真患儿,含 5 天食谱与跨月度生化。
  • 家长视图受限:caller=parent_assistant 须携带 guardian_token,否则返回字段裁剪或拒绝。

目录结构

a207-his-mcp/
├── pyproject.toml
├── README.md
├── src/a207_his_mcp/
│   ├── __init__.py
│   ├── core.py          # 纯逻辑(无 MCP/pydantic 依赖)
│   ├── server.py        # FastMCP >=2 服务定义(5 个 @mcp.tool)
│   ├── models.py        # pydantic v2 入参模型(extra=forbid)
│   └── data/patients.json
└── tests/test_tools.py

设计约束

  • 不依赖、不 import 任何其它 a207-*
  • 只读;caller=child_companion 一律拒绝
  • 错误以 {"ok": false, "error": ...} 形式返回

运行与测试

# 编译(server.py/models.py 依赖 fastmcp/pydantic,仅做语法校验)
python -m py_compile src/a207_his_mcp/*.py

# 纯标准库自测(core 逻辑不依赖 fastmcp/pydantic,可独立运行)
python tests/test_tools.py

返回非零退出码表示存在失败用例。

启动 MCP 服务

pip install -e .
python -m a207_his_mcp.server
# 或
fastmcp dev src/a207_his_mcp/server.py
# 或(已注册 console script)
uvx --from . a207-his-mcp

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured