open-health
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
open-health
A self-hosted health log you talk to through your own AI. You tell Claude, ChatGPT, Cursor or any MCP client what you ate, the set you just did, your weight or the pill you took; it calls this server's MCP tools, and the data lands in a SQLite database (Cloudflare D1) in your own Cloudflare account. A private dashboard and a web MCP console show it. Wearable data (Apple Health, Android Health Connect) can be pushed in. The server makes no LLM calls and needs no API keys: your agent estimates macros, the server stores them.
Live demo (fake data, resets daily, no sign-in): https://open-health-demo.jcallahanp.workers.dev ·
console · MCP endpoint
https://open-health-demo.jcallahanp.workers.dev/mcp
Dashboard | MCP console |
|
|
Try it in 2 minutes
Needs Node.js 22.12 or newer and git. No Cloudflare account, no keys.
git clone https://github.com/jcallahanp/open-health.git
cd open-health
npm install
npm run demonpm run demo creates a local database with 60 days of fake data and serves it. Open:
Dashboard: http://localhost:8787/
MCP console: http://localhost:8787/console
Settings: http://localhost:8787/settings
MCP endpoint: http://localhost:8787/mcp
It prints these URLs once the server is ready.
Demo mode has no sign-in. Connect Claude Code to it from another terminal:
claude mcp add --transport http open-health http://localhost:8787/mcpThen ask Claude: "log lunch: chicken burrito bowl" and reload the dashboard. If 8787 is taken, run
PORT=8790 npm run demo; the port in claude mcp add must match (here
http://localhost:8790/mcp). The demo data is reset each time you run npm run demo.
Wrangler prints a few warnings while the demo starts. They are harmless:
"Your types might be out of date": only matters when you edit the bindings.
"Scheduled Workers are not automatically triggered": the daily demo re-seed cron does not run locally;
npm run demore-seeds instead."CIMD (Client ID Metadata Document) is disabled": an optional OAuth client feature the demo does not use.
Related MCP server: Almanac MCP Server
Deploy your own
Each copy has one owner, protected by a passphrase you choose. It uses Workers, D1, KV and a cron trigger, all available on Cloudflare's free plan.
Button.
The button works once this repository is public (Cloudflare requires a public GitHub or GitLab
repo). It forks the repo into your account, creates the D1 database and KV namespace named in
wrangler.jsonc, asks for OWNER_PASSPHRASE (listed in .dev.vars.example), and deploys with
npm run deploy, which applies the D1 migrations first.
Docs: Deploy buttons.
Manual, with wrangler:
npm install
npx wrangler login
npx wrangler d1 create open-health # copy database_id into wrangler.jsonc (d1_databases)
npx wrangler kv namespace create OAUTH_KV # copy id into wrangler.jsonc (kv_namespaces)
npm run deploy # applies migrations to the remote D1, then deploys
npx wrangler secret put OWNER_PASSPHRASE # a long passphrase, 4+ random wordsOpen https://open-health.<your-subdomain>.workers.dev/, sign in with the passphrase, and go to
/settings for your MCP URL and time zone. Until the secret is set nobody can sign in.
Connect your AI
One URL for every client: https://<your-worker>/mcp. The client runs an OAuth sign-in where you
type your passphrase. Steps for Claude (web, Desktop, mobile), Claude Code, ChatGPT, Cursor and
stdio-only clients (via mcp-remote) are in AGENTS.md, which also holds the usage
guidance for non-Claude agents. Claude users can add the skill in
skills/open-health/SKILL.md. Every client also receives the same
guidance as MCP server instructions when it connects.
Wearables
Optional. Both push to your server with a token you create on /settings, which has step-by-step
setup for each app.
Apple Health (iPhone, Apple Watch, anything that writes to Apple Health): the Health Auto Export app, REST API automation. Automatic exports are part of the app's paid Premium tier.
Android (Health Connect, and any app or watch that writes to it): the open-source HC Webhook app.
Steps, active calories, resting heart rate, HRV, sleep stages, weight and body fat arrive as daily metrics and readings. Without a wearable you can log everything by hand.
Architecture
flowchart LR
AI["Your AI app<br/>(Claude, ChatGPT, Cursor...)"] -->|"MCP + OAuth"| W["Cloudflare Worker"]
You["You, in a browser"] -->|"passphrase session"| W
Phone["Health Auto Export /<br/>HC Webhook"] -->|"POST /ingest + token"| W
W --> D1[("D1 (SQLite)<br/>all health data")]
W --> KV[("KV<br/>OAuth tokens")]
Cron["Hourly cron<br/>(demo reseed only)"] --> WOne Worker (src/index.ts) serves /mcp (tools in src/*.ts), the dashboard /, the console
/console, /settings, /export and /ingest/*. Schema: migrations/. Design
notes: docs/DESIGN.md.
Tools
Tool | What it does |
| Time zone and units (metric or imperial) |
| Change time zone and/or units |
| Log a meal with kcal, protein, carbs, fat (plus fiber, sugar, sodium) |
| Meals between two dates, or one by entry_id |
| Daily totals vs the goals in force each day |
| Daily goal from a date on (kcal, macros, weight, steps, sleep), history kept |
| Goals in force on a date, optionally their history |
| Weight, body fat, blood pressure, pulse |
| Body readings between two dates |
| Per-day wearable data: steps, energy, resting HR, HRV, sleep, weight |
| Create or replace a workout template |
| List saved routines and their items |
| Delete a routine (logged workouts kept) |
| Log one set or a whole session |
| Logged workouts by date and exercise, every set |
| Best e1RM, heaviest set, last and recent sessions per exercise |
| Medication plan in force on a date |
| Add, change, pause or stop a medication |
| Log a dose taken |
| Doses taken and adherence per day |
| Lab results from one blood draw |
| Lab results, latest per marker, trend for one marker |
| Correct any logged entry by kind + entry_id |
| Delete a logged entry (or one set or marker of it) |
Privacy and security
One owner per deployment. Everything is private: the dashboard, console, settings, export and
/mcpall need the owner's sign-in. There is no public view.AI clients connect through OAuth 2.1 (dynamic client registration); the consent page asks for the owner passphrase. Wrong passphrases are rate-limited.
Your data stays in your Cloudflare account (D1). The server makes no LLM or third-party API calls and needs no API keys. What your AI app does with what it reads is up to that app.
Wearable pushes use a separate token, stored only as a SHA-256 hash.
/exportdownloads everything as one JSON file, or one CSV file per table.The demo (
DEMO_MODE=1) has no sign-in and holds fake data only; never put real data in a demo.
Checks
npm run checkRuns checks/run.sh all: type check, OAuth flow, sign-in and rate limit, every tool's round trip,
seed, dashboard, console, wearable ingest, UI checks and a secrets scan, each against its own local
wrangler dev with a fresh database. Takes a few minutes.
Known issues and limitations
Early software (0.1); not security-audited.
One owner per deployment; no sharing or multi-user accounts.
Apple Health ingest is tested with fixture payloads, not a live iPhone. The exact unit strings Health Auto Export sends for weight, HRV and VO2 max are unverified (
lb/kgandmsassumed; other units are skipped).Apple HRV (SDNN) and Health Connect HRV (RMSSD) are stored in the same field; they are not directly comparable.
ChatGPT: full read/write MCP depends on your ChatGPT plan; on some plans connectors are read-only.
Claude mobile voice mode with this connector is untested.
The server does no nutrition lookup: your AI estimates macros, so values are only as good as its estimate.
Not medical software and gives no medical advice.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your health and performance memory: 100+ sources and your lab results, for any AI app.
Hosted Apple Health MCP for Claude and ChatGPT, works outside the US. iPhone app, no local server.
Hosted Apple Health MCP: daily brief, records, sleep, HRV in ChatGPT, Claude, Grok. Free, no export.
Your Garmin, Oura, WHOOP, Hevy and 35 more fitness apps, queryable from your own AI.
Related MCP Servers
- AlicenseAqualityBmaintenanceHosted MCP server that syncs health data from Apple Health, Fitbit, Oura, and Google Health Connect, enabling Claude and ChatGPT to query workouts, sleep, nutrition, and recovery in plain English with interactive charts.853MIT
- AlicenseNot gradedqualityBmaintenanceSelf-hosted fitness tracking MCP server that gives AI assistants access to your nutrition, training, weight, sleep, and accomplishment data via 77 tools and 5 resources. Enables natural-language logging and querying of personal health metrics through Claude or ChatGPT.1BSD 2-Clause "Simplified"
- FlicenseAqualityBmaintenanceProvides a unified MCP interface to a personal health database, enabling AI agents to sync lifting workouts from Hevy, log food intake against a catalog, and run read-only SQL queries to cross-reference training and nutrition data.61-
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable AI assistants to read and safely update a self-hosted pantry, food diary, recipes, training history, Garmin data, shopping needs, and reminders through typed tools with server-enforced guardrails.MIT

