What is MCP (Model Context Protocol)?
MCP is an open protocol, introduced by Anthropic in late 2024 and now supported across the AI ecosystem, that standardizes how AI applications connect to external tools and data sources. Instead of copy-pasting data into a chat, an AI client (such as ChatGPT, Claude or Cursor) connects to an MCP server, discovers the tools it offers, and calls them when it needs information to answer you.
A remote MCP server runs on the internet and is typically protected with OAuth, so you approve access in a browser — like “Sign in with…” — instead of sharing passwords.
Why AI can’t read Apple Health on its own
Apple Health (HealthKit) is designed to keep data on your iPhone. Only apps you grant permission to can read it, and there is no official web API that ChatGPT, Claude or any cloud AI can call. That’s great for privacy — but it means your AI assistant has no idea how you slept, what your heart rate trend looks like, or how much you trained this month.
The traditional workaround is to export all your Health data as a huge XML file and upload it to a chatbot. That’s slow, quickly outdated, hard for AI to parse, and shares far more than needed.
How the Health to AI MCP server works
- On your iPhone: Health to AI reads only the HealthKit types you enable, summarizes them (daily or hourly), and encrypts them with AES-256-GCM. The data key stays in your device Keychain.
- In the cloud: only ciphertext is stored. No plaintext data keys or API keys are kept on the server.
- When you connect an AI: you confirm a specific, named AI recipient. The app issues an encrypted OAuth grant (for MCP) or a read-only API key that carries the decryption capability for that connection only.
- When the AI asks a question: the authorized query is answered by briefly decrypting the relevant data in server memory and returning a read-only result. Every read is logged so you can review it in the app.
- When you’re done: revoke the connection and future reads stop immediately.
Hosted vs. self-hosted Apple Health MCP options
| Health to AI | DIY / self-hosted (XML export + local server) | |
|---|---|---|
| Setup | Install the app, choose data, authorize AI | Export XML, install dependencies, configure a local MCP server |
| Data freshness | Syncs from your iPhone (background timing set by iOS) | Snapshot — must re-export manually |
| Works with cloud AI (ChatGPT, Claude web/mobile) | Yes, remote MCP with OAuth or API key | Usually desktop-only; remote access needs extra work |
| Granular sharing | Per data type, per AI connection | Typically the whole export |
| Revocation & access log | Built in | Do it yourself |
What your AI can do with Apple Health over MCP
Once connected, an AI assistant can request read-only data such as a health overview, sleep records or specific metrics over a date range, then reason over it: spotting trends, comparing periods, correlating workouts with sleep, or summarizing months of data for a doctor’s visit. See example prompts.