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
- Install Health to AI and sync your dataSign in with Apple, choose the HealthKit data types to share and run a sync.
- Choose Cursor in Connect AISelect Cursor (Anysphere) as the recipient and confirm.
- 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).
- 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.