Sport Health MCP
This server is a read-only MCP toolset for analyzing Huawei Health export data to produce post-activity sport reports.
Inspect the configured Huawei Health export and verify available source files.
List imported activities with optional filtering and pagination.
Retrieve normalized summary metrics for a single activity.
Get paginated GPS tracks with timestamps and altitude.
Get paginated heart rate, cadence, speed, altitude, or pace samples.
Get daily health context around an activity: sleep, HRV, stress, heart rate, SpO2, and resting heart rate.
Fetch and cache historical weather and air-quality data from Open-Meteo for an activity.
Generate a deterministic evidence pack containing facts, context, flags, and guidance for writing a report.
Obtain a fixed report contract with structure, section lengths, and writing constraints.
Supports local, privacy-first analysis without modifying raw health data.
Analyzes Huawei Health personal data exports, providing tools for inspecting sports summaries, GPS tracks, heart rate, pace, speed, altitude, training load, and surrounding health context.
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., "@Sport Health MCP 帮我分析最近一次跑步数据,并生成运动复盘报告"
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.
Sport Health MCP
A local-first MCP server for Huawei Sport Health analysis. Once a user provides their HUAWEI_HEALTH_* personal data export, the Agent can read exercise performance, in-workout physiological metrics, and health context before and after an activity, and supplement it with historical weather and air quality as needed.
This project is for workout review and does not provide medical diagnosis or treatment advice.
Current Capabilities
Reconize Huawei personal data export directories and their core JSON files.
Tolerantly parse non-standard numeric JSON keys from Huawei data.
Parse activity summaries, GPS tracks, heart rate, cadence, speed, altitude, and training load.
Aggregate heart rate, resting heart rate, HRV, stress, blood oxygen, and sleep stages for the day before, during, and after an activity.
Call the Open-Meteo historical weather and air quality API and cache responses locally.
Provide paginated data tools and a report evidence pack through MCP.
Related MCP server: mcp-takeout-googlefit
Installation
Python 3.11 or newer is recommended. Create a virtual environment in the project directory:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"Huawei export packages are never packaged or committed; .gitignore ignores all HUAWEI_HEALTH_* directories by default.
Local Check
When the project directory contains exactly one HUAWEI_HEALTH_* folder, it is recognized automatically:
sport-health-inspect inspect
sport-health-inspect listYou can also specify it explicitly:
sport-health-inspect --export-dir "D:\HealthData\HUAWEI_HEALTH_xxx" listStarting the MCP Server
For local agents, stdio is recommended:
$env:SPORT_HEALTH_EXPORT_DIR="D:\HealthData\HUAWEI_HEALTH_xxx"
sport-health-mcpA minimal MCP client configuration looks like the following; the exact field names depend on the client:
{
"mcpServers": {
"sport-health": {
"command": "C:\\sport-health-mcp\\.venv\\Scripts\\sport-health-mcp.exe",
"env": {
"SPORT_HEALTH_EXPORT_DIR": "D:\\HealthData\\HUAWEI_HEALTH_xxx"
}
}
}
}Registering with an MCP Client
Add the command and env settings shown above to any client that supports MCP stdio, save, and restart the client. Different clients place configuration files in different locations and may use different outer field names, so always check the corresponding client documentation.
Using Different Agents
Same computer: any Agent that supports MCP
stdiocan launch the same Server, but it must be registered once using that Agent's configuration format.Another user's computer: install this project, export your own
HUAWEI_HEALTH_*data package, and replace thecommandand data directory in the configuration with your own absolute paths.Web or cloud agents: a local
stdioprocess on a user's computer is unreachable from such clients. To support them, you would need to provide a separate, authenticated Streamable HTTP deployment and handle encrypted uploads, user isolation, data deletion, and privacy compliance.
The project never shares the author's Huawei data. The MCP Server is a general-purpose program; every user keeps their data on their own machine.
MCP Tools
inspect_huawei_export: Check the integrity of the data export.list_activities: List activities.get_activity_summary: Get a single activity's summary.get_activity_track: Get GPS tracks with pagination.get_activity_samples: Get heart rate, cadence, speed, and altitude samples with pagination.get_health_context: Get the health context of the days around an activity.get_activity_environment: Fetch and cache historical environmental data.get_report_evidence_pack: Generate a deterministic evidence pack for report writing.get_report_contract: Get the fixed report sections, length, and writing constraints.
The recommended flow is to call list_activities first, then pick an activity_id, call get_report_evidence_pack, and generate the report strictly so chapters the returned report_contract. The fixed format keeps only the essential assessments, performance analysis, body response, and training recommendations, and avoids repeating all metrics the device app already displays. Only use the paginated detail tools when you need to inspect the underlying curves or tracks.
Testing
No testing framework needs to be installed to run the standard-library tests:
$env:PYTHONPATH="src"
python -m unittest discover -s tests -vTests use only synthetic activity records generated by code; they do not depend on or contain any personal export data.
Privacy Boundaries
Raw health data is only read locally by default.
Only the environment enhancer touches the network, and it sends only the route center point plus a date and hour range.
MCP tools are read-only; they do not modify Huawei export files.
Before sharing logs or issue reports, remove coordinates, timestamps, device identifiers, and health indicators.
When publishing code, do not zip the whole working directory; use a version-control export or publish build artifacts instead, to avoid including ignored personal data directories.
Open Source License
This project is released under the MIT License. Please read SECURITY.md before reporting a security issue, and do not upload real health data, GPS tracks, environment caches, or logs containing local paths to public issues.
Third-Party Services and Trademarks
Data is provided by Open-Meteo, licensed under CC BY 4.0. The source and license information must be retained whenever the data is shown.
The free Open-Meteo API is intended for non-commercial use and is subject to call quotas. For commercial use, use the commercial API or self-host under the official license. See Open-Meteo Terms.
This project is an independent community project; it is not affiliated with, authorized by, or otherwise endorsed by Huawei. All product names and trademarks belong to their respective owners.
Available Tools
9 toolsget_activity_environmentB
Fetch cached historical weather and air-quality context from Open-Meteo.
Inputs: activity_id (required). Returns: object
get_activity_samplesA
Get paginated heart_rate, cadence, speed, altitude, or pace samples.
Inputs: activity_id (required), limit, metric, offset. Returns: object
get_activity_summaryC
Get normalized summary metrics for one activity.
Inputs: activity_id (required). Returns: object
get_activity_trackA
Get a paginated GPS track with timestamps and altitude for one activity.
Inputs: activity_id (required), limit, offset. Returns: object
get_health_contextA
Get daily health summaries around an activity, including sleep, HRV, stress, heart rate, and SpO2.
Inputs: activity_id (required), days_after, days_before. Returns: result
get_report_contractA
Return the stable structure and writing rules for end-user activity reports.
Inputs: no named parameters. Returns: object
get_report_evidence_packA
Build deterministic facts, context, flags, and guidance for a post-activity Agent report.
Inputs: activity_id (required), include_environment. Returns: object
inspect_huawei_exportA
Check the configured Huawei export and report available source-file counts.
Inputs: no named parameters. Returns: object
list_activitiesA
List imported activities. Optionally filter by running, walking, cycling, fitness, or workout.
Inputs: limit, sport_type. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool maps cleanly to a distinct resource or data type: Huawei source inspection, activity listing, activity summary, GPS track, samples, health context, weather environment, report evidence, and report contract. Even the health context and activity environment tools are clearly separated by source and intent.
Most tools follow a clear get_<object> pattern, such as get_activity_summary, get_activity_track, and get_report_contract. The deviations are minor: list_activities uses list instead of get, and inspect_huawei_export uses inspect, but all are still recognizable, verb-first names.
Nine tools is a well-scoped surface for an activity and report analysis server. Each tool represents a meaningful step in the workflow—from inspecting source files, listing and retrieving activity data, adding health/environment context, and producing report evidence and contract rules.
The tool set forms a complete read-only pipeline for activity reporting: find source files, list activities, fetch summary, track, samples, health context, environmental context, and then produce evidence and contract for the final agent report. There are no obvious dead ends or missing operations within this server's reporting-focused scope.
Maintenance
Related MCP Connectors
Convert, validate, and inspect workout files (FIT, TCX, ZWO, Garmin Connect) for AI agents.
Apple Health training load, recovery, HRV and workout detail for Claude, ChatGPT and any MCP client.
Read wearables and lab health data — sleep, activity, workouts, timeseries, lab tests and orders.
Hosted Apple Health MCP: workouts, sleep and HRV in ChatGPT, Claude, Gemini, Grok. Free, no export.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal-first MCP server that reads Apple Health export files (export.xml/zip) and exposes activity, sleep, HRV, and workout data to AI agents, keeping all data on your machine.18367 npm3MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to read and analyze Google Fit exported data (activities, daily metrics, workouts, sleep) from Google Takeout, providing tools for queries, resources, and coaching prompts.6-
- AlicenseNot gradedqualityDmaintenanceEnables 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.14MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP hosts to query and analyze a local Samsung Health mirror, with tools for status, metadata, inventory, daily summaries, and aggregate analyses, plus optional bounded access to raw records and cloud synchronization.5MIT