About
Apple Health MCP Server enables SQL-based querying and analysis of Apple Health data exported from iOS devices. Key features include: - Execute SQL queries directly against Apple Health data using DuckDB for fast, efficient analysis - Natural language querying that translates questions into database queries - Automated generation of weekly and monthly health summaries - Efficient data loading with lazy loading and configurable time windows - Smart query result caching with TTL for improved performance - Support for CSV exports from the Simple Health Export CSV iOS app
README
Apple Health MCP Server
[](https://badge.fury.io/js/@neiltron%2Fapple-health-mcp) [](https://opensource.org/licenses/MIT) An MCP (Model Context Protocol) server for querying Apple Health data using SQL. Built with DuckDB for fast, efficient health data analysis. > [!NOTE] > This project currently relies on the Simple Health Export CSV app by Eric Wolter. See Exporting Data below for more info on how best to use the app. > > This is currently the easiest way I could find to quickly and reliably get Apple Health data exported in CSV format. If you have ideas of better ways to import data, please submit an issue.Features
Installation
No installation required! Use directly with npx via Claude Desktop or other MCP clients.Usage with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
``json
{
"mcpServers": {
"apple-health": {
"command": "npx",
"args": ["@neiltron/apple-health-mcp"],
"env": {
"HEALTH_DATA_DIR": "/path/to/your/health/export"
}
}
}
}
`
Environment Variables
HEALTH_DATA_DIR (required): Path to your Apple Health CSV export directory
MAX_MEMORY_MB (optional): Maximum memory usage in MB (default: 1024)
CACHE_SIZE (optional): Number of cached query results (default: 100)
Example Configuration
`json
{
"mcpServers": {
"apple-health": {
"command": "npx",
"args": ["@neiltron/apple-health-mcp"],
"env": {
"HEALTH_DATA_DIR": "/Users/yourname/Downloads/HealthAll_2025-07-202_01-04-39_SimpleHealthExportCSV",
"MAX_MEMORY_MB": "2048"
}
}
}
}
`
Exporting Data
To use get your data:
Download the Simple Health Export CSV app for iOS.
Tap the All button in the app to download all data for your desired time range (default 1 month).
When prompted, Airdrop it to your computer or transfer it some other way.
Unzip the file to your desired location
Set the HEALTH_DATA_DIR value in your MCP config. See Example Configuration above.
Available Tools
1. health_schema: Get information about available tables and their structure
2. health_query: Execute SQL queries directly on your health data
3. health_report: Generate comprehensive health reports
Data Structure
The server expects Apple Health data exported as CSV files with the following naming pattern:
HKQuantityTypeIdentifier*.csv - Quantitative health metrics
HKCategoryTypeIdentifier*.csv - Categorical health data
HKWorkoutActivityType*.csv - Workout and activity data
Each CSV file should have these columns:
type: The specific health metric type
sourceName: Source device/app
startDate: Start timestamp (UTC)
endDate: End timestamp (UTC)
value: The measurement value
unit: Unit of measurement
Development
For local development:
`bash
Clone and install dependencies
git clone https://github.com/neiltron/apple-health-mcp.git
cd apple-health-mcp
npm install
Build the project
npm run build
Type checking
npm run typecheck
`
Troubleshooting
Common Issues
1. "No data found": Check that your CSV files are in the correct directory
2. Memory errors: Reduce MAX_MEMORY_MB or use shorter time windows
3. Slow queries: Ensure you're filtering by date ranges
4. Missing tables: Table names are lowercase (e.g., hkquantitytypeidentifierheartrate`)
Contributing
Contributions are welcome! Please ensure:License
MITRelated MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Saju Insights
hjsh200219
Saju Insights provides personalized Korean traditional Four Pillars of Destiny (Saju) fortune-telling based on birth data. It calculates destiny charts using the eight characters (four heavenly stems and four earthly branches) derived from birth year, month, day, and hour. Key capabilities include: - Birth chart calculation with automatic True Solar Time adjustment (Jintaeyangsi -30min correction) - Fortune analysis covering personality, career, wealth, health, and love prospects - Relationship compatibility analysis comparing two people's Saju charts - 10-year luck cycle (Daewon) predictions for long-term planning - Yongsin (favorable element) guidance on lucky colors, directions, and career paths - Lunar-solar calendar conversion supporting 1900-2200 with leap month handling - Daily fortune readings and seasonal power calculations - Multiple interpretation schools including Ziping, DTS, and modern methodologies