← All posts
June 23, 2026 · claude-codeapple-healthmcp

Why Claude's Apple Health Connector Doesn't Work for Developers

Why Claude’s Apple Health Connector Doesn’t Work for Developers

Anthropic shipped an Apple Health connector for claude.ai in early 2026. You can find it in your account settings, connect it to Health on your iPhone, and ask Claude questions about your step count or sleep. It works.

If you then open Claude Code — Anthropic’s terminal-based AI client — and ask the same question, Claude has no idea what you’re talking about.

This isn’t a bug. It’s a structural boundary between two different products, and understanding it matters if you’re trying to build anything with health data and AI.

What Anthropic Actually Shipped

The Apple Health connector in claude.ai is a web product feature. When you enable it, it creates a data connection between your Health app and your claude.ai account. Claude can then reference that data in conversations in the claude.ai chat interface.

The integration lives at the claude.ai application layer. It’s implemented as a product feature of the web app, not as a protocol that extends to other Claude-branded clients.

This is a common pattern for AI products. ChatGPT has a similar connector — Apple Health data is accessible in the ChatGPT web and mobile apps. The data is available to the product, not to the underlying API.

The Structural Gap

Claude Code is a different product from claude.ai. It’s a command-line tool that uses the Claude API and the Model Context Protocol (MCP) for external data access.

The architecture looks like this:

These three share the same underlying Claude model. They don’t share data connections or integrations. A connector configured in claude.ai doesn’t propagate to Claude Code. The API has no knowledge of either.

When a developer who uses Claude Code asks how to connect Apple Health, pointing them to the claude.ai settings sends them down the wrong path. The connector isn’t what they need — and there’s no version of that connector that works in their environment.

What Claude Code Users Actually Need

Claude Code gets its access to external data through MCP servers. An MCP server is a process that implements the Model Context Protocol, exposes a set of tools with defined parameters and return types, and runs alongside Claude Code as a local subprocess (or remote service).

When you add an MCP server to claude_desktop_config.json, its tools become callable by Claude in any terminal session. Claude can call get_hrv_trend(days=30) the same way it can call any other tool — it’s a structured function call that returns JSON.

This is the mechanism that works for developer-level health data access. Not a web UI connector, not a browser tab — a Python process running on your machine that speaks MCP and queries a database where your health data lives.

The full configuration looks like this:

{
  "mcpServers": {
    "health4ai": {
      "command": "python",
      "args": ["/path/to/health4ai/mcp-server/main.py"],
      "env": {
        "DATABASE_URL": "postgresql://...",
        "HEALTHKIT_USER_ID": "your_user_id"
      }
    }
  }
}

After adding this and restarting Claude Code, run /mcp to confirm the server is registered and its tools are visible. You’ll see the nine health4ai tools listed. Then you can ask: “What was my HRV trend last month?” — and Claude calls get_hrv_trend(days=30) against your Postgres database.

The Architecture Required

To close the gap for a developer using Claude Code, you need three things:

1. A database where your health data lives. Apple Health data needs to exist somewhere Claude Code can reach — which means a Postgres instance (Supabase, Neon, or self-hosted), not an Apple server.

2. An iOS app that syncs HealthKit to that database. There’s no server-side API for this. An app running on your iPhone reads from HealthKit and writes to your database over TLS. health4ai’s iOS app uses HKObserverQuery for true push delivery — when Apple Watch records new data, HealthKit notifies the app, which syncs immediately rather than waiting for a background processing window.

3. An MCP server that exposes that data as tools. The MCP server reads from your database and translates Claude Code’s tool calls into PostgREST queries. This runs on your Mac alongside Claude Code.

The claude.ai connector handles none of these pieces. It’s implemented differently, for a different client, using infrastructure that isn’t accessible to the API layer.

Why This Matters Beyond Claude

The same gap exists in ChatGPT. The web connector works in the ChatGPT UI; the OpenAI API has no access to it. Any developer building on the API or on any open-weight model has to solve the data layer themselves.

This isn’t a criticism of Anthropic or OpenAI — it’s the reality of how HealthKit works. Apple’s on-device constraint means every AI integration with health data requires an iOS app. Web product integrations can abstract this for web users, but they can’t extend that abstraction to API clients.

Developers building health-aware applications, personal AI tools, or quantified-self workflows need to own the pipeline. The web connector is a consumer product feature. The MCP approach is the developer path.


health4ai is free through July. Everyone in the founding batch gets lifetime access at $0.
Download on the App Store →