# Mi Fitness Data Bridge

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 51
- Author: shkyyy18
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/shkyyy18/mi_fitness_data_bridge
- Updated: 2026-10-18
- HTML: https://affpapa.org/en/nevibecode/mcp/mi-fitness-data-bridge

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

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

## When to use it
- 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
- 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

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
