What you need
- An iPhone on iOS 15 or later with Apple Health. Apple Watch data comes along too.
- The HealthAPI app. Free for 2 days, no card needed. Then an optional 7-day free trial when you subscribe. The preview includes 25 requests a day. When the 2 days are up, AI apps and the API stop reading your data until you choose a plan in the app. Your synced data is kept for about 5 weeks, so subscribing picks up where you left off. Pro is $4.99 a month or $49.99 a year (100 requests a day); Developer is $9.99 a month or $99.99 a year (1,000 a day). Cancel anytime in the App Store.
- Cursor on your computer.
Set it up in 4 steps
Install HealthAPI and sync
Get HealthAPI from the App Store, open it and allow Apple Health. Your history uploads, then new data keeps syncing.Add the server to Cursor
Use the Add to Cursor button below, or addhealthapiwith the URLhttps://healthapi.app/mcpto~/.cursor/mcp.json.Sign in and approve on your iPhone
When Cursor asks you to sign in, a HealthAPI page opens in your browser with a short code. Scan its QR code with your iPhone, or enter the code in HealthAPI under Connect, check the code matches, and tap Approve.Ask the agent
In a Cursor chat, ask something that needs your data, such as “Use HealthAPI to get my last 30 nights of sleep.” Cursor shows each tool call in the chat.
The sign-in page labels Cursor an unverified app, because a program on your own computer can't be checked from outside. If you started the sign-in yourself and the codes match, it's fine to approve. Manage the server later under Customize in Cursor's sidebar, and disconnect it any time in the HealthAPI app under Settings, Connected apps.
The config
The Add to Cursor button writes this for you. To do it by hand, put it in ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
{
"mcpServers": {
"healthapi": {
"url": "https://healthapi.app/mcp"
}
}
}Rather use your API key than sign in? Send it as a header instead (key in the app under Connect, then Other tools), and keep this version in the global file only:
{
"mcpServers": {
"healthapi": {
"url": "https://healthapi.app/mcp",
"headers": { "Authorization": "Bearer <your API key>" }
}
}
}What to build with it
- A personal dashboard. “Use HealthAPI to get 90 days of resting heart rate, HRV and sleep, then build a single-page HTML dashboard with a chart for each.”
- An analysis script. “Look at my workouts and sleep for the last 3 months, then write a Python script that checks whether I sleep longer after training days.”
- An app on real data. “Fetch one of my daily summaries and generate TypeScript types and test fixtures from it.”
- Quick questions while you work. “How did I sleep last night?” works here too.
For code that runs on its own later, call the REST API with your key; the Python guide has a starting point.
The tools Cursor sees
| Tool | Returns |
|---|---|
get_health_overview | What is synced, date ranges, last sync, requests left. Agents call it first. |
get_daily_summary | One day: activity, heart, vitals, workouts and that morning's sleep. |
get_weekly_summary | A Monday-to-Sunday week, with a line per day. |
get_sleep | Per night: asleep, core, deep, REM, awake, bedtime and wake time. |
get_trend | One metric day by day, with average, low and high. |
get_latest | The newest reading of each metric. |
get_workouts | Workouts between two days, with totals. |
get_samples | Raw readings of one metric, up to 31 days. |
Every tool is read only. The MCP server page covers inputs, sign-in and discovery in detail.
Questions
Why does the sign-in page say “Unverified app”?
Cursor signs in through a program on your own computer, and HealthAPI can't prove from the outside which program that is. The warning is there so nobody can pass something else off as Cursor. If you just added HealthAPI in Cursor yourself and the codes match, approve it.
Does it work in Cursor's Cloud Agents?
Cursor's documentation lists a separate sign-in address for the web and Cloud Agents, and HealthAPI accepts it. Background work uses your daily requests like anything else, so give agents a clear task rather than an open-ended one.
How many requests does it use?
Each tool call is one request. A question usually takes one to three; an agent building something may take more. Pro allows 100 a day and Developer 1,000, reset at 00:00 UTC.
Can I use an API key instead of signing in?
Yes: put the key in a header in ~/.cursor/mcp.json, as shown on this page. Keep it in the global file, not a project's .cursor/mcp.json, so it never ends up in a repository.
Can Cursor change my health data?
No. All eight tools are read only. Nothing in Apple Health or HealthAPI changes.
