Blog
Guides and tutorials on Apple Health, MCP, and AI-native health data workflows.
Apple Health vs Oura: Getting Both into Claude
How Apple Watch and Oura Ring data coexist in HealthKit, how health4ai handles the deduplication, and how to query each source independently.
The MCP Protocol Explained for Health Developers
A technical walkthrough of MCP for developers building health data integrations — protocol mechanics, tool definition, transport options, and why it fits health data.
HealthKit Integration for n8n Beginners
How to connect Apple Health data to n8n workflows — the architecture options, a practical weekly digest example, and common n8n patterns for health data automation.
Apple Health Data Schema: What's in Your Database
The complete health4ai database schema — healthkit_metrics and healthkit_daily_summaries tables, HealthKit type identifiers, and how to query them directly.
Building a Recovery Score with Apple Health Data
How to combine HRV, resting HR, sleep, and training load into a composite recovery score using health4ai MCP tools and Claude Code.
HealthKit Workout History: Querying with AI
How to query your workout history from Apple Health using get_workouts — training load analysis, sport-specific breakdowns, and finding your best sessions.
Apple Watch Heart Rate Data in Claude: What to Ask
How to query resting HR, walking HR, and continuous heart rate data from HealthKit using query_metric and get_metric_stats — what each metric means and when it matters.
Sleep Stage Analysis with Apple Health and Claude
How to query and interpret Core, Deep, and REM sleep data from HealthKit using get_sleep — stage distributions, what each stage does, and how to spot patterns.
Why I Open-Sourced My Apple Health MCP Server
The decision to open source health4ai's MCP server — why privacy-first health data tools need public code, and what the community gets from it.
VO2 Max Trends from Apple Watch: Letting AI Spot the Patterns
How Apple Watch estimates VO2 max, what the data looks like in your database, and how to use query_metric and get_long_term_trend to track fitness trajectory.
Apple Health + AI: The Missing Manual for Developers
Everything Apple doesn't document about HealthKit for developers building AI integrations — the on-device constraint, data access patterns, and why the architecture matters.
Using health4ai to Build a Personal Health Dashboard
Architecture for a personal health dashboard built with Claude Code and health4ai data — query patterns, output formats, and what to show vs what to leave out.
Tracking Body Composition Over Time with AI
How to query weight, body fat percentage, and lean mass trends from Apple Health using get_long_term_trend and compare_periods for multi-month analysis.
HealthKit Data in Claude Desktop: Setup Guide
How to add health4ai to Claude Desktop specifically — config file location, verification steps, and the difference from Claude Code setup.
From HealthKit to Claude: An Engineering Journey
How health4ai was built — the HKObserverQuery discovery, why existing solutions fell short, key architecture decisions, and what shipping a production iOS + MCP system taught us.
Apple Health HRV, Sleep, and Recovery: Letting Claude Analyze Your Training
How to use HRV, sleep stage data, and workout history together to let Claude identify recovery patterns, flag overreaching, and interpret readiness.
Supabase as a Personal Health Database: Why It Works
Why Postgres is the right choice for HealthKit data, how Supabase's free tier handles the data volume, schema overview, and RLS for privacy.
How to Get 10 Years of Apple Health Data Out of Your iPhone
Exporting Apple Health historical data via XML, what the export contains, and how health4ai's backfill imports your complete HealthKit history into Postgres on first launch.
Connecting Wearables to LLMs: A Developer Guide
The full landscape of wearable → LLM integration approaches in 2026 — hardware constraints, architecture patterns, and where each solution fits.
Apple Health Background Sync: Why Most Solutions Fail
Technical deep dive on iOS background execution constraints — BGProcessingTask vs HKObserverQuery — and why the architecture choice determines sync reliability.
The Quantified Self Stack in 2026: Hardware, Apps, and AI
A practical overview of the full QS pipeline — Apple Watch to HealthKit to Postgres to AI — and where each component fits in 2026.
What Is an MCP Server? (And Why Your Health Data Needs One)
MCP explained for developers new to it — what the Model Context Protocol is, how MCP servers work, and why health data is a natural fit for this architecture.
Apple Health Privacy-First AI Integration: Your Data Never Leaves Your Database
How health4ai's architecture keeps your HealthKit data in your own Postgres instance — health4ai never sees it. Why this matters in 2026.
Querying 10 Years of Apple Health Data with SQL and AI
What a decade of HealthKit data looks like in Postgres, how get_long_term_trend works for multi-year analysis, and what patterns AI surfaces that dashboards miss.
Automating a Morning Health Brief with Claude Code and Apple Health
How to build a useful daily health brief using get_daily_snapshot and get_hrv_trend, and schedule it to run automatically each morning.
Running health4ai Locally with Ollama — Zero Cloud Required
How to connect health4ai's MCP server to Ollama via mcphost for a fully local, zero-cloud health data AI setup. Privacy posture and model recommendations.
The health4ai MCP Tools Reference — All 11 Tools Explained
Complete reference for every health4ai MCP tool: parameters, return structure, example calls, and when to use each one.
Using health4ai with Cursor for Health Data Analysis
Adding the health4ai MCP server to Cursor, three practical analysis prompts, and how Cursor Composer handles multi-step health data workflows.
Can health4ai use Neon? Not with the iOS app
health4ai's iOS app signs in with Supabase Auth and writes through a Supabase Edge Function, so Neon and other plain Postgres hosts are not a supported backend. Here is why, and what to use instead.
Building a Weekly Health Review Workflow with n8n and health4ai
How to wire n8n to health4ai's MCP server and Claude to generate a weekly health digest delivered to Telegram or email. Step-by-step workflow config.
Analyzing HRV Trends with Claude: A Practical Guide
HRV raw numbers need context to be useful. How to use get_hrv_trend() and compare_periods to extract meaningful signal from 90+ days of HealthKit HRV data.
Building an AI Health Coaching System with Apple Health and Claude
How to use real HealthKit data — not self-reported numbers — as the foundation for AI coaching context. Using get_coaching_brief() and building a weekly workflow.
How to Query Your Apple Health Data with Claude Code
Prerequisites, MCP tool verification, and five real query examples — from health summary to long-term trends — using health4ai in Claude Code.
Every Way to Get Apple Health Data into an AI in 2026 — Compared
A fair comparison of six approaches for connecting HealthKit to an AI: native connectors, Health Auto Export, VitalTrends, Open Wearables, Health Bridge, and health4ai.
Apple Health MCP Server: Connecting HealthKit to Claude Code
How to connect your Apple Health data to Claude Code, Cursor, or Ollama using an MCP server and a Postgres database you control.
Why Claude's Apple Health Connector Doesn't Work for Developers
Anthropic's Apple Health integration exists — but it only works in the claude.ai web UI. Here's why it doesn't reach Claude Code, the API, or any MCP client.
How to Set Up health4ai with Supabase
Step by step: create a Supabase project, run the schema, deploy the ingest function, connect the iOS app, and query your Apple Health data from Claude Code.
HealthKit → Supabase: Reliable Background Sync That Actually Works
Why iOS background sync is hard, why BGProcessingTask fails, and how HKObserverQuery with a Postgres backend is the only architecture that holds up in practice.