MCP v0.9.3 · 29 tools · 8 prompts · stdio & streamable HTTP
Apple Health MCP Server — live sleep, HRV, cycle & more for your AI agent
Vaultbeat’s open-source local MCP server gives Claude Code, Cursor, Windsurf, Hermes, OpenClaw, or any MCP client continuous read access to your — and optionally your partner’s — Apple Health data, plus structured logging back into your own account. End-to-end encrypted, decrypted locally on your machine, with zero manual exports.
Requires the Vaultbeat — Health MCP for AI iOS app and uvx (handles Python 3.11+ automatically). Source on GitHub.
Step-by-step
Connect Apple Health to Your AI Agent
Get the iPhone app
Install Vaultbeat — Health MCP for AI on your iPhone and sign in. Pairing starts a 30-day free trial of full encrypted cloud history and agent access.
Install & pair your computer
On the computer where your agent runs, verify the package via uvx (no git clone, no virtualenv), then run bind:
uvx vaultbeat-apple-health@latest status
uvx vaultbeat-apple-health@latest bind
bind is the command that draws the QR code — serve prints nothing at all, so do not wait on it for a QR. In the Vaultbeat iOS app, open MCP tab → Connect an AI server (app 1.2.8 and earlier: Settings → Data & AI) and scan it. Your iPhone seals an encrypted copy of each record for this machine’s public key. The private key never leaves that machine: it lives in your system keyring, or in a 0600 file on a headless box, and is never uploaded anywhere.
Register with your AI agent
claude mcp add vaultbeat-health -- uvx vaultbeat-apple-health@latest serve --transport stdio
Done. Ask your AI: “How did I sleep last night?” Reads are cache-first on your machine (10-minute default TTL), so repeat queries answer in about 0.2 seconds.
Universal MCP Configuration
Cursor, Claude Desktop, Windsurf, Hermes & any MCP client
After binding (steps 1–2 above), add this standard MCP block to claude_desktop_config.json, .cursor/mcp.json, Windsurf, or your own agent harness:
{
"mcpServers": {
"vaultbeat-health": {
"command": "uvx",
"args": ["vaultbeat-apple-health@latest", "serve", "--transport", "stdio"]
}
}
}Using Hermes, OpenClaw, or a custom harness? Keep command as the bare executable (uvx, or its absolute path) and put every flag inside args as a list. Placing the entire command string inside command makes the server exit immediately, which most hosts misreport as Connection closed.
Subprocess (stdio)
DefaultBest for Claude Code, Claude Desktop, Cursor, Windsurf, and CLI harnesses spawning local servers.
uvx vaultbeat-apple-health@latest serve --transport stdio
Streamable HTTP
Loopback-firstBinds to loopback by default and requires a bearer token; non-loopback binds fail closed unless explicitly permitted.
uvx vaultbeat-apple-health@latest serve --transport http
Published Tool Surface
What your agent can do (29 tools)
The published server exposes 29 tools — 17 that read and analyze, and 12 that write. Every read returns your own data unless your agent passes partner=true — and then only categories your partner explicitly enabled. Sensitive categories stay off by default and are never re-exported.
Read & Analysis (17)
Read-only| Tool | Returns |
|---|---|
| vaultbeat_doctor | Self-diagnosis of this install: pairing state, which data types are unavailable and why |
| get_sleep_nights | Every night as one compact row — bed and wake time, stages, awakenings, heart and breathing rate while asleep, naps. A year in one call (server 0.9.0+) |
| get_sleep_detail | One or two nights in depth: stage bands and per-stage heart and breathing rate — the newest nights, or any night by date (server 0.9.1+) |
| get_menstrual_cycleopt-in only | Cycle samples plus a next-period prediction |
| get_symptoms | Symptom days from Apple Health (only once you turn that on), and beside them the episodes you reported yourself — type, severity, onset and end, place, suspected triggers |
| get_state_of_mindopt-in only | Moods — Apple Health's State of Mind, from Apple Watch, the Health app or other apps, plus the ones your AI recorded: how pleasant each felt, the feeling words and life areas, and a per-day count and average — the 100 newest, or a date range for older ones (server 0.9.3+, app 1.3.0+ for the Apple Health half) |
| get_notes | Free-text day annotations with their writer |
| get_workouts | Workout records: type, duration, calories, distance |
| get_user_profileopt-in only | Biological sex, age and height — for anything that depends on them (BMR, heart-rate zones, VO₂ max bands). Owner only, never shared with a partner. Needs Vaultbeat for iOS 1.2.9 or later |
| get_metric | Any one-number-per-day series — steps, activity, resting HR, HRV, weight, water, wrist temperature, VO₂ max, basal energy, TDEE, mindfulness, sleep duration, timing, stages and awakenings. One, several or all at once; avg / sum / min / max / latest and weekly, monthly or day-of-week buckets computed server-side (server 0.9.0+) |
| get_intraday | Samples within a day for HRV — hourly buckets or raw per-sample (server 0.9.0+) |
| get_strength_log | Strength-training sessions — exercises, sets, reps and weight per day |
| get_food_log | Daily food logs as plain text, with optional portions and timing — the 14 newest days that have a log, or a date range (server 0.9.0+) |
| list_metric_series | Every series name get_metric and the analysis tools accept, with its unit and how much data backs it (server 0.7.0+) |
| get_metric_trend | Least-squares trend for one daily series — slope per day, endpoints, spread. Numbers only, no verdict (server 0.7.0+) |
| compare_metric_periods | Two periods of a series side by side — the newest N days against the N before, or two named date ranges such as a semester and a summer (server 0.7.0+; date ranges 0.9.0+) |
| correlate_metric_series | Pearson r between two series over days that have both recorded, with the pair count and a causation caveat; can pair a day with a later one (server 0.7.0+; lag 0.9.0+) |
Every read tool returns a coverageblock — distinct days covered, date span, and missing days inside that span — so an agent reports “based on 3 days” instead of presenting a three-day sample as a full month.
Write (12)
Owner account onlyYour agent can log six kinds of record — food, strength training, weight, notes, reported symptoms, and moods. Three come in pairs: log_* replaces a day while *_append only adds and cannot delete. Every write is encrypted on your machine before upload, and none accepts an owner argument, so an agent can never write into a partner’s account.
| Tool | Writes |
|---|---|
| log_weight_entry | Record a weigh-in. Can also sync into Apple Health — only if you enable "Allow AI to update Apple Health" in the MCP tab (app 1.2.8 and earlier: Settings → Data & AI), off by default |
| log_food_entry | Record a day's meals as plain text, with optional portions and timing. Replaces the whole day — use log_food_append to add to a day that already has entries |
| log_food_append | Add meals to a day already logged, leaving everything else that day untouched. Cannot delete anything — prefer this when the day may not be empty |
| log_strength_entry | Record a strength session — exercises, sets, reps, weight. Replaces the whole day — use log_strength_append to add to a day that already has entries |
| log_strength_append | Add exercises to a day already logged, leaving everything else that day untouched. Cannot delete anything — prefer this when the day may not be empty |
| log_note | Record a free-text note for a day, so narrative context sits beside the metrics. Replaces that day's note. Sleep and cycle notes stay iOS-authored and are refused; from server 0.9.3 a feeling goes to log_state_of_mind instead |
| log_note_append | Add a line to a day's note, leaving the existing text untouched. Cannot delete anything |
| log_symptom | Record one symptom you report — type, your own words, severity, when it started and ended, where, what you suspect set it off — as fields a later read can line up with sleep, food and heart rate (server 0.9.0+) |
| update_symptom | Change a reported symptom, usually its end time once it eased. Only the fields passed change, and the old values come back (server 0.9.0+) |
| delete_symptom | Erase a symptom logged by mistake; the deleted entry comes back so it can be re-logged (server 0.9.0+) |
| log_state_of_mind | Record how you say you feel, in Apple Health's own terms — how pleasant, the feeling words, what it was about. Shows in the app's mood calendar; reaches Apple Health only with "Allow AI to update Apple Health" on, off by default (server 0.9.3+, app 1.3.0+) |
| delete_state_of_mind | Erase a mood your AI recorded by mistake; your iPhone also removes the copy it wrote into Apple Health (server 0.9.3+) |
Only log_weight_entry and log_state_of_mind can optionally write into Apple Health when you switch on MCP tab → “Allow AI to update Apple Health” (app 1.2.8 and earlier: Settings → Data & AI) — off by default. See the Privacy Policy or the GitHub README.
Built-in Guardrails
And 8 prompts, so your agent never guesses how
Tools define what an agent can call; prompts/list teaches it how not to mislead you. Each prompt enforces two rules: state data coverage before drawing conclusions (describe rather than prescribe, invent no arbitrary scores), and never treat an absent reading as zero. Every argument is optional.
| Prompt | What it instructs your agent to do |
|---|---|
| daily_brief | The most recent day, set against the fortnight behind it — and it names the newest date it can actually see before drawing anything from it |
| sleep_reviewnights (optional) | Duration and stages across recent nights. Nights where the watch logged time in bed without ever measuring sleep stay their own category instead of averaging in as zero-minute nights that never happened |
| energy_balancedays (optional) | Calories in against calories out, with the days missing hours of basal data excluded rather than quietly dragging the average down |
| training_block_reviewdays (optional) | Lifting and cardio volume beside the recovery signals from the same weeks — offered as context, never as a verdict on the block |
| cycle_aware_readmetric (optional) | A metric read against the same phase of earlier cycles instead of against last week, which mixes phases and manufactures a trend out of an ordinary rhythm |
| partner_check_indays (optional) | Both of you side by side, read once per person rather than averaged across two bodies — and described rather than assessed, because sharing is a kindness and not a monitoring feature |
| log_from_conversationentry (optional) | Turns something you said in passing into an entry, and asks you for a weight, rep count or portion it was not told rather than reaching for a plausible one |
| why_is_this_emptycontext (optional) | Works out which of the four causes is behind an empty or stale read, then gives the single next step for that one instead of a checklist of all four |
Live Sync vs. Static Files
Why not just export my Apple Health XML?
Most Apple Health MCP servers query a manual export snapshot that is stale the moment it lands. Vaultbeat pairs a native iPhone background sync app with a local decrypting MCP server. For a full ecosystem breakdown including MetricBridge, Health Auto Export, HealthMirror, and hosted services, read our honest Apple Health MCP comparison.
| Dimension | Export-based MCP servers | Vaultbeat |
|---|---|---|
| Freshness | Manual XML/CSV export — stale the moment it lands | Continuous background sync — always current |
| Workflow | Re-export, unzip, and point scripts again every week | Bind once with a QR scan; your agent just asks |
| Capabilities | Read-only file queries | 17 read & analysis tools + 12 bidirectional writes |
| People | Single user only | Single-user first, plus optional per-category encrypted partner sharing |
| Security | Plaintext export files sitting on disk | Always-on E2EE — cloud holds ciphertext only; keys stay on your hardware |
Cryptography
How the end-to-end encryption works
Every health record is sealed on your iPhone with AES-GCM-256 under a random data key, and that key is wrapped per authorized recipient using Curve25519 ECDH with HKDF-SHA256 — one envelope for you, one for your partner if sharing is enabled, and one for each computer you pair. Our cloud stores and routes ciphertext only; we hold no decryption keys and cannot read your health data — architecturally, not by policy.
When you bind a computer, it generates its own Curve25519 keypair locally. The private key stays in your system keyring (or a 0600 file on headless Linux) and is never uploaded anywhere. The decryption code is open source on GitHub — audit it.
FAQ
Frequently asked questions
My agent suddenly cannot read my health data — what should I check?
How is this different from exporting my Apple Health data?
Do I need a computer, or does this work from my phone alone?
Do I need an Apple Watch?
Can my agent read my partner’s data?
Which plan do I need?
Is my data used to train AI?
Need help or spot a bug? Check service status, email support@vaultbeat.app, or open an issue on GitHub.