Apple Health MCP Server
MCP server for Apple Health data: an agent answers questions about sleep, workouts and heart rate with SQL
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Reads sensitive personal health data
- Query results are sent to your MCP client's model
- Runs generated SQL queries over your export
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/apple-health-mcp-serverDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal
claude mcp add --transport stdio --env 'HEALTH_DATA_DIR=<HEALTH_DATA_DIR value>' apple-health-mcp -- npx -y @neiltron/apple-health-mcp@1.4.5Or add to the file .mcp.json, in the project
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Run in a terminal
code --add-mcp '{"name":"apple-health-mcp","type":"stdio","command":"npx","args":["-y","@neiltron/apple-health-mcp@1.4.5"],"env":{"HEALTH_DATA_DIR":"<HEALTH_DATA_DIR value>"}}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"apple-health-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
codex mcp add apple-health-mcp --env 'HEALTH_DATA_DIR=<HEALTH_DATA_DIR value>' -- npx -y @neiltron/apple-health-mcp@1.4.5Or add to the file ~/.codex/config.toml, for all projects
[mcp_servers.apple-health-mcp]
command = "npx"
args = ["-y", "@neiltron/apple-health-mcp@1.4.5"]
env = { HEALTH_DATA_DIR = "<HEALTH_DATA_DIR value>" }If the file already exists, append the block to the end.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"apple-health-mcp": {
"type": "local",
"command": [
"npx",
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"environment": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"apple-health-mcp": {
"command": "npx",
"args": [
"-y",
"@neiltron/apple-health-mcp@1.4.5"
],
"env": {
"HEALTH_DATA_DIR": "<HEALTH_DATA_DIR value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
HEALTH_DATA_DIRrequired- Path to the Apple Health CSV export directory
MAX_MEMORY_MBoptional- Maximum memory usage in megabytes
CACHE_SIZEoptional- Maximum number of cached query results
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add the apple-health server to your MCP client config: command npx, args -y @neiltron/apple-health-mcp, and set HEALTH_DATA_DIR to the unzipped CSV export directory. Node.js 22 or newer is required.
Other ways from the author
npx -y @neiltron/apple-health-mcpSet HEALTH_DATA_DIR to the CSV export folder before running. Node.js 22 or newer is required.
This is third-party code. Review the repository files before installing.
What it does
The server works locally with an Apple Health CSV export and runs queries through DuckDB. It shows the table schema, columns and units, runs one analytical SELECT statement with output as JSON, CSV or a summary, and builds a weekly, monthly or custom health report. Data is read in place: the server does not upload the export or make network calls, though results returned to the client go to its model. File access is limited to the specified data directory.
Who it is for. For people who export Apple Health data and want to analyze sleep, activity and heart rate with queries.
Good fit when
- You want answers about your health data over a period
- You need a summary or report on sleep, workouts and activity
- You want to analyze Apple Health data with SQL without manual spreadsheets
Not a fit when
- You have no Apple Health CSV export from the required app
- You need medical conclusions; the reports do not replace a doctor
Example request
Show how my sleep changed over the last month and build a short reportLimitations
You need an Apple Health CSV export from the Simple Health Export CSV app; the native export.xml format is not yet supported. You point HEALTH_DATA_DIR at the unzipped export directory, and Node.js 22 or newer is required. The DuckDB database is held in memory and rebuilt on each launch, with the memory limit set via MAX_MEMORY_MB. The server runs one SELECT statement at a time, and health reports are not medical advice.
How to disable. Remove the apple-health block from your MCP client config and restart it. Your data stays in the export folder and is not copied anywhere.
MCP
- Transport
- stdio
- Authentication
- not required
| Environment variables | |
|---|---|
| HEALTH_DATA_DIR required | Path to the folder with the unzipped Apple Health CSV export |
| MAX_MEMORY_MB | DuckDB memory limit in megabytes, default 2048 |
| CACHE_SIZE | Maximum number of cached query results |
Security check
- Reads sensitive personal health data
- Query results are sent to your MCP client's model
- Runs generated SQL queries over your export
README in short
The README describes a local server that reads an Apple Health CSV export and runs queries through DuckDB. It lists the tools health_schema, health_query and health_report and Claude Desktop setup via npx with the HEALTH_DATA_DIR variable. It details requirements: Node.js 22 and an export from the Simple Health Export CSV app, plus file access limits and disabled network inside DuckDB. It notes the database is in memory and rebuilt on each launch and that reports are not medical advice. MIT licensed.
FAQ
How do I export the data?
With the Simple Health Export CSV app on iPhone: pick the period, move the archive to the computer, unzip it and point HEALTH_DATA_DIR at the folder.
Does data go to the network?
The server itself makes no network calls and does not upload the export. But query results it returns to the client are sent to that client's model.
Related
166 skills for scientific work: bioinformatics, cheminformatics, clinical data, geospatial analysis and 100+ databases
Google's open-source MCP server for databases: ready tools for Postgres, MySQL, BigQuery, Spanner and more, plus custom tools in tools.yaml
Official Hugging Face skills: Hub operations via the hf CLI, datasets, model training, Spaces, evals and deployment
A visualization language for agents and an MCP server: neat charts from a simple semantic spec