How to connect Apple Health to Cursor (MCP)

Developers and quantified-self fans: connect your Apple Health data to Cursor’s AI agent through MCP and analyze, chart or prototype with real numbers — without wrangling XML exports.

Download Health to AI on the App Store

Updated · GRAVITY Inc.

Cursor supports MCP servers, which lets its agent call external tools. With Health to AI, your Apple Health data becomes one of those tools — read-only and limited to the data types you choose.

How to connect Apple Health to Cursor

  1. Install Health to AI and sync your dataSign in with Apple, choose the HealthKit data types to share and run a sync.
  2. Choose Cursor in Connect AISelect Cursor (Anysphere) as the recipient and confirm.
  3. Add the MCP server in CursorOpen Cursor’s MCP settings and add Health to AI using the server URL and authorization method shown in the app (OAuth or a read-only API key).
  4. Use it from the agentAsk Cursor’s agent to fetch your data and, for example, generate a chart, a notebook or a small dashboard.

Ideas for developers

  • “Pull my last 90 days of sleep and HRV and generate a Python notebook that plots them with a 7-day rolling average.”
  • “Create a simple web dashboard showing my weekly activity rings-style metrics.”
  • “Write a script that flags nights where my sleep was under 6 hours and my next-day resting heart rate was elevated.”

Why use MCP instead of the XML export?

The Apple Health XML export is large, deeply nested and quickly stale. An MCP tool returns just the slice of data the agent asks for, in a form that’s easy to work with, and stays up to date as your iPhone syncs. More: export Apple Health data to AI.

Treat API keys like passwords: don’t commit them to repositories, and revoke any key you no longer use.

Frequently asked questions

Can I use the same data in other MCP clients?
Yes. Create a separate connection for each AI client so you can review and revoke them individually.
Is the access read-only?
Yes. Tools can read your synced data but cannot modify it, and nothing is ever written back to Apple Health.

Keep reading

Give your AI the health context you choose

Install Health to AI, pick the Apple Health data you want to share, and connect ChatGPT, Claude or another AI tool in a few minutes. You stay in control of every connection.

Download Health to AI on the App Store

Free on the App Store · iPhone & iPad · iOS 17+