boyuan-health-bridge
MCP server for read-only access to Xiaomi Mi Fitness shared family health data, enabling queries for family members, health summaries, and historical metrics via ChatGPT.
README
柏渊健康桥
把小米运动健康的「亲友共享」数据,以只读 MCP 工具连接到 ChatGPT。
项目不会把小米凭证或健康数据写进 Git。远程 MCP 使用 OAuth 2.1、PKCE 和短时访问令牌保护,所有健康工具均为只读。
手机上完成部署
- 点击下方按钮,在 Render 创建服务。
- Render 会要求填写
OWNER_SECRET。请设置一个至少 12 位、只有你知道的连接密码。 - 部署完成后,打开
https://你的服务地址/setup,输入连接密码,按页面提示登录小米账号。 - 登录成功后复制页面中的 token JSON。
- 回到 Render 服务的 Environment,新增密钥
MI_TOKEN_JSON,粘贴 JSON 并保存。Render 会自动重新部署。 - 打开
https://你的服务地址/health,看到configured: true即配置完成。
连接 ChatGPT
- 在 ChatGPT 的 设置 → 安全与登录 中打开开发者模式。
- 进入 插件,点击右上角加号。
- MCP 地址填写
https://你的服务地址/mcp。 - 授权页面出现后,输入部署时设置的
OWNER_SECRET。
连接后可以直接问:
- “看看我今天的健康摘要”
- “列出亲友共享里有哪些人”
- “看看最近 7 天的睡眠和心率”
提供的只读工具
list_family_members:列出已经共享健康数据的亲友。get_health_snapshot:读取最近一次同步的健康快照和每日摘要。get_health_history:按日期读取心率、睡眠、步数、血氧、卡路里等历史数据。get_bridge_status:检查桥接服务是否已配置,不返回任何密钥。
本地开发
python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
export OWNER_SECRET='change-this-password'
export OAUTH_SIGNING_SECRET='change-this-signing-secret-at-least-32-chars'
uvicorn app.server:app --reload
测试使用合成数据,不会访问真实小米账号:
pytest
数据与安全
- 只读取亲友已主动分享给登录账号的数据。
- 不提供邀请、删除亲友或修改健康数据的工具。
MI_TOKEN_JSON只应放在部署平台的加密环境变量中。/setup生成的 token 页面带有no-store,且需要OWNER_SECRET。- 这是个人健康数据桥接工具,不用于医疗诊断或紧急情况。
上游与许可
健康数据访问由 Misty02600/mi-fitness-python 提供。本项目采用 GPL-3.0 许可。
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.