Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Mi Fitness

FreeNot checked

MCP server for Mi Fitness cloud data. Provides a local SQLite-backed server to sync and query daily activity, heart rate, and body measurements.

GitHubEmbed

About

MCP server for Mi Fitness cloud data. Provides a local SQLite-backed server to sync and query daily activity, heart rate, and body measurements.

README

CI Release License

MCP server for Mi Fitness data.

This project provides a local SQLite-backed MCP server for Mi Fitness cloud data.

Current data coverage

Confirmed with the current cloud flow:

  • daily activity
    • steps
    • distance
    • active calories
  • heart rate
  • body measurements
    • weight
    • BMI
    • fat, water, bone, and muscle metrics
    • visceral fat
    • basal metabolism

Not yet confirmed with the current Xiaomi cloud endpoint:

  • sleep
  • workouts

Install

python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'

Setup

You need:

  • userId
  • passToken

Typical flow:

  1. Open https://account.xiaomi.com
  2. Sign in to your Xiaomi account
  3. Open browser DevTools
  4. Inspect cookies for account.xiaomi.com
  5. Copy userId and passToken

Configure the server:

mi-fitness-mcp setup --mode mi_fitness_cloud --user-id "<userId>" --pass-token "<passToken>" --region ru
mi-fitness-mcp doctor

For local endpoint exploration there is also a probe script:

python probe_mifitness.py --user-id "<userId>" --pass-token "<passToken>"

Use

mi-fitness-mcp sync --start-date 2025-04-01 --end-date 2025-05-31
mi-fitness-mcp serve

MCP client config

Example Claude Desktop config:

{
  "mcpServers": {
    "mi-fitness": {
      "command": "mi-fitness-mcp",
      "args": ["serve"]
    }
  }
}

Example prompts

  • Show my daily activity for the last 14 days
  • How has my resting heart rate changed this month?
  • Summarize my latest body measurements
  • Sync my latest Mi Fitness data

Commands

mi-fitness-mcp --help
mi-fitness-mcp setup --help
mi-fitness-mcp doctor
mi-fitness-mcp sync --help
mi-fitness-mcp serve

Development

pytest
python -m build

Troubleshooting

  • Connection: failed
    • verify userId and passToken
    • verify region, usually ru
  • Credentials not found
    • run setup again
  • sync returns no data
    • try another date range
    • verify that the data actually exists in Mi Fitness cloud

Security

  • passToken is stored via the system keyring
  • do not commit .env, local config files, or real credentials
  • rotate tokens if they were pasted into chats or shell history

Disclaimer

This is an unofficial project and is not affiliated with Xiaomi.

from github.com/kubulashvili/mi-fitness-mcp

Installing Mi Fitness

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/kubulashvili/mi-fitness-mcp

FAQ

Is Mi Fitness MCP free?

Yes, Mi Fitness MCP is free — one-click install via Unyly at no cost.

Does Mi Fitness need an API key?

No, Mi Fitness runs without API keys or environment variables.

Is Mi Fitness hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Mi Fitness in Claude Desktop, Claude Code or Cursor?

Open Mi Fitness on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Mi Fitness with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All data MCPs