Skip to main content
Glama

⌚ Zepp MCP Server (Go)

Go 1.27 MCP 2025-06-18 MIT Tools

Read-only MCP server for the unofficial Zepp cloud. It reads daily activity, sleep, heart rate, workouts and body composition from an existing apptoken.

IMPORTANT

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

  1. Open https://user.huami.com/privacy2/index.html and sign in.

  2. Open DevTools → Application → Cookies.

  3. Copy the apptoken cookie 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-mcp

Release 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

check_auth_status

Report the saved profile, region, token presence and cache state without network access.

setup_credentials

Save and validate an apptoken, optional user id and region.

get_profile

Return user id, region, timezone and available data counts.

Health data

Tool

Purpose

get_daily_summary

Daily steps, distance and active calories, newest first.

get_sleep

Sleep sessions with stages, duration, score and resting heart rate.

get_heart_rate

Resting and minute-level passive heart rate.

list_workouts

Workout history with type, duration, distance, calories and heart rate.

get_workout_detail

Raw detail for one workout track id.

list_devices

Bound devices with model, firmware and serial; device auth keys are never returned.

get_workout_track

Decoded GPS, altitude, heart rate, cadence and power points for a workout.

export_workout_gpx

Export one workout with a GPS track as GPX 1.1 text.

get_stress

Daily stress with zone percentages and 5-minute HRV readings.

get_training_load

Exercise score, recovery and ATL/CTL/TSB training load.

get_sport_load

Daily and weekly training load with the optimal range.

get_vo2_max

VO2 max estimates from qualifying outdoor workouts.

get_readiness

Readiness score with HRV, resting-HR, skin-temperature, breathing, physical and mental components.

get_hrv

Daily RMSSD/SDNN ranges; SDNN unit is marked unverified.

get_respiratory_rate

Daily respiratory rate from overnight per-minute samples.

get_body_charge

Body Charge min/max/average with mental and physical components.

get_sleep_breathing

Overnight ODI, desaturation events, measured minutes and sleep-breathing score.

get_daily_health

Steps, active calories, active minutes and distances with Zepp goals and goal-met flags.

get_spo2

Manual SpO2 and oxygen-desaturation events from the blood-oxygen stream.

get_pai

Daily PAI, rolling total, zone scores/minutes and heart rates.

get_skin_temperature

Overnight skin-temperature deviation from the personal baseline.

get_health_events

Generic event stream for respiratory rate, HRV, body battery and similar data.

get_body_measurements

Weight and body-composition records.

Analytics and export

Tool

Purpose

get_trend

Weekly trend and slope for steps, distance, calories, sleep, resting heart rate, weight or body composition.

compare_periods

Compare average daily metrics between two date ranges.

refresh_sync

Bypass the five-minute cache and download a fresh snapshot.

get_raw_collection

Redacted raw payloads for band, heart_rate, workouts or body.

export_data

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

ZEPP_APPTOKEN

—

Apptoken for the default profile.

ZEPP_USER_ID

auto

User id; normally discovered from recent band data.

ZEPP_REGION

global

global, eu or us.

ZEPP_HISTORY_DAYS

2200

History window. Requests are batched in 30-day chunks.

ZEPP_TIMEZONE

Local

IANA timezone for date boundaries.

ZEPP_API_BASE

region default

Override the activity API (proxy or tests).

ZEPP_WEIGHT_API

https://api-mifit.zepp.com

Override the weight API.

ZEPP_CACHE_TTL

5m

Snapshot cache duration.

ZEPP_CONFIG

~/.zepp-mcp/config.json

Config path.

ZEPP_CONFIG_KEY

—

AES-256-GCM key for saved secrets.

ZEPP_CONFIG_KEY_FILE

—

File containing the key.

PORT

—

Enables stateless HTTP on :PORT; absent means stdio.

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-mcp
  • POST /mcp — stateless Streamable HTTP.

  • GET /healthz — {"status":"ok"}.

  • X-MCP-User: <name> selects a named config profile; without it, default is 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-mcp

HTTP mode:

docker run --rm -p 8000:8000 \
  -e PORT=8000 \
  -e ZEPP_APPTOKEN=your-apptoken \
  -v zepp-config:/home/app/.zepp-mcp \
  zepp-mcp

The image runs as UID 10001 and defaults to stdio.

🔒 Security

  • Apptoken and request URLs are never logged.

  • get_raw_collection and all tool responses recursively redact apptoken, token, password, cookie and authorization.

  • Config saves are atomic; 0600 file in a 0700 directory.

  • Optional AES-256-GCM at rest. A stolen config without the key does not expose the token.

  • Only setup_credentials changes 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 apptoken authentication; 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 tools
check_auth_statusA
Read-onlyIdempotent

Read-only. Report the saved Zepp apptoken, profile, region and cache state without network access.

compare_periodsC
Read-onlyIdempotent

Read-only. Compare average daily metrics between two date ranges.

Inputs: to1 (required), to2 (required), from1 (required), from2 (required).

export_dataC
Read-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_gpxB
Read-onlyIdempotent

Read-only. Export one workout with a GPS track as GPX 1.1 text.

Inputs: track_id (required), limit, offset, source.

get_body_chargeC
Read-onlyIdempotent

Read-only. Zepp Body Charge daily min/max/average with mental and physical components.

Inputs: limit, since, until, offset.

get_body_measurementsB
Read-onlyIdempotent

Read-only. Weight and body-composition records from Zepp scale data.

Inputs: since, until.

get_daily_healthC
Read-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_summaryB
Read-onlyIdempotent

Read-only. Daily steps, distance and active calories for a date range, newest first.

Inputs: since, until.

get_health_eventsC
Read-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_rateC
Read-onlyIdempotent

Read-only. Resting and minute-level passive heart rate, newest first.

Inputs: limit, since, until, offset.

get_hrvC
Read-onlyIdempotent

Read-only. Daily HRV averages with minute-level RMSSD and SDNN samples; SDNN unit is unverified.

Inputs: limit, since, until, offset.

get_paiB
Read-onlyIdempotent

Read-only. PAI daily score, rolling total, zone scores/minutes and PAI heart rates.

Inputs: limit, since, until, offset.

get_profileA
Read-onlyIdempotent

Read-only. Return the Zepp user id, region, timezone and available data counts.

get_raw_collectionB
Read-onlyIdempotent

Read-only. Redacted raw Zepp payloads for band, heart_rate, workouts or body.

Inputs: collection (required), limit, offset.

get_readinessB
Read-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_rateC
Read-onlyIdempotent

Read-only. Daily respiratory rate from overnight per-minute samples.

Inputs: limit, since, until, offset.

get_skin_temperatureB
Read-onlyIdempotent

Read-only. Overnight skin-temperature deviation from the personal baseline, score and baseline.

Inputs: limit, since, until, offset.

get_sleepB
Read-onlyIdempotent

Read-only. Sleep sessions with duration, stages, score and resting heart rate.

Inputs: since, until.

get_sleep_breathingB
Read-onlyIdempotent

Read-only. Overnight ODI, desaturation events, measured minutes and sleep-breathing score.

Inputs: limit, since, until, offset.

get_spo2A
Read-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_loadC
Read-onlyIdempotent

Read-only. Daily and weekly Zepp training load with the optimal range and overreaching flag.

Inputs: limit, since, until, offset.

get_stressB
Read-onlyIdempotent

Read-only. Daily stress from HRV with avg/max/min, zone percentages and 5-minute readings.

Inputs: limit, since, until, offset.

get_training_loadC
Read-onlyIdempotent

Read-only. Zepp exertion: exercise score, target, completion, recovery and ATL/CTL/TSB.

Inputs: limit, since, until, offset.

get_trendC
Read-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_maxB
Read-onlyIdempotent

Read-only. Zepp VO2 max estimates from qualifying outdoor workouts.

Inputs: limit, since, until, offset.

get_workout_detailA
Read-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_trackB
Read-onlyIdempotent

Read-only. Decoded GPS, altitude, heart-rate, cadence and power points for one workout.

Inputs: track_id (required), limit, offset, source.

list_devicesA
Read-onlyIdempotent

Read-only. Bound Zepp devices with model, firmware, serial and active state. Device auth keys are never returned.

list_workoutsC
Read-onlyIdempotent

Read-only. Workout history with type, duration, distance, calories and heart rate.

Inputs: limit, since, until, offset.

refresh_syncA
Read-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

    B3.1/5.0

    Scored across 31 tools

    Disambiguation3/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      MCP 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.
      10
      17
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Provides read-only access to your Garmin Connect health data, including sleep, HRV, body battery, stress, training readiness, and activities, through an MCP server.
      14
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP 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.
      9
      AGPL 3.0