Sport Health MCP
Sport Health MCP
A local-first Huawei Sports Health analysis MCP Server. The user merely needs to provide a HUAWEI_HEALTH_* personal data export package once, and the Agent can read exercise performance, in-exercise physiological metrics, and pre/post-exercise health context, adding historical weather and air quality as needed.
This project is for exercise review and does not provide medical diagnosis or treatment advice.
Current Capabilities
Identify Huawei personal data export directories and core JSON files.
Tolerantly parse Huawei non-standard JSON numeric keys.
Parse exercise 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, the day of, and the day after exercise.
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: Apple Health MCP
Installation
Python 3.11 or newer is recommended, and a virtual environment should be created in the project directory:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"Huawei export packages are never bundled or committed; .gitignore ignores all HUAWEI_HEALTH_* directories by default.
Local Checks
When the project directory contains exactly one HUAWEI_HEALTH_* folder, it is detected automatically:
sport-health-inspect inspect
sport-health-inspect listIt can also be specified explicitly:
sport-health-inspect --export-dir "D:\HealthData\HUAWEI_HEALTH_xxx" listStart the MCP Server
stdio is recommended for local Agents:
$env:SPORT_HEALTH_EXPORT_DIR="D:\HealthData\HUAWEI_HEALTH_xxx"
sport-health-mcpThe core form of the MCP client configuration is as follows; the actual field names depend on the client in use:
{
"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 aforementioned command and env configuration to a client that supports MCP stdio, then save and restart the client. Configuration file locations and outer field names may differ between clients; refer to the corresponding client documentation.
Using with Different Agents
Same computer: any Agent supporting MCP
stdiocan start the same Server, but it must be registered once in each Agent’s configuration format.Another user’s computer: install this project, export your own
HUAWEI_HEALTH_*data package, and replace the command and data directory in the configuration with your own absolute paths.Web or cloud Agents: they cannot access a local
stdioprocess on the user’s computer. Supporting such clients requires a separately deployed, authenticated Streamable HTTP service, along with mechanisms for encrypted upload, user isolation, data deletion, and privacy compliance.
The project will not share the author’s Huawei data package. The MCP Server is a generic program, and each user’s data remains on their own machine.
MCP Tools
inspect_huawei_export: Check the integrity of the data package.list_activities: List exercises and monitor.get_activity_summary: Query a summary for a single activity.get_activity_track: Query the activity GPS track with pagination.get_activity_samples: Query heart rate, cadence, speed, and altitude samples with pagination.get_health_context: Query multiple days of health context around an exercise.get_activity_environment: Fetch and cache historical environmental data.get_report_evidence_pack: Generate a deterministic evidence pack for the Agent to write a report.get_report_contract: Get fixed report sections, length, and writing constraints.
Agents are advised to call list_activities first, select an activity_id, then call get_report_evidence_pack as the priority, and produce the report strictly according to the returned report_contract. The fixed format only retains the core judgment, performance analysis, body response, and training suggestions, avoiding repetition of the complete metrics already shown by the device app. The paginated detail tools should be used only when you need to inspect the raw curves or track.
Testing
You can run the standard-library tests without installing a test framework:
$env:PYTHONPATH="src"
python -m unittest discover -s tests -vThe tests use only synthetic activity records generated by code; they do not depend on or contain any personal exported data.
Privacy Boundaries
Raw health data is only read locally by default.
Only the environment enrichment tool accesses the network, sending only the route center point, date, and hour range.
MCP tools are read-only and do not modify Huawei export files.
Remove coordinates, timestamps, device identifiers, and health metrics before sharing logs or issue reports externally.
Do not compress the entire working directory directly when releasing source code; use a version-control export or publish build artifacts to avoid accidentally including an ignored personal data directory.
Open Source License
This project is licensed under the MIT License. Please read SECURITY.md before reporting a security issue, and do not upload real health data, tracks, location caches, or logs containing local paths in public issues.
Third-Party Services and Trademarks
Management data is provided by Open-Meteo, with data under CC BY 4.0. Blatantly required when displaying derived data.
The Open-Meteo free API is limited to non-commercial use and is subject to call quotas. For commercial use, its commercial interface should be used or deploy your own instance under the official license, see Open-Meteo Terms.
This project is an independent community project and has no affiliation with, or endorsement or authorization by Huawei. Product names and trademarks belong to their respective owners.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables users to query Apple Health metrics, workouts, and trends from CSV files exported via the Health Auto Export app. It allows MCP clients to analyze health data such as heart rate, sleep stages, and activity levels directly from local iCloud Drive storage.3111MIT
- AlicenseAqualityAmaintenanceLocal-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.182182MIT
- AlicenseAqualityAmaintenanceRead your Samsung Health CSV/ZIP exports — activity, sleep, heart, stress — locally. It is a local-first MCP server that keeps your tokens on your machine.1815610MIT
- AlicenseAqualityAmaintenanceQuery your Apple Health data including sleep, heart rate, steps, workouts, and more by ingesting an exported XML archive into a local SQLite database.5MIT
Related MCP Connectors
Convert PDF bank statements into structured transactions, accounts, and balances.
63 tools for Apple Health, Fitbit, Oura & Health Connect data in Claude, ChatGPT, Grok & Mistral.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LiPeee1/sport-health-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server