apple-health-mcp: Query Apple Health Data with AI Assistants

apple-health-mcp: Query Apple Health Data with AI Assistants

Summary

A local MCP server that lets AI assistants query Apple Health CSV exports with DuckDB. It suits people who want to explore personal health history through SQL-backed tools while keeping the export on their own computer.

At a glance

Language
TypeScript
License
MIT
Stars
570
Forks
24
Added to OSRepos
December 5, 2025
Last analyzed
October 3, 2026
View on GitHub

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Overview

apple-health-mcp connects MCP-compatible AI assistants to Apple Health data exported as CSV. It loads the files locally and provides tools for discovering the available data, running analytical queries, and generating health summaries.

It is intended for people who want to ask questions about their sleep, workouts, activity, or heart data without uploading the source export to a separate service. The server works with a specific CSV export format, not Apple’s native export.xml file.

Key Features

  • Exposes schema discovery, analytical queries, and health-summary tools through MCP.
  • Uses DuckDB to query the CSV data with SQL.
  • Reads export files in place and does not make network requests.
  • Supports JSON, CSV, or summary output for analytical queries.
  • Can generate weekly, monthly, or custom health summaries.
  • Restricts database file access to the configured health data directory and disables network access and temporary disk storage.

Use Cases

  • A personal health-data user can ask an MCP-connected assistant questions about trends across an existing export.
  • Someone reviewing workout or activity history can query records across the date range available in their export.
  • A user exploring sleep or heart measurements can first inspect the schema, then build queries suited to the files they have.
  • Developers can connect an MCP-compatible client to a local data source when they want assistant-driven analysis without uploading the original export.

Project Facts

  • Language: TypeScript
  • License: MIT
  • Stars: 570
  • Forks: 24
  • Topics: apple-health, claude, duckdb, health-data, mcp, mcp-server, model-context-protocol, quantified-self, sql
  • Archived: No

Getting Started

Requires Node.js 22 or newer and an export created with Simple Health Export CSV. Configure an MCP client to run:

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

See the README for client configuration and export instructions, and the querying guide for examples.

Considerations

  • Only the Simple Health Export CSV layout is supported; native Apple Health export.xml files are not.
  • The first request for a table loads its full CSV history. There is no date window, and loaded tables are held in memory.
  • The database is rebuilt from CSV files each time the server starts. Persistent incremental importing is not currently available.
  • Device overlap can create duplicate-looking measurements, so queries may need to account for sourceName.
  • Query safeguards reduce accidental side effects but do not isolate the process. The project advises using a trusted local stdio MCP client, not exposing the server to untrusted network clients.
  • Health reports summarize recorded data and are not medical advice. Query results returned to an MCP client may be sent to that client’s model provider.

Source repository

Open the original repository on GitHub.

17 counted GitHub visits

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️