amazfit-mcp
This MCP server gives AI agents read access to your Zepp/Amazfit data and lets them create and schedule structured workouts.
Check Zepp cloud login status and list bound watches/bands/rings.
List, summarize, and analyze workouts: sport, duration, distance, pace/speed, calories, HR, elevation, cadence, power, training load, VO2max, SWOLF, HR zones, per-km splits, drift, and GPS/HR/pace/power tracks.
Retrieve daily activity and sleep data, including steps, calories, bedtime/wake time, sleep stages, score, and resting HR.
Retrieve health/recovery metrics: readiness, overnight HRV, sleeping RHR, PAI, stress, overnight SpO2/ODI.
List workout templates and scheduled training calendar workouts.
Create/delete structured workout templates and schedule/unschedule workouts on the Zepp calendar so they sync to the watch.
Filter by ISO dates or sport, group workout summaries by day/week/month/year, and limit/downsample track data.
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., "@amazfit-mcp What was my sleep and readiness for yesterday?"
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.
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 |
| Login state, user id, whether the session came from the token cache, workout count |
| Bound watches/bands with model name, firmware, active flag |
| 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 |
| Totals per day/week/month/year (and sport): count, hours, km, calories, elevation, training load, weighted avg HR |
| Summary + time in HR zones, per-km splits (pace, avg HR), first-vs-second-half HR/speed/power drift |
| Decoded, downsampled time series: lat/lon, altitude, HR, speed, distance, cadence, stride, power, stroke rate |
| Per-day steps, distance, calories, goal, and sleep (bed/wake time, deep/light/REM/awake, score, resting HR) |
| Per-day readiness (score, overnight HRV, sleeping RHR, baselines, physical/mental recovery), PAI, stress, overnight SpO2/ODI |
| Structured workouts in the Zepp template library, steps rendered as text |
| One template's steps, including the hidden copy a calendar entry runs |
| Structured workouts on the training calendar (what syncs to the watch) |
| Writes. Saves a structured workout (warm-up / repeats / cool-down; distance, time or lap-press steps; pace or HR alerts) to the template library |
| Writes. Puts a structured workout on the training calendar for a day so it syncs to the watch. Same title already that day: |
| Writes. Removes a calendar entry and its hidden template copy |
| 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+
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 testsConfiguration
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.jsonwith0600permissions so restarts don't log in again. An expired token is replaced automatically. SetZEPP_TOKEN_CACHE=offto 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 previoushuami-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 withdreeve-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 ignoreslimit) and cached for 5 minutes.HTTP 429s and connection errors are retried with exponential backoff.
Credits
Originally forked from drfittri/zepp-mcp by Mohd Fittri Fahmi. Thanks for the starting point.
Web-app login flow from effectpears/zepp-downloader.
Track decoding based on rolandsz/Mi-Fit-and-Zepp-workout-exporter and mireq/MiFitDataExport, extended in
dreeve-zepp-connector.Data-call headers adapted from
huami-token.
License
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 toolsget_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
Scored across 8 tools
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.
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.
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.
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
Related MCP Connectors
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
1Your own cycling data for your AI assistant: rides, power, climbs and routes. Read-only.
Your Garmin, Oura, WHOOP, Hevy and 35 more fitness apps, queryable from your own AI.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes personal health data (recovery, sleep, strain, etc.) as MCP tools for AI agents to query and analyze.5MIT
- AlicenseAqualityBmaintenanceMCP server that reads Zepp/Amazfit health and workout data, exposing tools for daily summaries, sleep, heart rate, and workout details to any MCP client.887MIT
- AlicenseNot gradedqualityNot gradedmaintenanceGives 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
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to access Zepp/Amazfit health and fitness data such as steps, sleep, heart rate, workouts, and user profile information via tools.ISC