Skip to content
MCP server

Mi Fitness Data Bridge

Local tool to export your own Mi Fitness health data to SQLite, JSON, CSV and MCP

Pricing
Open source
Platforms
CLI, self-hosted, Linux
Version
0.3.0
Listing updated
today

Similar MCP servers

About Mi Fitness Data Bridge

Mi Fitness Data Bridge is an open-source MCP server for health and science. It is available on CLI, self-hosted, Linux, macOS and Windows.

The README describes a local connector that pulls records from the Mi Fitness (Xiaomi) cloud into a SQLite database on your own machine. Once cached, the data can be exported as JSON or CSV files, or queried through a local stdio MCP server that an AI client can launch. Supported data types include daily activity, sleep, workouts, body measurements, heart rate and, where the device provides them, SpO2, stress and abnormal heartbeat events.

The project is explicitly unofficial and experimental. It relies on non-public Xiaomi endpoints, so logins, device support and certain data types can stop working when the upstream service changes. Access requires the user's own account ID and passToken, which the setup command stores in the OS keyring when available.

It suits people who want a personal backup of their fitness records or a local dataset for their own analysis scripts. The README states it is not a medical tool and does not offer coaching, dashboards or hosted accounts.

Tools this server provides (18)

Taken from the project documentation; the running server may differ.

get_connection_status
Checks connection status.
sync_data
Starts a data sync.
get_sync_status
Reports sync task status.
cancel_sync
Cancels a running MCP sync.
query_sync_history
Lists past sync tasks.
get_profile
Returns profile information.
query_daily_activity
Queries daily activity records.
query_metric_series
Queries metric time series.
get_data_coverage
Reports which date ranges have data.
query_body_measurements
Queries body measurement records.
query_sleep
Queries sleep records.
query_workouts
Queries workout records.
query_workout_series
Queries workout time series.
workout_detail_series
Queries per-second workout detail series.
query_heart_rate
Queries heart rate records.
query_spo2
Queries SpO2 records.
query_stress
Queries stress records.
query_abnormal_heart_beat
Queries abnormal heartbeat events.

What it does

Local SQLite cache
Synced and normalised records are stored in a database on the user's machine.
JSON and CSV export
Records can be exported by dataset and date range, with CSV written as UTF-8 with BOM for Excel.
Local stdio MCP server
Exposes query and sync tools to a local MCP client over standard input and output.
Interactive credential setup
The setup command hides passToken input and stores credentials in the OS keyring when available.
Synthetic demo
A bundled script runs the export pipeline on synthetic records without any network access.

Good for

  • Keep a personal offline backup of Mi Fitness activity, sleep and workout records
  • Load fitness history into a spreadsheet or personal analysis script via CSV or JSON
  • Let a local AI assistant query recent sleep or heart rate data through MCP
  • Test the export pipeline with synthetic data before connecting a real account

Pricing

Open source

Open source under AGPL-3.0-only for current versions; earlier releases were MIT.

Mi Fitness Data Bridge FAQ

Is this an official Xiaomi product?

No. The README says it is unofficial and experimental, with no affiliation or endorsement from Xiaomi.

Which data types can it sync?

Daily activity, heart rate, body measurements, sleep, workouts, SpO2, stress and abnormal heartbeat events, depending on device, account region and upstream support.

Does the MCP server connect to Xiaomi on startup?

No. According to the README it connects only when a status check or sync operation is requested.

Can the exported files be shared safely?

The README warns that exports are sensitive personal data and may include the plaintext user_id, so they should be stored and shared carefully.

Is Mi Fitness Data Bridge free?

Yes. Mi Fitness Data Bridge is open source, so you can use and self-host it for free.

What are the best alternatives to Mi Fitness Data Bridge?

The closest alternatives to Mi Fitness Data Bridge are mifit, Apple Health AI Bridge, Quantified Self MCP, Health Access MCP and durely insights MCP for Garmin.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers