Skip to main content
Glama
LiPeee1

Sport Health MCP

by LiPeee1

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: Apple Health MCP

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 list

You can also specify it explicitly:

sport-health-inspect --export-dir "D:\HealthData\HUAWEI_HEALTH_xxx" list

Starting the MCP Server

For local agents, stdio is recommended:

$env:SPORT_HEALTH_EXPORT_DIR="D:\HealthData\HUAWEI_HEALTH_xxx"
sport-health-mcp

A 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 stdio can 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 the command and data directory in the configuration with your own absolute paths.

  • Web or cloud agents: a local stdio process 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 -v

Tests 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.

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    B
    quality
    C
    maintenance
    Enables 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.
    3
    11
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-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.
    18
    218
    2
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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