Skip to main content
MCP server CX Codex

Mi Fitness Data Bridge — Claude Code MCP server: how to install

Local-first bridge that saves Xiaomi Mi Fitness records into SQLite or JSON files. Exposes activity and sleep metrics directly to AI agents via stdio MCP.

Open on GitHub

What Mi Fitness Data Bridge does

The bridge runs locally. It downloads Mi Fitness records directly into a personal SQLite database. Through stdio MCP tools, an agent can inspect sleep sessions, step counts, workouts, and heart rate samples. When a watch and phone report overlapping step entries for the same minute, the parser takes the larger value to prevent double-counting.

Setup requires Python 3.11 or later. You configure credentials interactively with mi-fitness-bridge setup, entering your user_id, passToken, and target region. Because this tool relies on private Xiaomi endpoints, changes to remote authentication or API schemas can break account synchronization at any time.

What it helps with

  • cache daily activity, sleep, and heart rate records in a local SQLite database
  • export workouts and body composition measurements to JSON or CSV files
  • give coding agents access to personal health history via local stdio tools
  • diagnose configuration errors and database state with mi-fitness-bridge doctor

Example prompts for the agent

  • Check my Mi Fitness connection status and display recent activity records
  • Query my sleep stages and average heart rate from last week using MCP tools
  • Run a sync for workouts recorded in July 2026 and inspect pace series

How to install Mi Fitness Data Bridge

Install

The MCP registry has no launch command for it: see the repository README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Mi Fitness Data Bridge

How to install Mi Fitness Data Bridge in Claude Code?

Clone the repository using git clone https://github.com/shkyyy18/mi_fitness_data_bridge.git, install it in a Python 3.11+ environment with pip install -e ., and run mi-fitness-bridge setup. Next, register mi-fitness-bridge with argument serve in your MCP client settings.

What does Mi Fitness Data Bridge do?

It downloads your Xiaomi fitness records into an offline SQLite database or CSV/JSON files, then runs a local stdio MCP server for agent queries.

What credentials are required to sync data?

You need your Xiaomi user_id, a valid passToken, and your account region (cn by default). The interactive setup utility stores these secrets in your operating system keyring.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor