Skip to main content
Glama

Amazfit MCP

A Model Context Protocol server that gives any MCP-capable AI agent read access to your Zepp / Amazfit data: workouts with decoded GPS/HR/pace/power tracks, per-km splits and HR zones, daily activity and sleep stages, readiness/HRV, PAI, stress, blood oxygen, and devices. It can also create structured workouts and schedule them on the Zepp training calendar, which syncs them to the watch.

It logs in to the Zepp cloud through Zepp's web-app login flow (the same one user.zepp.com uses), so it does not sign your phone's Zepp app out. No phone, root, or Bluetooth required.

Tools

Tool

Returns

zepp_status

Login state, user id, whether the session came from the token cache, workout count

get_devices

Bound watches/bands with model name, firmware, active flag

list_workouts(from_date?, to_date?, sport?, limit=30)

Compact workout summaries: sport, start/end, duration, distance, pace or speed, calories, HR, elevation, cadence, stride, power, training effect/load, VO2max, device. Swims add SWOLF/strokes/laps

summarize_workouts(from_date?, to_date?, group_by="week", by_sport=true, sport?)

Totals per day/week/month/year (and sport): count, hours, km, calories, elevation, training load, weighted avg HR

get_workout_detail(trackid)

Summary + time in HR zones, per-km splits (pace, avg HR), first-vs-second-half HR/speed/power drift

get_workout_track(trackid, max_points=200, fields?)

Decoded, downsampled time series: lat/lon, altitude, HR, speed, distance, cadence, stride, power, stroke rate

get_daily_summary(from_date?, to_date?, include_sleep_stages=false)

Per-day steps, distance, calories, goal, and sleep (bed/wake time, deep/light/REM/awake, score, resting HR)

get_health_metrics(from_date?, to_date?, metrics?, include_stress_series=false)

Per-day readiness (score, overnight HRV, sleeping RHR, baselines, physical/mental recovery), PAI, stress, overnight SpO2/ODI

list_workout_templates()

Structured workouts in the Zepp template library, steps rendered as text

get_workout_template(template_id)

One template's steps, including the hidden copy a calendar entry runs

list_scheduled_workouts(from_date?, to_date?)

Structured workouts on the training calendar (what syncs to the watch)

create_workout_template(title, steps, sport="outdoor_run", description="")

Writes. Saves a structured workout (warm-up / repeats / cool-down; distance, time or lap-press steps; pace or HR alerts) to the template library

schedule_workout(day, title, steps, sport="outdoor_run", ..., if_exists="skip")

Writes. Puts a structured workout on the training calendar for a day so it syncs to the watch. Same title already that day: skip, replace (to update a plan) or add

unschedule_workout(entry_id)

Writes. Removes a calendar entry and its hidden template copy

delete_workout_template(template_id)

Writes. Deletes a template from the library

Dates are ISO YYYY-MM-DD in local time. Workout sport names come from Zepp's numeric type codes; unmapped codes show as unknown (type N). Add them to SPORT_NAMES in normalize.py.

Related MCP server: zepp-mcp

Requirements

  • Python 3.12+

  • uv

  • A Zepp / Amazfit account (email + password login)

Setup

git clone https://github.com/fjuliofontes/amazfit-mcp.git
cd amazfit-mcp
uv sync                            # install dependencies
cp .env.example .env               # then add your Zepp credentials to .env
uv run python test_connection.py   # exercise every tool live
uv run pytest                      # offline unit tests

Configuration

Settings are read from environment variables, loaded from the .env next to server.py:

ZEPP_EMAIL=you@example.com
ZEPP_PASSWORD=your-zepp-password
# optional
ZEPP_COUNTRY=US                    # login country code; change if login fails
ZEPP_TIMEZONE=Europe/Lisbon        # IANA name; default: machine local time
ZEPP_DEVICE_NAMES=10289411=My Band # name devices missing from the built-in table
ZEPP_TOKEN_CACHE=~/.cache/amazfit-mcp/auth.json   # or "off"

.env is listed in .gitignore and is never committed.

Connecting an AI agent

Add the server to your agent's MCP configuration — for example Claude Desktop (claude_desktop_config.json), Claude Code (.mcp.json), or Cursor. Replace /path/to/amazfit-mcp with the absolute path to your clone:

{
  "mcpServers": {
    "amazfit": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/amazfit-mcp",
        "python",
        "server.py"
      ]
    }
  }
}

uv run --directory sets the working directory so the server loads credentials from that folder's .env. If you prefer to pass credentials inline instead, add an "env" block (not recommended for shared or committed config files):

"env": {
  "ZEPP_EMAIL": "you@example.com",
  "ZEPP_PASSWORD": "your-zepp-password"
}

Security

  • Credentials live only in your local .env, which is git-ignored. Never commit real credentials, and avoid inlining them in MCP config files that may be shared or version-controlled.

  • The login token is cached at ~/.cache/amazfit-mcp/auth.json with 0600 permissions so restarts don't log in again. An expired token is replaced automatically. Set ZEPP_TOKEN_CACHE=off to keep it in memory only.

  • Device Bluetooth auth keys returned by the API are never exposed to the agent.

  • All traffic is over HTTPS. Error messages never include credentials.

Notes

  • Login uses the web-app identity (com.huami.webapp). The previous huami-token-based login registered as an Android phone and signed the phone app out.

  • The track decoder (decoder.py) and device table (known_devices.py) are shared with dreeve-zepp-connector, where each field's encoding was reverse-engineered and verified against Zepp's own FIT exports.

  • Workout history is paged 500 at a time (via count; Zepp ignores limit) and cached for 5 minutes.

  • HTTP 429s and connection errors are retried with exponential backoff.

Credits

License

MIT

Disclaimer

This is an unofficial client that uses a reverse-engineered Zepp cloud API. It is not affiliated with or endorsed by Zepp Health / Huami. Use it with your own account and at your own risk.

Available Tools

8 tools
get_daily_summaryA

Per-day steps, distance, calories, step goal, and last night's sleep: bedtime, wake time, total/deep/light/REM/awake minutes, sleep score, and resting HR. ISO YYYY-MM-DD dates; defaults to the last 7 days. include_sleep_stages adds the timeline of individual sleep stages.

Inputs: to_date, from_date, include_sleep_stages. Returns: result

get_devicesA

Watches/bands/rings bound to the account, with model name (when known), firmware, and whether they're currently active.

Inputs: no named parameters. Returns: result

get_health_metricsA

Daily recovery and health metrics, one entry per date: - readiness: readiness score, overnight HRV + baseline, sleeping resting HR + baseline, physical/mental recovery, skin-temp and breathing scores - pai: weekly & daily PAI, minutes in low/medium/high HR zones - stress: avg/min/max stress and % time relaxed/normal/medium/high - spo2: overnight blood-oxygen score and desaturation index (ODI)

metrics: subset of ["readiness", "pai", "stress", "spo2"] (default all).
ISO YYYY-MM-DD dates; defaults to the last 7 days.
include_stress_series adds 5-minute stress readings (verbose).

Inputs: metrics, to_date, from_date, include_stress_series. Returns: result

get_workout_detailA

Full analysis of one workout: the summary fields plus time in each HR zone, per-kilometer splits (pace + avg HR), first-half vs second-half HR/speed/power drift, and which per-sample track fields exist (fetch those with get_workout_track).

Inputs: trackid (required).

get_workout_trackA

Decoded per-sample time series for one workout, downsampled to at most max_points evenly spaced points (t_s = seconds from start).

Possible fields (only those recorded are returned): lat, lon, altitude_m,
hr, speed_kmh, distance_m, cadence_spm, stride_cm, power_w,
stroke_rate_spm. Pass `fields` to limit output, e.g. ["hr", "speed_kmh"].

Inputs: trackid (required), fields, max_points.

list_workoutsA

List workouts, newest first, as compact summaries: sport, start/end, duration, distance, pace/speed, calories, HR, elevation, cadence, power, training effect/load, VO2max, device. Swims include SWOLF/strokes/laps.

from_date/to_date: optional ISO YYYY-MM-DD bounds (inclusive, local time).
sport: optional case-insensitive substring filter, e.g. "run", "cycling",
"swim". limit: max items returned (default 30).
Legs of a multisport event carry `part_of` = the parent's trackid.
Use `trackid` with get_workout_detail / get_workout_track.

Inputs: limit, sport, to_date, from_date. Returns: result

summarize_workoutsA

Training totals per period: count, hours, km, calories, elevation, training load, and duration-weighted avg HR.

group_by: "day", "week" (ISO week), "month", "year", or "all".
by_sport: split each period per sport (default true).
from_date/to_date: optional ISO YYYY-MM-DD bounds; defaults to the last
12 weeks. sport: optional substring filter.
Multisport parents are skipped; their individual legs are counted.

Inputs: sport, to_date, by_sport, group_by, +1 more. Returns: result

zepp_statusA

Check the Zepp cloud connection: user id, whether the session came from the token cache or a fresh login, and how many workouts are on record.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct resource or data view: connection status, devices, aggregated workout summaries, workout lists, individual workout detail, raw track data, daily activity/sleep, and health metrics. Even within the workout domain, list/detail/track/summarize have clear boundaries reinforced by the descriptions.

    Naming Consistency4/5

    Most tools follow a consistent get_/list_/summarize_ snake_case pattern (e.g., get_devices, list_workouts, summarize_workouts). The only minor deviation is zepp_status, which uses a noun-style name rather than a verb-prefixed one.

    Tool Count5/5

    Eight tools is a well-scoped set for a health/fitness data server. Each tool covers a distinct aspect of the domain without redundancy or bloat, and the count sits comfortably in the ideal range.

    Completeness4/5

    The tool surface covers the main Zepp/Amazfit data domains well: connection, devices, workouts (list/detail/track/aggregate), daily activity, sleep, and health metrics. Minor gaps exist, such as lack of body-composition data or continuous 24/7 heart-rate retrieval, but agents can still accomplish core health-data workflows.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      MCP server that reads Zepp/Amazfit health and workout data, exposing tools for daily summaries, sleep, heart rate, and workout details to any MCP client.
      8
      8
      7
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Gives any MCP-compatible AI assistant secure, read-only access to your personal Strava fitness data, including activities, segments, routes, gear, and more through natural language.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to access Zepp/Amazfit health and fitness data such as steps, sleep, heart rate, workouts, and user profile information via tools.
      ISC