zepp-mcp
You can query your own Zepp/Amazfit health and workout data locally through an MCP client, read-only.
Get daily steps, distance, calories and sleep-stage breakdown for a date range.
Read per-minute heart rate for a day, preserving missing readings as
null.Get sleep details for a night: light/deep/REM/awake minutes, score and resting heart rate.
List workouts across all sports with sport-specific metrics, optionally filtered by sport/date/limit.
Fetch full workout detail by
track_idandsource, including laps, streams and GPS.Inspect the server’s known schema, verified units and uncertainty via
zepp_describe_schema.Make arbitrary GET requests to Zepp API endpoints not yet modelled.
Check stored credential and connection status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zepp-mcp How was my sleep last night and what's my heart rate trend today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
zepp-mcp
Read your Zepp / Amazfit health and workout data from any MCP client.
🖥️ 100% local · stdio transport · no server, no cloud relay, no third party
Ask your assistant "how has my SWOLF trended this month?" or "did I sleep worse on days I trained hard?" and get answers from your own watch data.
› How have my swims gone this week?
Date Distance SWOLF Strokes Avg HR
Aug 16 567 m 36 323 131
Aug 15 756 m 38 481 139
Aug 14 630 m 38 361 138
SWOLF is trending down across the week — you're covering
each length with fewer strokes and less time.Built on the private Zepp mobile API, with every decoder verified against real captured responses.
This runs entirely on your own machine
zepp-mcp is a local stdio server. Your MCP client launches it as a
child process on your laptop and talks to it over stdin/stdout — the same
way it runs any local command.
No hosted service. There is nothing to sign up for and no backend I operate.
No cloud relay. Your health data never passes through any server but Zepp's own.
No open port. stdio only — nothing listens on the network.
Your credentials stay in a local
.env, never in a client config file.The only outbound connection is HTTPS from your machine to Zepp's API, read-only, exactly as the Zepp app does it.
See Architecture for the full picture.
Unofficial. This project is not affiliated with, endorsed by, or supported by Zepp Health or Huami. It talks to a private API that can change or break without notice. See Legal and safety.
Contents
Architecture · Tools · Privacy · How it works
Related MCP server: Mi Fitness MCP
Features
Every sport, named honestly. 141 Zepp sport codes are named — running, cycling, swimming, team and racket sports, gym work, martial arts, dance, water and winter sports and more. Each carries a
sport_name_confidence(confirmed on real data, corroborated by other clients, or catalogued from the watch's sport list) and asport_family, so "all my cycling" covers outdoor, indoor, road and mountain rides. Each family has its own metrics: SWOLF and stroke counts for swims, pace and cadence for runs, sets and reps for the gym, jump counts for skipping. You can name any code yourself withZEPP_SPORT_CODES.Sleep with all four stages. Light, deep, REM and awake, not just the two most implementations report.
Sleep in depth. Latency, time in bed and efficiency, plus each morning's overnight HRV, readiness score, sleep respiratory rate and overnight SpO₂ (ODI), for one night or a whole month.
Recovery and stress. Readiness and its sub-scores, HRV (overnight and all-day RMSSD), resting-HR trend, all-day stress, PAI, Body Charge, respiratory rate, SpO₂ spot checks and daily goals, each with a summary and a trend line.
Training analytics. Volume by week, month or sport. Aggregate pace computed correctly: total distance over total moving time, never an average of paces. Records within a range, Zepp's own personal-best flags, and progression series for 20 metrics (SWOLF, pace, cadence, VO₂ max, ground contact time, …).
One-call overviews. "How have the last 30 days gone?" is a single tool call.
Per-minute heart rate and steps, with no-reading markers preserved as
nullrather than dropped, and hourly step totals.Lactate threshold HR and pace, tracked over time from the watch's own estimate log — the anchor for every training zone — plus VO2 max, per-run time-in-zone distribution and, once a Zepp Coach plan is active, per-session plan progress.
Running dynamics: ground contact time, vertical oscillation, running power and stride ratio, alongside the elevation and climb fields runs share with hikes and rides.
Lap and stream decoding for individual workouts: per-length swim laps, per-set strength sets (reps, load, rest), km splits, cadence and stride per second, and pauses. Moving and paused time are separated on every workout.
Smart-scale body composition. Weight, height and BMI, plus body fat, water and muscle percentages, bone mass, visceral fat and BMR when synced from a real bio-impedance scale rather than a manual entry.
Honest about uncertainty. Unverified units are flagged, unknown sport codes are named as unknown, and an empty response is never reported as confirmed absence.
Nothing stored. No health data touches disk. Only the API token is cached, so restarts don't trigger a fresh login.
Local by construction. A stdio child process on your machine. No hosted service, no relay, no listening port.
Setup for Users
If you just want to use the server with your MCP client, you don't need to clone the repository. You can run it directly using uvx (the uv tool runner).
Add the server to your claude_desktop_config.json and pass your credentials securely via environment variables:
{
"mcpServers": {
"zepp": {
"command": "uvx",
"args": ["zepp-mcp"],
"env": {
"ZEPP_EMAIL": "your-email@example.com",
"ZEPP_PASSWORD": "your-password"
}
}
}
}macOS ·
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows ·
%APPDATA%\Claude\claude_desktop_config.json
Restart the app completely afterwards.
Install the server globally for Claude Code. Make sure to pass your credentials securely as environment variables:
export ZEPP_EMAIL="your-email@example.com"
export ZEPP_PASSWORD="your-password"
claude mcp add zepp -s user -- uvx zepp-mcp-s user makes it available in every project. Verify with claude mcp list.
Create or edit ~/.gemini/config/mcp_config.json (global, applies to all projects):
{
"mcpServers": {
"zepp": {
"command": "uvx",
"args": ["zepp-mcp"],
"env": {
"ZEPP_EMAIL": "your-email@example.com",
"ZEPP_PASSWORD": "your-password"
}
}
}
}For a single project only, place the same file at .agents/mcp_config.json in
your project root instead.
Restart the Antigravity session afterwards — MCP servers are loaded at startup.
Zepp counts failed logins against ashared 10-attempt lockout. This server never retries a failed login, and you shouldn't either. If authentication fails, check your credentials carefully before trying again.
Developer Setup
If you want to contribute, run tests, or modify the code locally. Requires uv and Python 3.11+.
git clone https://github.com/DhavalBhimani44/zepp-mcp.git
cd zepp-mcp
uv sync
cp .env.example .env # add ZEPP_EMAIL and ZEPP_PASSWORD
chmod 600 .envVerify it works — the test suite needs no network and no credentials:
uv run pytest # 264 tests against the fixture corpus
uv run tools/smoke_test.py # starts the server, lists its toolsThen check your account connects:
uv run python -c "from zepp_mcp.server import zepp_auth_status; print(zepp_auth_status())"Connecting a local clone
If you're testing your local clone, configure your client to use the local directory instead of uvx.
{
"mcpServers": {
"zepp": {
"command": "uv",
"args": ["--directory", "/path/to/zepp-mcp", "run", "zepp-mcp"]
}
}
}(Credentials are read from your local .env, so they stay out of the config file)
claude mcp add zepp-local -s user -- uv --directory /path/to/zepp-mcp run zepp-mcpAdd to ~/.gemini/config/mcp_config.json (global) or .agents/mcp_config.json (workspace):
{
"mcpServers": {
"zepp": {
"command": "uv",
"args": ["--directory", "/path/to/zepp-mcp", "run", "zepp-mcp"]
}
}
}Credentials are read from your local .env.
Architecture
Everything inside the dashed box runs on your laptop. There is no server in the middle, and the single outbound connection is the same HTTPS call the Zepp app itself makes.
flowchart TB
subgraph machine["YOUR MACHINE - the whole system lives here"]
direction TB
client["<b>MCP Client</b><br/>Claude Code · Claude Desktop<br/>any MCP host"]
subgraph proc["zepp-mcp · local child process"]
direction TB
tools["<b>server.py</b><br/>14 MCP tools"]
norm["<b>workouts.py · decode.py · events.py · analysis.py</b><br/>stream decoding · lap splitting · event decoding<br/>sentinel stripping · unit attribution · aggregates"]
http["<b>client.py</b><br/>empty-200 classifier · re-auth once<br/>pagination · in-memory cache · pacing"]
auth["<b>auth.py</b><br/>password login · region discovery"]
tools --> norm
norm --> http
http --> auth
end
env["<b>.env</b><br/>credentials · mode 0600"]
cache[("<b>~/.zepp-mcp/token.json</b><br/>API token only · mode 0600<br/>no health data on disk")]
end
zepp["<b>Zepp Cloud API</b><br/>api-mifit-region.zepp.com"]
client <-->|"<b>stdio</b> · JSON-RPC over stdin/stdout<br/>no network · no open port"| tools
env -.->|"read at startup"| auth
auth -.->|"token only"| cache
http <-->|"<b>HTTPS · read-only</b><br/>the only outbound connection"| zepp
Reading the diagram
Boundary | What crosses it |
Client ↔ server | JSON-RPC over stdio. A pipe between two processes on your machine — not a socket, not a port. |
Server ↔ Zepp | HTTPS, read-only. Your credentials and your data go nowhere else. The server never writes to your Zepp account. |
Server ↔ disk | The API token, and nothing else. No workout, sleep or heart-rate data is ever persisted. |
Lifecycle. You never start the server. Your MCP client spawns it when it launches, speaks JSON-RPC over the pipe, and kills it on exit. Every session gets a fresh process — which is exactly why the token is cached, so a restart does not mean a fresh login against Zepp's shared 10-attempt lockout.
Tools
Tool | Returns |
| One-call overview of a period: activity, sleep, workouts, readiness, HRV, resting HR, stress, PAI |
| Steps, distance, active calories, activity periods and sleep per day, for any range; optional hourly steps |
| One night or a range: stages, score, latency, time in bed, efficiency, naps, overnight HRV, respiratory rate, SpO₂ |
|
|
| Per-minute heart rate for a day, plus statistics |
| All workouts, all sports, paginated, with sport-specific metrics, moving time, derived pace, zones and sets |
| Volume by week/month/year/sport, records, and per-workout progression for 20 metrics |
| Laps, strength sets, km splits, pauses, streams (HR, speed, cadence, stride) and GPS for one workout |
| Lactate threshold HR/pace and VO2 max over time |
| Smart-scale weight, BMI, and (real scale sync only) body fat/water/muscle %, bone mass, visceral fat, BMR |
| Height, weight, age, wear hand, paired devices. Never names, locations or device keys |
| The metric catalogue: units, sources, verification level, known gaps |
| Arbitrary GET, for endpoints not modelled yet |
| Token expiry and region host |
Every value says whether it was measured by the watch or derived by the server (aggregate pace, weighted averages, trends), and every metric carries a verification level. The full inventory, with evidence per row, is in docs/capability-matrix.md.
Configuration
Variable | Default | Effect |
| — | Credentials, from |
| system zone | IANA zone for data that carries none (stress, PAI) |
| — | JSON (or a path to a JSON file) naming sport codes you have checked in the Zepp app, e.g. |
|
| Path, or |
| on | In-memory response cache; |
|
| Seconds between outbound requests |
| off | Re-enables httpx request logging (which includes your user id) |
Privacy
This is health data. The design reflects that.
Nothing is hosted.
zepp-mcpis a local stdio process. There is no backend I run, no account to create, and no relay your data passes through.No health data is written to disk. Responses are cached in memory only, and never for long: anything covering the last week (or coming back empty) expires after five minutes, because a watch that syncs late fills in past days; older ranges expire after an hour.
Only the API token is cached, at
~/.zepp-mcp/token.json(mode0600). SetZEPP_TOKEN_CACHE=offto disable and log in every time.Credentials live in
.env, never in client config files, never in source, never in logs.The fixture corpus is anonymised and CI-gated. Captures come from a real account, so
tools/check_fixtures.pyruns on every push and fails the build on any name, MAC address, serial number, email, coordinate stream or credential-shaped token. GPS-bearing workouts are excluded entirely — a running route starts where you live.Location never reaches the model by accident. Split rows embed a geohash of where each kilometre ended; it is stripped at decode time. GPS streams are returned only when explicitly requested.
Device secrets are allowlisted out. Device records carry the watch's Bluetooth pairing key. Only named, safe fields (model, firmware, data source id) are ever returned.
If you contribute a fixture, run uv run tools/anonymize_fixtures.py first,
and install the pre-push hook — force pushes are blocked on main, so a bad
push cannot be rewritten away:
ln -sf ../../tools/hooks/pre-push .git/hooks/pre-pushSee CONTRIBUTING.md.
How it works
A few decisions are load-bearing, and each came from evidence rather than assumption.
Zepp returns HTTP 200 with an empty body both for "no data in this range" and
for requests it silently rejects. The two are indistinguishable from a single
response, so the client reports status: "no_data" with that ambiguity
attached, and the server instructs the model not to state it as confirmed
absence. Rendering it as "you didn't exercise that week" turns a fault into a
fact.
heart_rate and temperature are delta-encoded; currentDistance and
speed are absolute. Decoding one as the other yields entirely plausible
numbers, so each was settled by decoding both ways and checking against the
workout's own summary totals — currentDistance resolves to 75600 cm against
a reported 756 m, and speed integrates to 1061 m against a reported 1064 m.
Stage modes 4/5/8/7 are light/deep/REM/awake, verified by recomputing each
night's stage minutes and matching the summary's own lt/dp/dt/wk
fields across three nights. Reporting deep + light as total sleep silently
drops REM — 73, 53 and 96 minutes on those nights.
-1 is the general not-applicable marker, but altitude uses -20000, angle
-361, elevation -100, temperature -274 (below absolute zero), and SpO₂
uses both -1 and 0. They are stripped per field family. Values also
arrive as strings about half the time (dis is "756.0"), so stripping
coerces before comparing — otherwise swolf: "-1" survives onto a bike ride.
elevationGain is centimetres: a hike reporting 27961 sits beside its own
altitude_ascend: 279 in the same row. It is converted and renamed to
elevation_gain_metres, because 27961 emitted raw reads as a plausible
metre figure and turns a 280 m hill into an alpine ascent.
Workouts carry syncedTimezone; daily data carries a tz offset in seconds.
Rendering in UTC turns an 08:05 swim into 02:35 and moves a 00:20 bedtime to
the previous evening.
Sport codes are numeric with no name anywhere in the payload, so the map was
built by confirming each code against the Zepp app. An unrecognised code
reports as unknown_sport_<code> rather than a guess. Streams with
unconfirmed units carry unit_verified: false, and unrecognised streams are
returned raw rather than decoded with an assumed encoding.
Known gaps
Documented rather than hidden — zepp_describe_schema reports these at call
time too.
Gap | Detail |
Live verification | The 2026-10-31 expansion was verified against the committed corpus, not a live account. |
Rolling training load, VO₂ max series |
|
Strength exercise names | Sets, reps, per-set load and rest are decoded; exercise codes have no verified name table. The load column's unit (kg or lb) is unverified. |
Lap column names | Swim columns 1, 13 and 14 and strength columns 1/4/5/21/22/28 are confirmed. The rest are inferred or raw. |
| Units or meanings unconfirmed; flagged |
RTPC | Present on every sport, reads a constant 21 outside running, meaning unconfirmed. |
Per-second HR, Body Charge stress blob, ECG, blood pressure, women's health | Index or route discovered but not decodable or not populated on any account available here. See the capability matrix. |
Multisport, GPS decoding | Built but untested: no triathlon recorded, and GPS workouts are deliberately excluded from the corpus. |
Sport codes | 141 codes named: 9 confirmed on real data, 7 corroborated, 11 reported once, 112 catalogued from the watch's sport list, and 2 contested (13, 17), which stay |
Zepp Coach | No dedicated endpoint across 22 probed routes (details). Plan progress arrives through the workout row as |
| Fat/water/muscle/bone/BMR use a schema from a community capture (AlexxIT/SmartScaleConnect), not this project's own data. |
Help with any of these is welcome — see CONTRIBUTING.md.
Examples
Three runnable analyses, with real output, live in
examples/: swim technique against volume, training
load against recovery, and within-session pacing decay.
Project layout
zepp_mcp/ the server
auth.py password login, region discovery, token cache
client.py HTTP, empty-200 classification, re-auth
decode.py band data, workout streams, laps, splits, gait
events.py readiness, HRV, respiratory rate, stress, PAI, SpO2, Body Charge
workouts.py index row -> normalised, sport-aware summary
analysis.py aggregates, records, trends (all derived, all labelled)
metrics.py metric catalogue: units, sources, verification levels
sports.py every sport code, with confidence, family and sources
codes.py confirmed sport codes, sleep stages, sentinels
body.py scale readings, profile, device allowlist
server.py MCP tool definitions
examples/ runnable analyses with real output
tools/ anonymiser, privacy gate, smoke test, endpoint probe
tests/fixtures/ anonymised real API captures
docs/ design spec and API reverse-engineering findings
spike/ the throwaway probe that produced the fixturesContributing
Contributions are welcome — see CONTRIBUTING.md for the development setup, testing approach, and the rules around fixtures and personal data. By participating you agree to the Code of Conduct.
Especially useful: sport codes from watches other than the maintainer's, and confirmation of the units flagged above.
Legal and safety
Not medical advice. This is a data-access tool. Nothing it returns is a diagnosis, and it should not be used to make medical decisions.
Unofficial and unsupported. Not affiliated with Zepp Health or Huami. The API is private and may change or break at any time.
Your account, your responsibility. Review Zepp's terms before use. The server is read-only and never modifies your account, but automated access may not be something they permit.
No warranty. See LICENSE.
Security
The threat surface is deliberately small: a local process with no listening port, one outbound HTTPS destination, and a single credential file.
To report a vulnerability, see SECURITY.md. Please don't open a public issue for anything credential-related.
License
MIT © 2026 Dhaval Bhimani
Available Tools
8 toolszepp_auth_statusA
Check the stored Zepp credential and connection.
Inputs: no named parameters. Returns: object
zepp_daily_summaryB
Daily steps, distance, calories and sleep for a date range. Sleep is broken into light/deep/REM/awake minutes.
Inputs: to_date, from_date. Returns: object
zepp_describe_schemaA
Explain what this server knows: which sport codes are identified, which stream units are verified, and where the decoding is still uncertain.
Inputs: no named parameters. Returns: object
zepp_heart_rateC
Per-minute heart rate for a single day, with a summary. Minutes with no reading are returned as null.
Inputs: date, include_series. Returns: object
zepp_list_workoutsA
List workouts across all sports, with sport-specific metrics (SWOLF and stroke counts for swims, pace and cadence for runs, set counts for strength work).
Inputs: limit, sport, to_date, from_date. Returns: object
zepp_raw_requestA
Send an arbitrary GET to the Zepp API. Use this to reach endpoints this server does not model yet.
Inputs: path (required), params. Returns: object
zepp_sleepC
Sleep breakdown for a single night: light, deep, REM and awake minutes, sleep score and resting heart rate.
Inputs: date. Returns: object
zepp_workout_detailA
Full detail for one workout: laps, time-series streams and GPS. Get the track_id and source from zepp_list_workouts.
Inputs: source (required), track_id (required), include. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct aspect of the Zepp API: daily aggregates, heart rate, sleep, workout list, workout detail, schema introspection, raw API access, and authentication status. There is no meaningful overlap between them, even though daily_summary and sleep both touch sleep data—they serve different granularity levels.
All tool names share the 'zepp_' prefix, but the naming convention is mixed: some are noun phrases (zepp_sleep, zepp_heart_rate, zepp_workout_detail), some are verb phrases (zepp_list_workouts, zepp_describe_schema), and others are compound adjectives/nouns (zepp_daily_summary, zepp_raw_request, zepp_auth_status). The pattern is not consistent, though each name is still readable and communicates its purpose.
With 8 tools, the server is well-scoped for a health data API. It covers the main data domains (daily stats, heart rate, sleep, workouts) plus essential utilities (schema, raw request, auth). This is within the ideal 3–15 range and no tool feels redundant or excessive.
The tool set covers the core read-side of the Zepp API: daily summary, heart rate, sleep, and workout details. The inclusion of zepp_raw_request and zepp_describe_schema mitigates gaps by allowing access to unimplemented endpoints and documenting uncertainties. Minor gaps exist (e.g., no explicit body composition or user profile tools), but the surface is adequate for most health data use cases.
Maintenance
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Multi-tenant hosted MCP server for Oura Ring — 21 read-only tools, OAuth per user.
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server that provides local caching, sync, and tools for Zepp Life health data including steps, sleep, heart rate, workouts, and body measurements, supporting both file exports and cloud session access.1015MIT
- AlicenseCqualityCmaintenanceMCP server for Mi Fitness cloud data. Provides a local SQLite-backed server to sync and query daily activity, heart rate, and body measurements.128MIT
- AlicenseAqualityDmaintenanceMCP server that exposes Garmin Connect health and activity data (steps, sleep, stress, activities, etc.) via tools for querying, analysis, and visualization.17Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server exposing self-hosted health data from a vivo WATCH GT via 14 tools for querying metrics like heart rate, SpO2, stress, and sleep over stdio and Streamable HTTP.8AGPL 3.0