mi-health-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mi-health-mcp
Project Introduction
mi-health-mcp exposes Xiaomi Sports Health's family member data, including sleep, heart rate, and steps, to LLM clients such as RikkaHub through the MCP protocol. The service runs on Cloudflare Workers, requiring no self-hosted server, and can be used within Cloudflare's free tier. This project is based on the interface reverse-engineering work of Misty02600/mi-fitness-python, rewritten as a Cloudflare Worker + MCP service. Thanks to the upstream project.
Related MCP server: mi-health-mcp
One-Click Deploy
The deployment flow requires binding a Cloudflare KV. If the button flow prompts you to create or select a KV namespace, follow the guidance and make sure the binding is named MI_HEALTH_KV.
Manual Deployment When the Button Doesn't Work
You need Node.js 20 or higher, and a Cloudflare account.
git clone https://github.com/wusaki0723/mi-health-mcp.git
cd mi-health-mcp
npm install
npx wrangler login
npx wrangler kv namespace create MI_HEALTH_KVFill the namespace ID output by the command into wrangler.toml, replacing your-kv-namespace-id. Then set the access token and deploy:
npx wrangler secret put AUTH_TOKEN
npx wrangler deployUse a long random string you generate yourself for the AUTH_TOKEN value. Do not write it into source code, wrangler.toml, or Git.
Post-Deployment Configuration
Create a KV namespace:
npx wrangler kv namespace create MI_HEALTH_KVFill the namespace ID output by the command into
[[kv_namespaces]]inwrangler.toml, replacingyour-kv-namespace-id, then redeploy. When using one-click deploy, you can also create and bind the KV by following the guidance in the button flow.Interactively set the MCP authentication token. Generate a long random string yourself for the token:
npx wrangler secret put AUTH_TOKENRedeploy when configuration changes:
npx wrangler deploy
The KV binding name must remain MI_HEALTH_KV.
Client Configuration
In RikkaHub, open "Settings > MCP > New Connection > Streamable HTTP" and fill in:
URL:
https://<your-domain>/mcpCustom Header:
Authorization: Bearer <your-token>
The <your-token> must exactly match the AUTH_TOKEN set during deployment.
Usage Flow
The client first calls
health_login_startto obtain theloginUrl.Use any QR code tool to render the
loginUrlinto a QR code.Scan the QR code with the Xiaomi Sports Health app and confirm the login.
The client polls
health_login_polluntil it returnssuccess.After a successful login, use
health_latest,health_sleep,health_heart, orhealth_stepsto query data.
The Worker does not generate QR code images. When querying, it dynamically reads the family member list and uses the first item; user IDs are not hardcoded in the code.
Usage Boundaries
For logging into your own Xiaomi account and querying family member data you have been authorized for only. Do not use it for any purpose that infringes on others' privacy or violates Xiaomi's user agreement.
License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0), consistent with the upstream Misty02600/mi-fitness-python license.
Related MCP Connectors
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Cloudflare Workers MCP server: ai-model-router
Multi-tenant hosted MCP server for Oura Ring — 21 read-only tools, OAuth per user.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to query Xiaomi Mi Fitness authorized family members' sleep, heart rate, and step data via MCP after QR-code login, deployable on Cloudflare Workers.GPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to access authorized Xiaomi Mi Fitness health data, including sleep, heart rate, and steps, through an MCP server deployed on Cloudflare Workers.GPL 3.0
- AlicenseNot gradedqualityCmaintenanceExposes Xiaomi Mi Fitness family health data — sleep, heart rate, and step counts — to LLM clients over the MCP protocol. Runs on Cloudflare Workers with QR-code login and token-based authentication, requiring no self-hosted server.GPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables LLM clients to authenticate with Xiaomi Health and query authorized family members' sleep, heart rate, and step data via MCP, with deployment on Cloudflare Workers.GPL 3.0