Apple Health MCP

by Neil Pullman

Query and analyze Apple Health CSV exports with SQL through an in-memory DuckDB database

Health & wellnessstdio or Streamable HTTPCommunity

Repository-wide counts · Cached 2026-08-17

Overview

The Apple Health MCP MCP server is a publicly available project. Review the upstream repository for installation instructions, supported tools, compatibility, permissions, and current maintenance status.

Configuration

Configuration, transport, authentication, and runtime requirements vary by project. Open the repository before connecting and use the smallest set of credentials and permissions required.

Open the Apple Health MCP repository to read the latest documentation.

KEEP EXPLORING

Compare source, connection, and authentication details before choosing an implementation.

View the complete category

Strava MCP 服务器

r-huijts

Community

实现于 TypeScript 的 MCP 服务器,桥接到 Strava API,作为工具通过 MCP 标准向大型语言模型(Large Language Models)提供 Strava 数据和功能。需要环境变量配置 Strava API 凭证,此外还可选提供目录路径(ROUTE_EXPORT_PATH)以导出路线文件。

Garmin MCP 服务器

Taxuspt

Community

这个 MCP 服务器连接到 Garmin Connect,并向兼容 MCP 的客户端暴露您的健身和健康数据。需要在项目根目录的 .env 文件中配置 Garmin 凭据。

Taiwan Health MCP Server

healthymind-tech

Community

Taiwan Health MCP Server integrates Taiwan FDA, Ministry of Health official open data, and international standards such as ICD-10-CM, SNOMED CT, RxNorm, LOINC, and FHIR R4. It requires manual download and placement of terminology data files (ICD, LOINC, SNOMED CT, etc.) for loading via provided loader commands. FDA drug, health food, and nutrition data are automatically downloaded on first server startup.

Fast Healthcare Interoperability Resources(FHIR)模型上下文协议(MCP)服务器

wso2

Community

一个模型上下文协议(MCP)服务器,提供对任何兼容的FHIR(快速医疗互操作资源)服务器的无缝、标准化访问。设计用于与AI工具、开发者工作流程和医疗应用的轻松集成,支持自然语言和程序化搜索、检索及临床数据分析。需要按照 .env 文件中的说明配置环境变量。

FROM THE SOURCE

Repository README

Build-time snapshot · Retrieved 2026-10-05

View original

Apple Health MCP Server

npm version License: MIT

Query Apple Health data from an MCP client using SQL and DuckDB. The server runs locally, reads CSV exports on demand, and provides tools for schema discovery, analytical queries, and health summaries.

Requirements

The native Apple Health export.xml format is not currently supported.

Configure an MCP client

For Claude Desktop, add the following to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "apple-health": {
      "command": "npx",
      "args": ["-y", "@neiltron/apple-health-mcp"],
      "env": {
        "HEALTH_DATA_DIR": "/path/to/your/unzipped/health-export"
      }
    }
  }
}

Restart the client after changing its configuration. Other MCP clients can use the same command, arguments, environment, and stdio transport.

Environment variables

Variable Required Default Purpose
HEALTH_DATA_DIR Yes — Directory containing the exported CSV files
MAX_MEMORY_MB No 2048 DuckDB memory limit in megabytes
CACHE_SIZE No 100 Maximum number of cached query results

Export health data

  1. Install and open Simple Health Export CSV on your iPhone.
  2. Select All and choose the time range to export.
  3. Transfer the archive to the computer running your MCP client.
  4. Unzip it and set HEALTH_DATA_DIR to the resulting directory.

The server reads the files in place. It does not upload the export or make network requests, although query results returned to your MCP client may be sent to that client's configured model provider.

Tools

Tool Purpose
health_schema Discover table names, columns, units, and sample rows
health_query Run one DuckDB SELECT-family analytical statement with JSON, CSV, or summary output
health_report Generate a weekly, monthly, or custom health summary

Start with health_schema; table names depend on the files in your export. See Querying Apple Health data for the data model and working examples.

health_query accepts one DuckDB analytical statement. See Query safeguards for supported statements and restricted operations.

Query safeguards

The server limits DuckDB file access to HEALTH_DATA_DIR. It also disables network access and temporary disk storage, and it locks the database settings. The data directory stays readable and writable so the importer can read CSV files.

These controls reduce accidental side effects from generated SQL. They do not isolate the process. Run the server through a local stdio MCP client. Do not expose it to an untrusted network client. Use process or OS isolation if the server must accept untrusted SQL.

History and memory

The first request that needs a table loads that table's full CSV history. There is no date window, so a query can reach as far back as the export goes.

Because every tool can reach the whole configured history, only start this server from an MCP client you trust with that data.

Loaded tables are held in memory, and DuckDB is given the MAX_MEMORY_MB limit described above. Roughly 1 GiB covers a two-year multi-table export, so the 2048MB default leaves headroom; raise MAX_MEMORY_MB for a larger export. The server never spills health rows to a temporary directory on disk, so an export that does not fit in the limit fails with an explicit error instead.

Other current limitations:

  • Only the Simple Health Export CSV layout is supported.
  • The DuckDB database is in memory and is rebuilt for each server process, so each launch reloads from the CSV files. Persistent incremental import is planned future work, not current behavior.
  • Device overlap can produce duplicate-looking measurements; queries should account for sourceName where appropriate.
  • Health reports summarize recorded data and are not medical advice.

Development

git clone https://github.com/neiltron/apple-health-mcp.git
cd apple-health-mcp
bun install

npm test
npm run typecheck
npm run build

See Architecture for the code layout, data lifecycle, and implementation constraints. See Release procedure for publishing and recovery steps.

License

MIT