miband-mcp
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., "@miband-mcpHow many steps did I take today?"
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.
miband-mcp
Chenxi · Let AI read your wrist
A Python MCP Server with zero third-party dependencies: reads the SQLite database exported by Gadgetbridge (Xiaomi Band health data), and exposes it via the MCP protocol to any MCP-capable AI client (Reasonix / Claude / Cursor / Kimi / GLM, etc.), allowing AI to answer questions like "How many steps did I take today?" and "How did I sleep last night?".
Architecture
小米手环 9 / 9 Pro / 10 → Gadgetbridge(手机端采集)→ SQLite 导出 → miband-mcp(读库+聚合)→ MCP 协议 → AIRelated MCP server: garmin-givemydata
Provided Tools
Tool | Parameters | Returns |
|
| Last N heart rate readings (time + bpm) |
|
| Sleep/wake time, sleep stages (light/deep/rem), total duration |
|
| Steps, average/max/min heart rate |
Quick Start
1. Prepare the Data Source
Install Gadgetbridge on your phone (the official repository is on Codeberg, not GitHub)
Follow the official pairing guide to connect the band (Xiaomi Band 9 requires the band to initiate the connection: Band settings → System operations → Connect to a new phone)
Extract the 32-character
encryptKeyfrom the Mi Fitness logs as the pairing key (note: once bound, it cannot be unbound, otherwise the key becomes invalid)Gadgetbridge settings → Automation → Enable Auto-export database
2. Run the MCP Server
# 零依赖,纯标准库
python miband_mcp.py --db /path/to/gadgetbridge.db3. Connect to AI (using Reasonix as an example)
[[plugins]]
name = "miband"
type = "stdio"
command = "python"
args = ["<路径>/miband_mcp.py", "--db", "<路径>/gadgetbridge.db"]
auto_start = trueThen start a new session with /new for it to take effect.
⚠️ Current Limitations
Data synchronization is manual: This project reads the SQLite database snapshot exported by Gadgetbridge and does not automatically pull data from the band.
Current workflow:
Band data is collected by Gadgetbridge (requires prior synchronization)
Manually send the exported database file (
.db) to the computer running miband-mcpAI reads the latest data from the database via MCP tools
Therefore: AI answers based on "the most recently synchronized data", not real-time data. If you need real-time reading, you can combine a Termux script + scheduled synchronization to automatically push the .db file to your computer (this project has not implemented this yet, PRs are welcome).
Development
python -m unittest discover -s tests -v # 34 个测试,零依赖License
MIT © ChenxiDawn · 晨熹
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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying health data from the Health Auto Export app on iPhone/iPad via MCP, allowing LLMs like Claude to access and analyze personal health metrics.760MIT
- AlicenseNot gradedqualityAmaintenanceDownloads all your Garmin health and fitness data into a local SQLite database and exposes 45 MCP tools for AI analysis, enabling assistants to query sleep, training load, HRV, and more.139AGPL 3.0
- AlicenseNot gradedqualityAmaintenanceRead-only MCP server that exposes Apple Health data (steps, workouts, sleep, etc.) from a local SQLite store, allowing AI agents to query health metrics without sending data to hosted services.4Apache 2.0
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server that exposes Garmin Connect health data from a local SQLite database to AI assistants, enabling queries for recent days, sleep, weekly trends, and a guarded SQL query surface.MIT
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
63 tools for Apple Health, Fitbit, Oura & Health Connect data in Claude, ChatGPT, Grok & Mistral.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/ChenxiDawn/miband-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server