mcpField
H

Health Hub MCP

Remote
github.comHealth1Updated 11w ago

About Health Hub MCP

Health Hub MCP is a self-hosted server that turns Android Health Connect records into aggregated health metrics for LLM clients. It deduplicates incoming data and provides daily summaries and diagnostic tools without exposing raw events by default.

Key features

  1. 01Ingests data from two Android apps
  2. 02Deduplicates records using content hashes
  3. 03Builds daily metric rollups
  4. 04Provides five health-query tools
  5. 05Includes caveats and sync diagnostics

Use cases

  1. 01Reviewing daily activity, sleep, and vital summaries
  2. 02Exploring metric trends over time
  3. 03Checking sync gaps and ingestion diagnostics

MCP support

Exposes five tools to MCP clients: daily summaries, metric series, sleep detail, sync health, and payload inspection. Responses contain aggregated data and caveats rather than raw events by default.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://{host}/mcp-health
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://{host}/mcp-healthAuth required

Tools

Details

From the project README

Health Hub MCP Server

CI

Personal MCP server that ingests Health Connect data from an Android companion app and exposes aggregated health metrics to LLM clients over the Model Context Protocol.

Android 14+ ──POST /ingest/health──────▶ ┌──────────────────┐
  (companion app)                         │                  │
Android 14+ ──POST /ingest/hc-webhook──▶ │   Health Hub     │──MCP──▶ LLM
  (HC Webhook client)                     │   SQLite         │
                   browser ──GET /debug──▶ └──────────────────┘

The companion app reads raw records from Health Connect and pushes them to this server. The server normalizes, deduplicates, and rolls them up into daily aggregates, then exposes them to LLM clients (Claude, Perplexity, OpenCode) through five MCP tools. Raw events are never handed to the model by default — only rolled-up summaries with explicit caveats so the model cannot silently fabricate missing data.

Requirements

  • Android 14+ with life-dashboard-companion-app v1.4.0+
  • Any host with Docker and Docker Compose
  • Domain with TLS (Caddy handles certificates automatically)

Quick Start

cp .env.example .env
# Edit .env: set DEVICE_TOKEN and MCP_TOKEN (run: openssl rand -hex 32)
docker compose up -d --build
curl -s http://localhost:8000/health

Companion Apps

The server accepts health data from two Android apps via separate endpoints. Both write to the same database and use content-hash deduplication — sending the same data from both apps will not double-count.

AppEndpointFormatBest for
life-dashboard-companion-app v1.4.0POST /ingest/healthsource: "health_connect" requiredIncremental sync, 200 records per type
HC WebhookPOST /ingest/hc-webhooksource optional, rmssd_millis HRV, extra typesFull sync, all types in one POST

Both endpoints require:

Authorization: Bearer <DEVICE_TOKEN>
Content-Type: application/json; charset=utf-8

The HC Webhook endpoint also accepts 5 additional Health Connect types not present in the companion app: skin_temperature, basal_metabolic_rate, vo2_max, intermenstrual_bleeding, body_water_mass. Unknown type keys are silently tolerated — only types in the server's registry are processed.

Connect Your Phone

See docs/ANDROID.md for step-by-step instructions.

Connect an LLM

Add to Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "health-hub": {
      "url": "https://your-domain.example.com/mcp",
      "headers": {"Authorization": "Bearer <YOUR_MCP_TOKEN>"}
    }
  }
}

For Perplexity, OpenCode, or other MCP clients, use the same URL and token. The Authorization header must include the Bearer prefix — the server rejects requests without it.

MCP Tools

ToolDescription
daily_summaryDaily health rollups: steps, distance, calories, sleep, HR, weight
metric_seriesTime series for any metric with day/week bucketing
sleep_detailDetailed sleep sessions with stages (deep, REM, light, awake)
get_sync_healthPer-type sync status: last event, coverage, gaps, errors
inspect_last_payloadRaw payload metadata and app diagnostics

Each tool returns an object (never a bare array) with a caveats: string[] field that warns the model about missing days, overlapping records, or aggregation changes. Responses are capped at 400 objects.

Known Limitations

  • No record IDs from Health Connect — deduplication is content-hash based
  • Multiple data sources (phone + watch) can cause double-counting for cumulative metrics. The server suppresses overlapping intervals, but this is a heuristic. Check the comparison panel on /debug.
  • App sync cursor only moves forward — records added to Health Connect retroactively may not arrive
  • Health Connect does not provide data older than 30 days without re-authorization — the server IS your archive. Back up data/.

License

MIT — see LICENSE.

Companion App

life-dashboard-companion-app v1.4.0

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.