a207-nutrition-assessment-mcp

a207-nutrition-assessment-mcp

Enables pediatric CKD nutrition assessment by calculating PRNT energy/protein targets, evaluating dietary intake against those targets, and screening for PEW risk, with support for dialysis, vegetarian diets, and edema corrections.

Category
Visit Server

README

a207-nutrition-assessment-mcp-nfyy(M3 · 营养评估)

儿童 CKD 营养评估 MCP。对应 PCP 契约 nutrition_assessment 输出位,是 Wave 2 首个交付包。

PRNT 目标唯一权威引擎:M5 的目标计算工具已去重并入本包(Schofield 交叉校验 / 水肿理想体重校正 / 腹透葡萄糖供能扣减),全项目只有一把"尺子"。

权威标尺:PRNT 2020(Shaw V, et al. Pediatr Nephrol 35:519-531)——与用户提供的《PRNT指南:能量与蛋白质需求及营养处方实操》一致。

工具清单

工具 类型 权限 说明
calc_prnt_targets 读 全 caller PRNT 唯一权威引擎。按年龄×性别分段 SDI 计算每日能量/蛋白质目标(含 CKD 分期/透析/素食/生长状态);并吸收 M5 特性:is_edema 水肿理想体重校正、pd_glucose_kcal_per_day 腹透葡萄糖供能扣减、Schofield 交叉校验
assess_intake_vs_target 读 全 caller 对照 PRNT 目标评估 3 日饮食日记均值,给达成率、缺口、PEW 风险
upsert_food_diary 写 parent_assistant / child_companion(MX-3) 写入饮食条目并聚合 diet_diary_3d;条目养分由调用方经 M5 计算后填入
get_food_diary_summary 读 全 caller 读取并聚合某患者饮食日记
assess_pew_risk 读 全 caller 独立 PEW(蛋白质-能量消耗)风险筛查
calc_growth_zscore 读 全 caller 增长 Z 评分(中国卫健委标准,非 WHO)。按 WS/T 423-2022(7 岁以下 体重/身高/BMI 年龄别 SD)+ WS/T 612-2018(7-18 岁身高年龄别)计算 HAZ/WAZ/BAZ:Z=(实测-中位数)/SD,SD 由标准附录给出。HAZ 0-18 岁全覆盖;WAZ/BAZ 仅 <7 岁(7-18 体重/BMI 标准未提供则跳过并 warning)。返回 5 等级 + 营养状况分类,并给 PRNT growth_status 建议(failure/overweight/normal,供 calc_prnt_targets 输入)

关键口径(与 contracts/pcp-schema.json 一致)

  • 能量 kcal、蛋白 g、体重 kg、身高 cm;无跨包调用。
  • 能量初始 = SDI 100%:生长不良取上限、超重取下限、正常取中点。
  • 蛋白质:目标取 SDI 上限;绝对下限取 SDI 下限(绝不可低于);透析额外补充(PD 0.15–0.30 / HD 0.10 g/kg/day)叠加于目标与下限;素食按倍数上调(蛋奶素 1.2 / 纯素 1.3)。
  • PE 比:理想 7–12%,CKD 可接受 5.3–6.4%(需总蛋白 ≥100% 需求)。

验证

python -m py_compile src/a207_nutrition_assessment_mcp/*.py
python tests/test_tools.py   # 83 断言全过

运行与部署

本地开发(最快验证)

fastmcp dev src/a207_nutrition_assessment_mcp/server.py

无需打包,直接起 stdio 服务,适合本地联调。

发布到 PyPI(与 his / lis / calc / router 完全同流程)

本项目 5 个 MCP 全部发布到 PyPI(维护者 NFYY)。发布后裸 uvx <包名> 即可拉取, GitHub Codespace / ModelScope 部署同理。报 uvx ... was not found in the package registry 唯一原因就是该版本还没发到 PyPI——把包构建并上传即可,和其他 4 个包一模一样。

命名说明:本包 PyPI 发行名是 a207-nutrition-assessment-mcp-nfyy(带 -nfyy 后缀), 不是 a207-nutrition-assessment-mcp——后者在 PyPI 上已被他人占用(极小概率撞名),故加 -nfyy 规避。 Python 导入名仍为 a207_nutrition_assessment_mcp(不变),仅发行名 / 控制台脚本名带后缀。 其余 4 个包名未被占用,故无后缀。

# 1. 构建 sdist + wheel(产物落 dist/)
python -m build

# 2. 校验产物可上传(应 PASSED)
python -m twine check dist/*

# 3. 上传到 PyPI(需 NFYY 凭据:环境变量 PYPI_API_TOKEN 或 ~/.pypirc)
python -m twine upload dist/*

用 uvx 运行(已发布后 —— 与另外 4 个一致)

uvx a207-nutrition-assessment-mcp-nfyy            # 裸名,和 his/lis/calc/router 一样
uvx --refresh a207-nutrition-assessment-mcp-nfyy  # 强制刷新、重拉最新版

本地 / 离线开发(不发布也能跑,仅开发用)

  • 包目录内直接跑:
    uvx --from . a207-nutrition-assessment-mcp-nfyy
    
  • 或装成本地工具后裸名可用:
    uv tool install --from . a207-nutrition-assessment-mcp-nfyy
    

GitHub / ModelScope 等远程部署

远程环境用已发布的 PyPI 包最直接(裸 uvx a207-nutrition-assessment-mcp-nfyy); 若想锁定 git 源,可用:

uvx --from "git+https://github.com/<owner>/<repo>.git" a207-nutrition-assessment-mcp-nfyy

确保 <repo> 指向本包仓库(根目录含 pyproject.toml),不要指向 A207 大仓根目录。

已知缺口(非阻断)

  • 增长 Z 评分已按中国卫健委标准实现(WS/T 423-2022 + WS/T 612-2018,数据资产 data/growth_ref_cn.json 由 PDF 抽取生成)。未采用 WHO 2007(用户判定偏旧)——若未来需 WHO 口径,再补 LMS 参考表。
  • WAZ/BAZ 仅覆盖 7 岁以下:WS/T 423 随附 7 岁以下体重/BMI 年龄别 SD 值;7-18 岁体重/BMI 标准未提供,故 7 岁以上跳过并给出 warning(未编造数据)。
  • 本机未安装 fastmcp,server.py 仅 py_compile 静态校验,未实跑 stdio 服务。

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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