
shkyyy18/mi_fitness_data_bridge
Developer toolsThis page was translated automatically. Technical details may differ from the original. View the original
Unofficial Mi Fitness data export to local SQLite, CSV and JSON, with a local stdio MCP server. Xiaomi Sports and Health data export; Experimental and compatibility varies by device and region.
Overview
Suitable for personal backup, table organization, and personal analysis programs; Also provides Python interface and native stdio MCP query tools. The actual data types available depend on the device, account region, and upstream service. This project has no affiliation, endorsement, or support relationship with Xiaomi; Xiaomi, Mi Home, and Mi Fitness are trademarks of Xiaomi Inc. The adapter relies on non-public upstream interfaces, and after changes in Xiaomi's service, account region, device, firmware, or authentication methods, login, connection, or certain data types may become invalid at any time. Only accounts and data you have access to may be used. - Open the static demo above, toggle activity, sleep, exercise, and body measurement samples in the browser, and download the synthesized CSV/JSON. No installation, account, or token required. - After completing the installation steps below, run python examples/synthetic_demo.py; No setup needed, do not connect to Xiaomi. - Read compatibility and credential prerequisites first. Currently, there is no one-click account authorization process, nor can it guarantee availability on all devices and regions. Presentations only use synthetic records and do not prove true cloud synchronization or device compatibility. Static presentation pages do not accept credentials or health records. Real exports may include plaintext user_id; Local MCP does not mean the entire AI workflow is offline; please separately confirm how the client and model process data. The default cloud region is CN, but you can also specify other regions during configuration. Actual available records depend on account region, device, firmware, and Xiaomi upstream services; If a data type synchronizes successfully but returns 0 records, it may simply mean that data of that type is not available within the specified range. - : Steps, distance, activity calories, activity minutes, and related fields. - : Sleep sessions and stages. - 。 - : Weight, as well as the body composition field provided by the account or device. - : Includes resting heart rate when available. - Stress, and abnormal heart rate events when available. Step counts for daily activities are aggregated by local "minute slices": When a phone, band, or watch reports overlapping records for the same minute, a larger single record is retained instead of added to avoid double step counting across two devices. This rule is best for handling non-public upstream data, so the final values may still differ from the app's server-side corrections. - Medical diagnosis, treatment, health coaching, or weight loss advice; - Custody accounts, shared credentials, public token proxies, or multi-user cloud services; - Web dashboards, third-party fitness OAuth/Webhook, or meal photo analysis.
Overview (machine translated)
English: README.en.md
Xiaomi Device Data Export Skill (Mi Fitness Data Bridge)
**Save Xiaomi Mi Fitness data to your own computer and export it as CSV, JSON, or SQLite. ** Suitable for personal backup, table organization, and your own analysis programs; Also provides Python interface and native stdio MCP query tools. The actual data types available depend on the device, account region, and upstream services.
**Unofficial, experimental project. ** This project is not affiliated, endorsed, or endorsed by Xiaomi; Xiaomi, Mi Home, and Mi Fitness are trademarks of Xiaomi Inc. Adapters rely on non-public upstream interfaces, and login, connection, or certain data types may become invalid at any time after changes in Xiaomi’s service, account region, device, firmware, or authentication methods. Only for accounts and data you have access to.
▶ ** No login needed, let’s first see the synthesis data export demo** Compatibility and Getting Started · English
Test the results first, then connect your account
- **Just want to see the export effect? ** Open the static demo above, switch between activity, sleep, exercise, and body measurement samples in your browser, and download the synthesized CSV / JSON. No installation, account, or token required.
- **Want to verify local processes? ** After completing the installation steps below, run
python examples/synthetic_demo.py; No need tosetup, do not connect to Xiaomi. - **Want to sync your own data? ** Read compatibility and proof requirements first. Currently, there is no one-click account authorization process, nor can it guarantee availability across all devices and regions.
Demonstrations only use synthetic records and do not prove true cloud synchronization or device compatibility. Static presentation pages do not accept credentials or health records. Real exports may include plaintext
user_id; Local MCP does not mean the entire AI workflow is offline; please separately confirm how the client and model process data.
*All screenshots and examples in this article are synthetic data; Excluding vouchers, account identifiers, or genuine health exported data. *
Overview of features
| Features | Notes |
|---|---|
| Local cache | Save the synchronized and normalized records to your local SQLite database. |
| Portable export | Export JSON or CSV files for backup, handing over to your own analysis tools, or importing large models; Will not export saved passToken. |
| Local MCP Service | Query tools needed for personal automation and local AI workflows via standard input/output (stdio). |
| Python integration | Retains the mi_fitness_mcp namespace, compatible with existing downstream users. |
The default cloud region is cn, but you can also specify other regions during configuration. The actual available records depend on the account region, device, firmware, and Xiaomi’s upstream services; If a data type is synchronized successfully but returns 0 records, it may simply be that the specified range does not contain that type of data.
Supported Data
- Daily Activities: Step count, distance, activity calories, activity minutes, and related fields.
- Sleep: Sleep sessions and stages.
This page was translated automatically. Technical details may differ from the original.
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →Configuration
{
"mcpServers": {
"mi-bridge": {
"command": "mi-fitness-bridge",
"args": ["serve"]
}
}
}