Huawei MCP Connector
Provides read-only access to Huawei Health data, including workouts, sleep records, resting heart rate, HRV, running ability, training summaries, weekly trends, and personal bests.
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., "@Huawei MCP ConnectorHow did I sleep this week?"
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.
Huawei MCP Connector
A local MCP server that lets an AI assistant such as Claude read your Huawei Health data: workouts, sleep, resting heart rate, HRV, SpO2, stress, emotion, running ability and personal bests.
Read-only. It only queries data. It never writes.
Logs in for you. You give it your Huawei ID account and password once. It signs in, asks you for the one-time SMS code the first time, then refreshes the token by itself from then on — no more codes, no hourly copy-paste.
Single user, your machine. Everything stays local. Runs only via Docker Compose.
How login works
The server drives the real Huawei login in a headless browser it keeps inside the container:
First run: it enters your account + password, Huawei sends an SMS code, you give the code to the assistant, and it marks the browser as a trusted device.
After that: when the ~1-hour token expires, it logs in again silently with just the account and password (trusted device = no code). You only see a code again if Huawei drops the trust.
The headless browser is used only to obtain the token; data requests use plain HTTPS with it.
Related MCP server: apple-health-shortcuts-mcp
Tools
Tool | Purpose |
| Whether a valid session is held |
| Begin login; sends the SMS (or logs in silently if already trusted) |
| Finish the first login with the SMS code; marks the device trusted |
| Recent workouts (distance, HR, pace, VO2max, training load) |
| Raw samples for one workout (HR, speed, cadence, GPS, altitude, power) |
| Min/max/avg per sensor stream for one workout |
| Headline metrics for one workout (duration, HR, speed, pace, distance) |
| Totals for the last N days, also by activity type |
| Last N days vs the N before |
| Weekly totals for the last N weeks |
| Week-over-week changes |
| Nightly sleep stages, score, efficiency, wake-ups |
| Daily resting heart rate |
| Nightly HRV |
| Daily blood-oxygen (SpO2) |
| Daily stress score |
| Happy / calm / unhappy emotion readings |
| Running ability, fatigue, predicted race times |
| Personal records |
| Server liveness check |
Setup
1. Configure your account
Create a .env file next to docker-compose.yml (it is git-ignored):
HUAWEI_ACCOUNT=your_huawei_id_phone_or_email
HUAWEI_PASSWORD=your_password
HUAWEI_TZ=Asia/Ho_Chi_Minh # your timezone, for daily heart-rate/HRV windows
BIND=127.0.0.1 # this machine only2. Start it
docker compose up -d --buildFirst build pulls the Playwright browser image (~1.8 GB) and takes a few minutes. The server then
listens on http://localhost:8000/mcp.
3. Connect Claude Code
claude mcp add --scope local --transport http huawei http://localhost:8000/mcpNo token or header needed — the server authenticates itself.
4. First login
In Claude, ask it to start login. Claude calls start_login, Huawei texts you a code, you tell
Claude the code, and Claude calls submit_sms_code. Done — from now on it refreshes silently.
Then ask things like "How did I sleep this week?" or "What's my 7-day running volume vs last week?"
Configuration
Set these in .env:
Variable | Default | Purpose |
| — (required) | Huawei ID phone or email |
| — (required) | Huawei ID password |
|
| IANA timezone for daily resting-HR/HRV windows |
|
| Host interface to publish on |
|
| Host port |
The trusted browser profile is kept in a Docker volume (huawei-profile), so it survives restarts and
you don't re-enter a code after docker compose up.
Security
Your Huawei account and password sit in
.envon your machine and in the container's environment. They control your whole Huawei ID, so keep.envprivate; it is git-ignored.The trusted-device cookie lives in the
huawei-profilevolume. Treat it like a login session.The server binds to
127.0.0.1by default. To reach it from elsewhere, deploy to a server withBIND=0.0.0.0behind HTTPS (e.g. Caddy or nginx) — never expose it over plain HTTP.
Caveats
Rate limiting: Huawei throttles both SMS codes and login attempts if you make many in a short time. If
start_loginsays an SMS was sent but none arrives, or a tool reports "Huawei is rate-limiting logins", wait a while (up to a few hours) and try again. In normal use this never happens — a trusted device refreshes silently without new codes.Captcha: Huawei can demand a captcha during login (risk-based; rare on a trusted device). If it does,
start_loginreturnscaptcha_requiredand you'll need to log in once in a normal browser.Region: detected automatically from your account at login (Asia / Europe / China).
License
This server cannot be deployed
Maintenance
Related MCP Connectors
- freddyOAuthcoach.freddy
Connect your wearables, rings and training apps, then ask your AI about your own health data.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Connect your health, fitness, nutrition, sleep, and wearable data to your AI assistant.
- FlaMapOAuthapp.flamap
Your own cycling data for your AI assistant: rides, power, climbs and routes. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to access your Oura Ring health data through OAuth2-authenticated API calls.10 npm9MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read Apple Health data through three tools: current stats, detailed metrics, and trends. Deployable to Cloudflare with a one-click phone setup, exposing only read-only access.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to query and analyze Huawei Health data, including training records, sleep, heart rate, and athletic performance, through 14 MCP tools without third-party servers.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query personal health data collected by any wearable or phone fitness app through Android Health Connect or Apple Health, exposing read-only tools for metrics like heart rate, sleep stages, VO2 max, and body composition. It can run locally over USB with nothing stored, or be self-hosted on Cloudflare Workers with D1 to retain history beyond Health Connect's 30-day limit.8 npmMIT