# Health Hub MCP [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/naymEvg/health-conect-mcp  
**GitHub Stars:** 1  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/health-hub-mcp

## Description
Self-hosted MCP server for Android Health Connect — 34 metrics, daily rollups, dedup, 5 LLM tools.

## Tools
Capabilities this server exposes over MCP:

- **daily_summary** — Daily health rollups: steps, distance, calories, sleep, HR, weight
- **metric_series** — Time series for any metric with day/week bucketing
- **sleep_detail** — Detailed sleep sessions with stages (deep, REM, light, awake)
- **get_sync_health** — Per-type sync status: last event, coverage, gaps, errors
- **inspect_last_payload** — Raw payload metadata and app diagnostics

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/naymEvg/health-conect-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Configure:

```sh
cp .env.example .env
```

2. Start the server:

```sh
docker compose up -d --build
```

## Documentation

## What Health Hub MCP MCP server does

Health Hub MCP receives health records from Android Health Connect through an Android companion app or an HC Webhook client. It stores the data in SQLite, normalizes incoming records, removes duplicates using content hashes, and generates daily rollups. LLM clients access the processed data through the Model Context Protocol rather than reading the database directly.

The server is intended for personal health data workflows where an Android device supplies the source records and an LLM needs structured summaries or trends. Raw events are not returned to the model by default. Tool responses include a `caveats` array that can identify missing days, overlapping records, or changes in aggregation.

## How it works

The companion application reads records from Health Connect and sends JSON to the server. The primary companion app uses `POST /ingest/health`; the HC Webhook client uses `POST /ingest/hc-webhook`. Both endpoints require a Bearer token using `DEVICE_TOKEN`, and both write to the same database. The two sources can be used together without counting identical records twice because the server applies content-hash deduplication.

The MCP endpoint is available at `/mcp` and requires a separate Bearer token based on `MCP_TOKEN`. A client sends authenticated MCP requests to the deployed URL and receives objects rather than bare arrays. Responses are limited to 400 objects.

## Setup and configuration

Run the server on a host with Docker and Docker Compose. Copy `.env.example` to `.env`, set `DEVICE_TOKEN` and `MCP_TOKEN`, then start the stack with `docker compose up -d --build`. The README uses `openssl rand -hex 32` as an example for generating token values. Verify the service with `GET /health`.

The source device must run Android 14 or newer. The documented companion app requires version 1.4.0 or later. For external access, the deployment expects a domain with TLS; the included Caddy setup handles certificates automatically. The server's Android connection instructions are provided in `docs/ANDROID.md`.

An MCP client such as Claude Desktop can use the `/mcp` URL with an `Authorization` header whose value begins with `Bearer `. Requests without that prefix are rejected. Perplexity, OpenCode, and other MCP clients can use the same URL and token arrangement.

## Tools and capabilities

Health Hub MCP exposes five tools:

- `daily_summary` returns daily values for steps, distance, calories, sleep, heart rate, and weight.
- `metric_series` returns a selected metric as a time series with day or week buckets.
- `sleep_detail` returns sleep sessions and their deep, REM, light, and awake stages.
- `get_sync_health` reports per-type synchronization status, including the last event, coverage, gaps, and errors.
- `inspect_last_payload` exposes metadata for the latest payload and diagnostics from the sending app.

The HC Webhook input also supports skin temperature, basal metabolic rate, VO2 max, intermenstrual bleeding, and body water mass. Unknown type keys are tolerated, but only types registered by the server are processed.

## Limitations and notes

Health Connect does not provide data older than 30 days without renewed authorization, so the deployed database becomes the archive and its `data/` directory should be backed up. The sync cursor only advances, meaning records added retroactively may not be delivered.

Health Connect does not provide record IDs, so deduplication relies on content hashes. Phone and watch sources may still produce double-counting for cumulative metrics. The server suppresses overlapping intervals heuristically; the `/debug` comparison panel can be used to inspect this situation. The server also does not expose raw events to models by default.

_Full upstream README: https://allmcps.com/mcp/health-hub-mcp/readme_

