Guide

Apple Health in Cursor

Cursor can read your Apple Health data through HealthAPI's MCP server, so its agent works with your real numbers while it answers questions or builds a dashboard, a script or an app for you. Add the server, sign in, and approve it on your iPhone.

  • Remote MCP, OAuth
  • 8 read-only tools
  • Updated 20 October 2026

HealthAPI: Free for 2 days, no card needed. Then an optional 7-day free trial when you subscribe.

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

  1. Install HealthAPI and sync

    Get HealthAPI from the App Store, open it and allow Apple Health. Your history uploads, then new data keeps syncing.
  2. Add the server to Cursor

    Use the Add to Cursor button below, or add healthapi with the URL https://healthapi.app/mcp to ~/.cursor/mcp.json.
  3. 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.
  4. 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:

~/.cursor/mcp.jsonJSON
{
  "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:

~/.cursor/mcp.jsonJSON
{
  "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

ToolReturns
get_health_overviewWhat is synced, date ranges, last sync, requests left. Agents call it first.
get_daily_summaryOne day: activity, heart, vitals, workouts and that morning's sleep.
get_weekly_summaryA Monday-to-Sunday week, with a line per day.
get_sleepPer night: asleep, core, deep, REM, awake, bedtime and wake time.
get_trendOne metric day by day, with average, low and high.
get_latestThe newest reading of each metric.
get_workoutsWorkouts between two days, with totals.
get_samplesRaw 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.

The HealthAPI app icon

Your Health data, in your editor.

Get HealthAPI for iPhone, add it to Cursor, and build on your own numbers.