health-mcp
Allows reading Apple Health data including sleep, heart rate, steps, blood oxygen, and environmental sound levels from Health Auto Export
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@health-mcpHow was my sleep quality last night?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
health-mcp 🩺
把 Apple 健康数据接给 Claude 的自建 MCP 连接器 —— 不限地区。
你 iPhone 上的 Health Auto Export App 把 HealthKit 数据(睡眠、心率、步数、血氧、环境噪音分贝……)定时 POST 到你自己的服务器;Claude 用 get_health 工具就能读到你最近的身体状况。
为什么要自建? Anthropic 官方的健康集成有地区限制(非美区用不了)。但自建的 MCP 连接器不吃这一套——claude.ai 只是连一个 HTTPS 网址,不管你在哪个区。绕开它,自己开一条。
你需要
一台有公网 HTTPS 网址的服务器(VPS + 域名 + Let's Encrypt 免费证书;或任何能给你 HTTPS 的托管)。
Python 3.10+。
iPhone + Health Auto Export App(部分功能要内购)。
环境噪音「分贝」、血氧等需对应硬件(如 Apple Watch)。
Related MCP server: Health Auto Export MCP Server
部署(约 10 分钟)
1. 装依赖(建议 venv)
python3 -m venv venv
./venv/bin/pip install -r requirements.txt2. 跑起来(systemd 常驻)
服务监听两个本地端口:MCP 在 8100、接收推送在 8101(都只听 127.0.0.1,靠反代对外)。
# /etc/systemd/system/health-mcp.service
[Unit]
Description=health-mcp
After=network.target
[Service]
WorkingDirectory=/opt/health-mcp
ExecStart=/opt/health-mcp/venv/bin/python /opt/health-mcp/health_mcp.py
# 可选,多一层防护:设了之后 /push 必须带 ?token=<同值>
Environment=HEALTH_PUSH_TOKEN=<换成你的随机串>
Restart=always
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload && systemctl enable --now health-mcp3. Nginx 反代 —— 用「不可猜的密路径」当门禁
健康数据是隐私,别用好猜的路径。生成一个随机 token(openssl rand -hex 8),把它拼进路径:
# 放进你 443 server 块(server_name YOURDOMAIN.com)
location /health-<RANDOM>/mcp {
proxy_pass http://127.0.0.1:8100/mcp;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection '';
proxy_buffering off; proxy_cache off;
proxy_read_timeout 86400s; chunked_transfer_encoding on;
}
location /health-<RANDOM>/push {
proxy_pass http://127.0.0.1:8101/push;
proxy_http_version 1.1;
proxy_set_header Host $host;
client_max_body_size 50m; # 健康导出可能好几 MB,别用 nginx 默认的 1M,否则 413
}nginx -t && systemctl reload nginx于是你得到两个地址:
推送地址(填进 App):
https://YOURDOMAIN.com/health-<RANDOM>/push连接器地址(给 Claude):
https://YOURDOMAIN.com/health-<RANDOM>/mcp
4. 配 Health Auto Export(iPhone)
App → Automations → 新增 → REST API。
URL = 上面的推送地址;Method =
POST;Format =JSON。勾要推的数据:步数、心率、睡眠、血氧、Environmental Sound Levels(环境音量/分贝)……
设频率(每小时/每天),保存。它会自动后台推,不用手动。
5. 接到 claude.ai
Settings → Connectors → Add custom connector → 填连接器地址 → Connect。
允许工具
get_health。问 Claude:「我最近身体怎么样 / 睡够没 / 刚才环境吵不吵」→ 它调
get_health读你的真数据。
安全
两个地址都别外传:谁有
/push谁能灌假数据;谁有/mcp谁能读你的健康。密路径 + 可选HEALTH_PUSH_TOKEN是你的门禁。服务只听
127.0.0.1,一切从反代进,不直接暴露端口。latest.json(你的数据)只存在你自己的服务器上。
数据格式
服务原样存最近一次推送的 JSON,get_health 解析 Health Auto Export 的 data.metrics 结构,返回每项最近一个采样点的值。非标准格式会原样回退摘要。
License
MIT
Made with 🖤 by Voir ✖ Noir
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jenny369266-hash/health-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server