Health Hub MCP logo

Health Hub MCP

Self-hosted Android Health Connect server that normalizes, deduplicates, and exposes health rollups through five MCP tools.

Install Health Hub MCP

Run the project’s own setup commands, in order.

Setup steps from the project

Health Hub MCP installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Configure
    cp .env.example .env
    
  2. 2. Start the server
    docker compose up -d --build
    

Overview

Health Hub MCP MCP server ingests Android Health Connect data from companion apps, stores it in SQLite, and exposes normalized health information to LLM clients. It accepts authenticated POST requests, deduplicates records, and creates daily aggregates before serving them over MCP. Use it when you need a self-hosted archive and query layer for steps, sleep, heart rate, weight, and related metrics. Docker Compose, an Android 14+ device, and tokens for device ingestion and MCP access are required.

Use cases

  • Summarize daily Android health metrics for an LLM
  • Analyze weekly trends for a selected Health Connect metric
  • Inspect sleep stages and individual sleep sessions
  • Diagnose missing or delayed synchronization by data type
  • Archive Health Connect records on a self-hosted server

Key features

  • Ingests data from two Android Health Connect clients
  • Stores normalized records in SQLite
  • Deduplicates overlapping submissions with content hashes
  • Provides daily rollups and day or week time series
  • Reports synchronization gaps and payload diagnostics
  • Returns caveats with MCP tool results

Tools5

What Health Hub MCP lets your agent do. Expand a tool for its parameters.

Self-reported~87 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Health Hub MCP works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Health Hub MCP

Health Hub MCP is an MCP server that connects Android Health Connect data from companion apps to LLM clients. It stores normalized records in SQLite and provides daily summaries, metric time series, sleep details, synchronization health, and last-payload diagnostics through five MCP tools. It is self-hosted and uses authenticated HTTP endpoints.

Install it with Docker Compose by copying `.env.example` to `.env`, setting `DEVICE_TOKEN` and `MCP_TOKEN`, and running `docker compose up -d --build`. The host needs Docker and Docker Compose, and external deployments require a TLS-enabled domain.

Connect an Android 14 or newer device through the documented companion app or HC Webhook client. Send authenticated JSON to `/ingest/health` or `/ingest/hc-webhook` using a Bearer token based on `DEVICE_TOKEN`; the companion app requires version 1.4.0 or later.

Claude Desktop, Perplexity, and OpenCode are explicitly mentioned as clients or examples.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHealth Hub MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/health-hub-mcp?style=directory)](https://allmcps.com/mcp/health-hub-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/health-hub-mcp"><img src="https://allmcps.com/api/badge/health-hub-mcp?style=directory" alt="Health Hub MCP on AllMCPs" /></a>