Zepp MCP Server
⌚ Zepp MCP Server (Go)
Read-only MCP server for the unofficial Zepp cloud. It reads daily activity, sleep,
heart rate, workouts and body composition from an existing apptoken.
This is an unofficial client. Zepp can change or block the private API at any time. The apptoken grants access to your account: keep it private. The server never writes to Zepp and never asks for your password.
✨ Features
Steps, distance and active calories with daily and weekly aggregates.
Sleep stages, duration, score and resting heart rate.
Minute-level passive heart rate for the last seven days.
Workout history and raw workout details (GPS, heart-rate and pace series when present), plus aerobic/anaerobic training effect, exercise load, RPE, VO2 max and SpO2 range.
Readiness, HRV, respiratory rate, Body Charge and sleep-breathing (ODI) recovery metrics.
Weight, BMI, body fat, muscle, water, bone mass, visceral fat and metabolic age.
Weekly trends and period comparison across eleven metrics.
Multiple config profiles over one HTTP endpoint via
X-MCP-User.CSV or JSON export.
stdio and stateless Streamable HTTP.
Optional AES-256-GCM encryption for the saved apptoken.
Failed upstream calls do not leak the apptoken or request URL.
Related MCP server: Mi Fitness MCP
🚀 Quick Start
1. Get the apptoken
Open https://user.huami.com/privacy2/index.html and sign in.
Open DevTools → Application → Cookies.
Copy the
apptokencookie value.
The apptoken usually lasts several weeks. When it expires, copy a fresh one and call
setup_credentials again.
2. Run
go build -o zepp-mcp ./cmd/zepp-mcpRelease binaries are on Releases.
Build from source to include changes on main before the next tag.
3. Configure your client
{
"mcpServers": {
"zepp": {
"command": "/absolute/path/to/zepp-mcp",
"env": {
"ZEPP_APPTOKEN": "your-apptoken"
}
}
}
}The first tool call syncs the configured history window. Call setup_credentials
when you prefer to save the token through MCP instead of the environment.
🧰 Tools
Setup and account
Tool | Purpose |
| Report the saved profile, region, token presence and cache state without network access. |
| Save and validate an apptoken, optional user id and region. |
| Return user id, region, timezone and available data counts. |
Health data
Tool | Purpose |
| Daily steps, distance and active calories, newest first. |
| Sleep sessions with stages, duration, score and resting heart rate. |
| Resting and minute-level passive heart rate. |
| Workout history with type, duration, distance, calories and heart rate. |
| Raw detail for one workout track id. |
| Bound devices with model, firmware and serial; device auth keys are never returned. |
| Decoded GPS, altitude, heart rate, cadence and power points for a workout. |
| Export one workout with a GPS track as GPX 1.1 text. |
| Daily stress with zone percentages and 5-minute HRV readings. |
| Exercise score, recovery and ATL/CTL/TSB training load. |
| Daily and weekly training load with the optimal range. |
| VO2 max estimates from qualifying outdoor workouts. |
| Readiness score with HRV, resting-HR, skin-temperature, breathing, physical and mental components. |
| Daily RMSSD/SDNN ranges; SDNN unit is marked unverified. |
| Daily respiratory rate from overnight per-minute samples. |
| Body Charge min/max/average with mental and physical components. |
| Overnight ODI, desaturation events, measured minutes and sleep-breathing score. |
| Steps, active calories, active minutes and distances with Zepp goals and goal-met flags. |
| Manual SpO2 and oxygen-desaturation events from the blood-oxygen stream. |
| Daily PAI, rolling total, zone scores/minutes and heart rates. |
| Overnight skin-temperature deviation from the personal baseline. |
| Generic event stream for respiratory rate, HRV, body battery and similar data. |
| Weight and body-composition records. |
Analytics and export
Tool | Purpose |
| Weekly trend and slope for steps, distance, calories, sleep, resting heart rate, weight or body composition. |
| Compare average daily metrics between two date ranges. |
| Bypass the five-minute cache and download a fresh snapshot. |
| Redacted raw payloads for |
| Export daily, sleep, heart-rate, workout or body rows as CSV or JSON. |
Every tool except setup_credentials is read-only.
⚙️ Configuration
Default path: ~/.zepp-mcp/config.json (mode 0600). Override with ZEPP_CONFIG.
Unknown top-level keys survive rewrites. Saves are atomic.
{
"region": "global",
"historyDays": 2200,
"profiles": {
"default": {
"appToken": "enc:v1:...",
"userId": "123456",
"region": "global",
"timezone": "Local"
}
}
}Environment:
Variable | Default | Purpose |
| — | Apptoken for the default profile. |
| auto | User id; normally discovered from recent band data. |
|
|
|
|
| History window. Requests are batched in 30-day chunks. |
|
| IANA timezone for date boundaries. |
| region default | Override the activity API (proxy or tests). |
|
| Override the weight API. |
|
| Snapshot cache duration. |
|
| Config path. |
| — | AES-256-GCM key for saved secrets. |
| — | File containing the key. |
| — | Enables stateless HTTP on |
Encryption is optional. Generate a key with openssl rand -hex 32; if it is lost,
run setup_credentials again.
🌐 Remote MCP over HTTP
PORT=8000 ZEPP_CONFIG_KEY=... ./zepp-mcpPOST /mcp— stateless Streamable HTTP.GET /healthz—{"status":"ok"}.X-MCP-User: <name>selects a named config profile; without it,defaultis used.
Run behind a TLS reverse proxy. The secret path and apptoken are both credentials.
🐳 Docker
docker build -t zepp-mcp .
docker run --rm -i \
-e ZEPP_APPTOKEN=your-apptoken \
-v zepp-config:/home/app/.zepp-mcp \
zepp-mcpHTTP mode:
docker run --rm -p 8000:8000 \
-e PORT=8000 \
-e ZEPP_APPTOKEN=your-apptoken \
-v zepp-config:/home/app/.zepp-mcp \
zepp-mcpThe image runs as UID 10001 and defaults to stdio.
🔒 Security
Apptoken and request URLs are never logged.
get_raw_collectionand all tool responses recursively redactapptoken,token,password,cookieandauthorization.Config saves are atomic;
0600file in a0700directory.Optional AES-256-GCM at rest. A stolen config without the key does not expose the token.
Only
setup_credentialschanges local state; no tool writes to Zepp.
🛠️ Development
gofmt -l .
go vet ./...
go test -race ./...
go build ./...The test suite uses fake Zepp servers and requires no account.
⚠️ Limitations
Unofficial private API; no public developer contract.
Only
apptokenauthentication; no email/password or 2FA flow.Minute heart rate is limited to the last seven days.
Raw workout detail shape depends on the sport and Zepp response.
No BLE, no writes, no device management.
📄 License
MIT — see LICENSE.
Available Tools
31 toolscheck_auth_statusARead-onlyIdempotent
Read-only. Report the saved Zepp apptoken, profile, region and cache state without network access.
compare_periodsCRead-onlyIdempotent
Read-only. Compare average daily metrics between two date ranges.
Inputs: to1 (required), to2 (required), from1 (required), from2 (required).
export_dataCRead-onlyIdempotent
Read-only. Export daily, sleep, heart-rate, workout or body rows as CSV or JSON.
Inputs: dataset (required), limit, since, until, +1 more.
export_workout_gpxBRead-onlyIdempotent
Read-only. Export one workout with a GPS track as GPX 1.1 text.
Inputs: track_id (required), limit, offset, source.
get_body_chargeCRead-onlyIdempotent
Read-only. Zepp Body Charge daily min/max/average with mental and physical components.
Inputs: limit, since, until, offset.
get_body_measurementsBRead-onlyIdempotent
Read-only. Weight and body-composition records from Zepp scale data.
Inputs: since, until.
get_daily_healthCRead-onlyIdempotent
Read-only. Daily steps, active calories, active minutes and distances with Zepp goals and goal-met flags.
Inputs: limit, since, until, offset.
get_daily_summaryBRead-onlyIdempotent
Read-only. Daily steps, distance and active calories for a date range, newest first.
Inputs: since, until.
get_health_eventsCRead-onlyIdempotent
Read-only. Generic Zepp event stream for respiratory rate, HRV, body battery and other event types.
Inputs: event_type (required), limit, since, until, +3 more.
get_heart_rateCRead-onlyIdempotent
Read-only. Resting and minute-level passive heart rate, newest first.
Inputs: limit, since, until, offset.
get_hrvCRead-onlyIdempotent
Read-only. Daily HRV averages with minute-level RMSSD and SDNN samples; SDNN unit is unverified.
Inputs: limit, since, until, offset.
get_paiBRead-onlyIdempotent
Read-only. PAI daily score, rolling total, zone scores/minutes and PAI heart rates.
Inputs: limit, since, until, offset.
get_profileARead-onlyIdempotent
Read-only. Return the Zepp user id, region, timezone and available data counts.
get_raw_collectionBRead-onlyIdempotent
Read-only. Redacted raw Zepp payloads for band, heart_rate, workouts or body.
Inputs: collection (required), limit, offset.
get_readinessBRead-onlyIdempotent
Read-only. Zepp readiness score with HRV, resting-HR, skin-temperature, sleep-breathing, physical and mental component scores.
Inputs: limit, since, until, offset.
get_respiratory_rateCRead-onlyIdempotent
Read-only. Daily respiratory rate from overnight per-minute samples.
Inputs: limit, since, until, offset.
get_skin_temperatureBRead-onlyIdempotent
Read-only. Overnight skin-temperature deviation from the personal baseline, score and baseline.
Inputs: limit, since, until, offset.
get_sleepBRead-onlyIdempotent
Read-only. Sleep sessions with duration, stages, score and resting heart rate.
Inputs: since, until.
get_sleep_breathingBRead-onlyIdempotent
Read-only. Overnight ODI, desaturation events, measured minutes and sleep-breathing score.
Inputs: limit, since, until, offset.
get_spo2ARead-onlyIdempotent
Read-only. Manual SpO2 readings and oxygen-desaturation events from the blood-oxygen event stream; use get_sleep_breathing for overnight ODI.
Inputs: limit, since, until, offset.
get_sport_loadCRead-onlyIdempotent
Read-only. Daily and weekly Zepp training load with the optimal range and overreaching flag.
Inputs: limit, since, until, offset.
get_stressBRead-onlyIdempotent
Read-only. Daily stress from HRV with avg/max/min, zone percentages and 5-minute readings.
Inputs: limit, since, until, offset.
get_training_loadCRead-onlyIdempotent
Read-only. Zepp exertion: exercise score, target, completion, recovery and ATL/CTL/TSB.
Inputs: limit, since, until, offset.
get_trendCRead-onlyIdempotent
Read-only. Weekly trend and weekly slope for steps, distance, calories, sleep, resting heart rate, weight or body composition.
Inputs: since, until, metric.
get_vo2_maxBRead-onlyIdempotent
Read-only. Zepp VO2 max estimates from qualifying outdoor workouts.
Inputs: limit, since, until, offset.
get_workout_detailARead-onlyIdempotent
Read-only. Raw Zepp detail for one workout track id (GPS, heart-rate and pace series when available).
Inputs: track_id (required), source.
get_workout_trackBRead-onlyIdempotent
Read-only. Decoded GPS, altitude, heart-rate, cadence and power points for one workout.
Inputs: track_id (required), limit, offset, source.
list_devicesARead-onlyIdempotent
Read-only. Bound Zepp devices with model, firmware, serial and active state. Device auth keys are never returned.
list_workoutsCRead-onlyIdempotent
Read-only. Workout history with type, duration, distance, calories and heart rate.
Inputs: limit, since, until, offset.
refresh_syncARead-onlyIdempotent
Read-only. Bypass the five-minute cache and download a fresh Zepp snapshot.
setup_credentialsC
Save a Zepp apptoken and validate it. The apptoken comes from the apptoken cookie on user.huami.com.
Inputs: apptoken (required), region, profile, user_id, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Most tools map to a distinct Zepp metric, but several pairs have genuinely fuzzy boundaries: get_daily_health vs get_daily_summary both return daily steps/distance/calories, get_sport_load vs get_training_load both cover training load, and get_trend vs compare_periods both aggregate over ranges. The descriptions partially resolve these (get_spo2 explicitly redirects to get_sleep_breathing), but an agent still has to read carefully to pick the right one.
Every tool follows a consistent snake_case verb_noun pattern (get_, list_, export_, compare_, check_, refresh_, setup_) with a domain-specific noun. No camelCase mixing, no vague single-word names, and the verb choice reliably signals the operation type.
At 31 tools the surface is well past the comfortable 3-15 range and above the 25+ 'too many' threshold. While each metric is individually defensible, several tools could be folded together (e.g. daily_health/daily_summary, sport_load/training_load) or parameterized by metric type instead of one tool per Zepp field.
Coverage of the read-only Zepp health domain is broad and deep: sleep, HR/HRV, SpO2, stress, temperature, body composition, PAI, readiness, training load, workouts, GPS export and raw payloads are all present. Minor gaps remain, such as no way to clear/revoke saved credentials after setup_credentials, and no unified single-day report spanning all metrics.
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.
Unofficial Garmin Connect access: sleep, HRV, training, activities, workouts and weight.
Unofficial, not affiliated with Woop. Read-only Open Finance MCP by MCP.AI.
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.1017MIT
- 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
- FlicenseAqualityDmaintenanceProvides read-only access to your Garmin Connect health data, including sleep, HRV, body battery, stress, training readiness, and activities, through an MCP server.14-
- 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.9AGPL 3.0