google-health-mcp
google-health-mcp
MCP-Server für die Google Health API mit lokalem SQLite-Cache und Trendanalyse.
Entwickelt für Claude Code und andere MCP-Clients. Ihre Daten werden in eine Datenbank auf Ihrem eigenen Rechner synchronisiert. Dadurch sind Abfragen schnell, funktionieren offline und verbrauchen kein API-Kontingent.
Eigenschaften
Lokaler SQLite-Cache – einmal synchronisieren, sofort abfragen
Inkrementelle Synchronisierung – jeder Lauf holt nur neue Daten und setzt dort fort, wo der letzte aufgehört hat
Offline-Modus – Cache ohne Anmeldedaten und ohne Netzwerk ausliefern
Trends – wöchentliche, monatliche oder vierteljährliche Aggregate und Zwei-Zeitraum-Vergleiche
EKG – Messwerte vollständig gespeichert, einschließlich Wellenform, die nur auf Anfrage zurückgegeben werden
doctor– diagnostiziert eine Installation offline und schreibgeschützt, ohne Kontingent zu verbrauchen
Related MCP server: google-health-mcp-server
Datentypen
Tool | Daten |
| Ruhepuls |
| Schritte, Kalorien, Distanz, Stockwerke |
| Trainingseinheiten (Name, Dauer, Herzfrequenz, Kalorien) |
| Dauer, Schlafphasen, Schlafperiode |
| Gewicht, Körperfettanteil % |
| Nächtliche Blutsauerstoffsättigung |
| Herzratenvariabilität (RMSSD) |
| Aktive Zonenminuten, mit der Aufschlüsselung nach Zone |
| Nächtliche Atemzüge pro Minute |
| Nächtliche Abweichung von Ihrem Ausgangswert und die zugrunde liegenden Absolutwerte |
| Manuell protokollierte Körpertemperaturmessungen |
| VO2 max, sofern das Gerät es meldet |
| Nahrungskalorien und Wasser, sofern protokolliert |
| Elektrokardiogramme: Klassifikation, durchschnittliche Herzfrequenz, Dauer, Wellenform auf Anfrage |
| Benachrichtigungen über unregelmäßigen Rhythmus und die Zeitfenster, die sie ausgelöst haben |
| Gekoppelte Geräte, Akkustand, letzte Synchronisierung |
| Gesamtwerte und beste Tage über den gecachten Verlauf, mit dessen Abdeckung |
| Aggregierte Durchschnittswerte und Zeitraumvergleiche |
Voraussetzungen
Python 3.13+ (in CI auf 3.13 und 3.14 getestet)
Ein Google-Konto mit Gesundheitsdaten und ein Google Cloud-Projekt für die Autorisierung. Es wird kein Abrechnungskonto benötigt – die Konsole bietet während der Einrichtung eine kostenlose Testphase an, die Sie vollständig ablehnen können.
Einrichtung
1. Installation
pip install google-health-mcpOder führen Sie es ohne Installation aus; dann wird jeder unten genannte google-health-mcp ...-Befehl zu uvx google-health-mcp ...:
uvx google-health-mcp --version2. Google Cloud-Projekt erstellen
Jeder Benutzer registriert seinen eigenen OAuth-Client. Das sind sieben Konsolenschritte; die Seitennamen entsprechen dem Stand von Google im August 2026.
Googles eigene Einrichtungsseite leitet Sie woanders hin – befolgen Sie stattdessen die folgenden Schritte. Die Schnellstartanleitung erstellt einen Web-Client mit https://www.google.com als Redirect-URI. Das passt eher zum OAuth Playground als zu einem Programm auf Ihrem Rechner; dieser Server lehnt jene Datei ab und teilt das mit. Verwenden Sie diese Seite nur, um zu prüfen, ob eine der unten genannten Seiten umbenannt wurde.
Projekt. Erstellen Sie ein Projekt unter console.cloud.google.com/projectcreate und wählen Sie es aus.
API. Aktivieren Sie die Google Health API auf der Seite zur API-Aktivierung.
Erste Schritte. Öffnen Sie Google Auth Platform und schließen Sie Get started ab – App-Name, Support-E-Mail, Externe Zielgruppe, Kontakt-E-Mail. Ein neues Projekt hat bis dahin keine Seiten für Zielgruppe, Datenzugriff oder Clients.
Zielgruppe. Fügen Sie unter Testnutzer Ihr eigenes Google-Konto hinzu. Wenn Sie das überspringen, schlägt die Anmeldung mit
403: access_deniedfehl.Datenzugriff. Klicken Sie auf Bereiche hinzufügen oder entfernen, suchen Sie nach „Google Health API" und aktivieren Sie die unten unter OAuth-Bereiche aufgeführten Schreibschutz-Berechtigungen.
Clients. Erstellen Sie einen OAuth-Client vom Typ Desktop-App und laden Sie dessen JSON herunter. Ein Desktop-Client erlaubt die Loopback-Umleitung automatisch, sodass nichts zu registrieren ist; ein Web-Client tut das nicht und scheitert stattdessen bei der Zustimmung.
Veröffentlichen. Gehen Sie zurück zur Seite „Zielgruppe" und klicken Sie auf App veröffentlichen.
Schritt 7 ist der, der zwickt, und es lohnt sich, zu prüfen statt zu vermuten. Solange der Veröffentlichungsstatus einer App „Testing" ist, gibt Google Refresh-Tokens aus, die sieben Tage nach der Zustimmung ablaufen. Alles funktioniert also, und eine Woche später stoppt die Synchronisierung, ohne dass etwas auf diesen Moment zurückweist. Die Seite „Zielgruppe" kann „In production" anzeigen, während der Token-Server anderer Meinung ist. Zwei Angaben, die das nicht tun: die Zeile zum Verifizierungsstatus auf der Seite Branding und google-health-mcp doctor, das lautstark fehlschlägt, wenn der gespeicherte Token eine kurze Gültigkeitsdauer verzeichnet.
3. Autorisieren
Legen Sie die heruntergeladene Client-JSON-Datei unverändert an der Stelle ab, an der der Server danach sucht:
mkdir -p ~/.config/google-health-mcp
cp ~/Downloads/client_secret_*.json ~/.config/google-health-mcp/google_client.json
google-health-mcp authIhr Browser wird warnen, dass Google diese App nicht verifiziert hat. Das ist zu erwarten, und die App ist Ihre eigene: Diese Gesundheits-Berechtigungen gelten als eingeschränkt, und die Verifizierung ist erst ab mehr als 100 Nutzern von Bedeutung. Klicken Sie auf Erweitert und dann auf Weiter zu google-health-mcp (unsicher), und erteilen Sie die Berechtigungen.
Der Ablauf lauscht für den Rückruf auf localhost:8081; dieser Port muss also frei sein. Die Tokens werden mit 0600-Berechtigungen in ~/.config/google-health-mcp/google_tokens.json gespeichert. Zugriffstokens halten eine Stunde und werden automatisch erneuert. Refresh-Tokens rotieren nicht, sodass ein auf einem Rechner mit Browser erzeugter Token auf einen Rechner ohne Browser kopiert werden kann.
Wenn Sie die App vor der Veröffentlichung autorisiert haben, führen Sie anschließend google-health-mcp auth erneut aus: Eine Veröffentlichung verlängert einen bereits erteilten Token nicht, und dieser läuft weiterhin nach sieben Tagen ab.
4. Bei Ihrem MCP-Client registrieren
claude mcp add -s user google-health -- google-health-mcpStattdessen mit uvx ausführen: claude mcp add -s user google-health -- uvx google-health-mcp.
5. Prüfen
google-health-mcp doctorEs lohnt sich, dies sowohl vor Schritt 3 (Autorisieren) als auch danach auszuführen: Es meldet, ob Port 8081 frei ist und ob dieser Host einen Browser öffnen kann – das sind die beiden Wege, auf denen auth scheitert, bevor es überhaupt beginnt.
Offline und schreibgeschützt: Es meldet, welche Pfade sich wo aufgelöst haben, ob die Anmeldedatensätze die richtige Form haben, ob der Token nur kurzlebig ist und ob der Cache aktuell gehalten wird.
6. Erste Synchronisierung (optional)
Abfrage-Tools synchronisieren bei der ersten Nutzung jedes Tages; Sie können diesen Schritt also überspringen. Um den Cache vorab zu füllen oder ältere Verläufe nachzuziehen:
google-health-mcp sync --days 30
google-health-mcp sync --since 2023-10-01 # backfillCLI-Nutzung
google-health-mcp Start the MCP server (stdio transport)
google-health-mcp -V, --version Print the installed package version
google-health-mcp auth Interactive OAuth setup
google-health-mcp doctor Check the setup and report what needs fixing
google-health-mcp sync Sync data to the local cache
--days N Days of history for a first sync (default: 30)
--types TYPE,... Data types to sync (default: all). One or more of:
heart_rate, activity, exercises, sleep, weight, spo2,
hrv, azm, breathing_rate, skin_temperature,
core_temperature, cardio_fitness, food_log, ecg, irn
--since YYYY-MM-DD Fetch from this date, ignoring the incremental cursor
--until YYYY-MM-DD Inclusive end date for a --since window; together they
re-fetch exactly that window, to repair a gap in the
middle of the cache
google-health-mcp import Import exported JSON data files
--data-dir PATH Directory containing the JSON filesMCP-Tool-Referenz
Abfrage-Tools synchronisieren bei der ersten Abfrage jedes Tages je Datentyp und lesen dann aus dem Cache.
Alle Abfrage-Tools außer health_get_devices und health_get_lifetime_stats, die keine Argumente entgegennehmen, akzeptieren:
start_date–YYYY-MM-DD,YYYY-MModer30d(relativ). Standard: die letzten 30 Tage.end_date–YYYY-MM-DD. Standard: heute.live– wenn true, wird dieses Zeitfenster vor dem Lesen des Caches erneut von der API geholt. Ein fehlgeschlagenes Aktualisieren wird gemeldet, statt stillschweigend aus dem Cache zu antworten.
health_get_exercises akzeptiert außerdem exercise_type, einen case-insensitiven Teilstring-Abgleich auf den Namen der Trainingseinheit. health_get_ecg akzeptiert außerdem include_waveform: Eine Aufzeichnung besteht aus Tausenden von Spannungswerten, daher enthält die Standardantwort stattdessen Klassifikation, durchschnittliche Herzfrequenz, Dauer und eine Stichprobenanzahl.
health_sync
data_types–alloder eine durch Kommas getrennte Teilmenge der oben unter CLI-Nutzung aufgeführten Namen (irnsind die Benachrichtigungen zu unregelmäßigem Rhythmus). Standard:all.days– Tage Verlauf für eine erste Synchronisierung (Standard: 30). Spätere Synchronisierungen sind inkrementell.since/until– ein exaktes Zeitfenster holen, unabhängig davon, was im Cache liegt.
health_trends
data_type– ein beliebiger gecachter Typ mit einer Tagesreihe; EKG-Messwerte und Rhythmusmeldungen sind Ereignisse und haben keinen Trend. Standard:activity.period–weekly,monthly,quarterly. Standard:monthly.start_date/end_date– Standard: die letzten 12 Monate.compare– zwei Zeiträume, z. B.last_30d vs previous_30d,2026-03 vs 2026-02,2026-Q1 vs 2025-Q4. Wenn gesetzt, werdenperiod,start_dateundend_dateignoriert.
OAuth-Bereiche
Aktivieren Sie auf der Seite „Datenzugriff" diese Schreibschutz-Berechtigungen. Alle liegen unter https://www.googleapis.com/auth/googlehealth.:
Bereich | Datenzugriff |
| Schritte, Distanz, Stockwerke, Kalorien, Trainingseinheiten, aktive Zonenminuten |
| Herzfrequenz, HRV, SpO2, Atemfrequenz, Gewicht, Körperfett, Temperatur, VO2 max |
| Schlafphasen und Schlafstadien |
| Nahrungs- und Wasserprotokolle |
| Elektrokardiogramme |
| Benachrichtigungen über unregelmäßigen Rhythmus |
| Gekoppelte Geräte |
location.readonly und profile.readonly sind zwei von der Konsole angebotene Berechtigungen, die dieses Paket bewusst nicht anfordert, weil hier nichts von ihnen liest – die erste ist die bei einer Trainingseinheit aufgezeichnete GPS-Spur.
Lesen Sie die Liste aus der Konsole ab, nicht von der veröffentlichten Berechtigungsseite – es gibt Schreibschutz-Berechtigungen, die weder in Googles Dokumentation noch im Discovery-Dokument der API selbst erscheinen, und das Discovery-Dokument lässt nutrition.readonly gänzlich aus. Um weniger anzufordern, aktivieren Sie auf der Seite „Datenzugriff" weniger und bearbeiten Sie GOOGLE_SCOPES in config.py vor der Autorisierung; dafür ist ein Quellcode-Checkout erforderlich statt einer Installation per pip oder uvx. Eine erteilte Genehmigung erhält bei der Erneuerung keine zusätzlichen Berechtigungen; die Liste später zu erweitern, bedeutet also, auth erneut auszuführen.
Konfiguration
Variable | Standard | Beschreibung |
|
| Verzeichnis, das den OAuth-Client und die Tokens enthält |
|
| SQLite-Cache |
| nicht gesetzt | Bei truthy ( |
Offline-/Cache-only-Modus
Standardmäßig synchronisiert der Server bei Bedarf, daher ist kein Cron-Job erforderlich. Setzen Sie GOOGLE_HEALTH_MCP_OFFLINE=1, um stattdessen als reiner Leser zu laufen:
Es sind keine Anmeldedaten erforderlich – der Server öffnet die Token-Datei nie.
Es wird kein Netzwerkaufruf durchgeführt. Auto-Sync ist deaktiviert, und
live=True,health_get_devicesundhealth_syncgeben eine klare Meldung "Offline-Modus" zurück, anstatt die API zu erreichen.Abfragetools bedienen den Cache, gekennzeichnet mit
"offline_mode": true.
Typische Anwendungsfälle:
Mehrere Maschinen, ein Cache – Ein Host führt
google-health-mcp syncper cron oder systemd gegen eine gemeinsame Datenbank aus; die anderen setzenGOOGLE_HEALTH_MCP_OFFLINE=1, richtenGOOGLE_HEALTH_MCP_DB_PATHauf dieselbe Datei und lesen nur.CI und Datenschutz – Abfragen ohne Netzwerkzugriff und ohne Anmeldedaten ausführen.
Ratenlimits
Google wendet ein Pro-Benutzer-Anfragekontingent an, dokumentiert unter developers.google.com/health/rate-limits. Normales Synchronisieren liegt weit davon entfernt: Ein Tagesupdate besteht aus einer Handvoll Anfragen, und ein gemessener Drei-Jahres-Backfill aller Datentypen lag bei etwa 250. Wenn eine Synchronisierung abgebrochen wird, wird dieser Datentyp als partielle Synchronisierung erfasst und der nächste Lauf setzt an seinem Cursor fort, anstatt von vorn zu beginnen.
Abfragen aus dem Cache – die Standardeinstellung – kosten überhaupt kein Kontingent.
Datensicherheit
Ihre Gesundheitsdaten bleiben auf Ihrem Rechner: Dieser Server hat kein Backend, sendet nichts irgendwohin und kommuniziert nur mit der Google-API über Ihre eigenen Anmeldedaten.
Das Repository wird mit einem Pre-Commit-Hook ausgeliefert, der sich weigert, Datenbankdateien, alles unter config/ und große Dateien zu committen; CONTRIBUTING.md erklärt, wie man ihn installiert.
Importieren vorhandener Daten
Wenn Sie bereits Gesundheitsdaten als JSON-Dateien haben, etwa aus einem Export oder einem eigenen Skript:
google-health-mcp import --data-dir /path/to/json/files/Erwartete Dateinamen: heart_rate.json, activity.json, exercises.json, sleep.json, weight.json, spo2.json, hrv.json. Siehe src/google_health_mcp/importer.py für die erwartete Struktur jeder Datei. Der Import deckt diese sieben Typen ab; alles andere kommt per sync.
Mitwirken
Siehe CONTRIBUTING.md für die Entwicklungseinrichtung, den Test-Workflow und den Pre-Commit-Hook. Änderungen werden in CHANGELOG.md festgehalten.
Lizenz
Available Tools
27 toolshealth_get_activityA
Get daily activity summaries (steps, calories, active minutes, distance).
Returns data from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.
Note: live=True fetches one API call per day - avoid large ranges to stay within the 150 requests/hour rate limit.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per day with steps, calories, active minutes, distance. active_minutes = very_active + fairly_active (excludes lightly active).
Inputs: live, end_date, start_date.
health_get_activity_eventsA
Get activity events over a date range: sedentary periods, altitude gains, swim lengths.
Each event's start and end (UTC), start_utc_offset for the local time, and the values Google sends with it, as sent: gainMillimeters for an altitude gain, strokeCount for a swim length, integers often as strings. Google counts altitude among its true zeros, so an interval with no gain field is a gain of none. Swim lengths are detected passively by the watch and need not belong to a swim workout. Sedentary periods are read from Google's merge of every source rather than from each source's own list.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "7d". Default: 7 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache. include_records: If true, return each event's point exactly as Google sent it instead of its interval and values. Altitude and swim points carry their data source; Google's merged sedentary stream carries none.
Returns sedentary_periods, altitude_gains and swim_lengths, each a list of events with the local date it started on, and count, the events in all.
Inputs: live, end_date, start_date, include_records.
health_get_azmA
Get daily Active Zone Minutes (AZM), the headline cardio metric.
AZM counts minutes spent in heart rate zones at or above Fat Burn intensity.
total_minutes is the plain sum of the three zone columns as reported, not a
weighted one. Returns from local cache by default, auto-syncing if stale.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per day with total_minutes plus per-zone breakdown (fat_burn_minutes, cardio_minutes, peak_minutes). Distinct from active_minutes in health_get_activity, which counts wall-clock minutes regardless of intensity - and which has no source in this API, so it is present only for days that arrived by import.
Inputs: live, end_date, start_date.
health_get_breathing_rateA
Get nightly breathing rate (avg breaths per minute during sleep).
Sourced during sleep tracking. Useful as an illness/recovery signal: sustained increases of 2-3 bpm above personal baseline can indicate incipient infection or strain. Returns from cache by default, auto-syncing if stale.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache. include_sleep_summaries: If true, also return Google's breathing-rate summaries by sleep stage: rate, signal-to-noise and standard deviation for the full sleep and for deep, light and REM sleep. A night can carry several, each at its own sample time.
Returns one entry per night with breaths_per_min and data_source (the device and platform Google says recorded it), and count, the nights. With the flag also sleep_summaries, each with the local date of its sample, sample_time (UTC), utc_offset and data_source, and summary_count. Typical adult range: 12-20 bpm at rest.
Inputs: live, end_date, start_date, include_sleep_summaries.
health_get_cardio_fitnessA
Get Cardio Fitness Score (VO2 Max estimate).
Estimated from resting HR, HR during walks and runs, and demographics. Updates roughly weekly. Returns from cache by default, auto-syncing if stale.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
A reading usually carries a range or a single value; one re-synced across the switchover between providers can hold both. They are different measurements - do not average them together or fill one from the other. vo2_max_low and vo2_max_high are a reported band (e.g. 39-43); vo2_max is a single figure. All in mL/kg/min, higher being better cardiorespiratory fitness. Beside a single figure Google may report cardio_fitness_level (POOR to EXCELLENT), estimated (1 or 0), vo2_max_covariance and data_source (the device and platform it says recorded it).
Inputs: live, end_date, start_date.
health_get_core_temperatureA
Get manually-logged core (body) temperature readings (degrees Celsius).
These are absolute body temperatures the user enters by hand - a thermometer reading logged in an app - and are the right source for fever / body-temperature questions. They are NOT the device-derived nightly skin-temperature variation from health_get_skin_temperature. A single day can hold several readings (each timestamped), useful for tracking a fever over time.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per logged reading with datetime (YYYY-MM-DDThh:mm:ss), temp_celsius, measurement_location (where it was taken, e.g. "MOUTH" or "EAR", as logged), reading_id and data_source. A reading changed in the app replaces its earlier value when its date is next synced.
Inputs: live, end_date, start_date.
health_get_devicesA
List paired devices with battery level and last sync time.
Live-only (no caching) - reflects current device state. Useful for monitoring tracker health, knowing which device produced data, and spotting sync gaps.
Returns one entry per paired device with id, type, device_version, battery (e.g. "High"), battery_level (0-100), last_sync_time, mac, and features list.
Inputs: no named parameters.
health_get_ecgA
Get electrocardiogram (ECG) readings taken on the watch.
Each reading is a single-lead trace the user started by hand, with a rhythm classification - NORMAL_SINUS_RHYTHM, ATRIAL_FIBRILLATION, or one of several inconclusive results (low or high heart rate, poor reading, unclassified). Use it for questions about heart rhythm or AFib checks; for resting rate over time use health_get_heart_rate instead.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache. include_waveform: If true, include the raw voltage samples. These are thousands of integers per reading - ask for them only to analyse the trace itself. Multiply by scaling_factor for millivolts, and read them at sampling_hz samples per second.
Returns one entry per reading with classification, avg_bpm, duration_sec, sampling_hz, scaling_factor and waveform_samples (null where no trace was stored, or where the stored one cannot be read).
Inputs: live, end_date, start_date, include_waveform.
health_get_exercise_routeA
Get the GPS route of one exercise, as the TCX file Google exports.
Only exercises recorded with GPS have a route, and a sync fetches routes for the workouts in its own window. The TCX text carries every trackpoint (time, position, altitude, distance, heart rate) and can run to hundreds of kilobytes, so it is returned only when asked for.
Args:
log_id: The exercise's log_id, as health_get_exercises returns it.
include_tcx: If true, include the TCX text itself.
Returns the exercise's log_id, date and provider, and the TCX text when asked for.
Inputs: log_id (required), include_tcx.
health_get_exercisesA
Get exercise log entries (individual tracked activities).
Returns exercise sessions from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. exercise_type: Filter by activity name (case-insensitive substring match), e.g. "cycling", "walk", "run". Default: all types. A value matching no workout name the cache holds is refused, naming those, rather than answered as a period with no workouts. live: If true, re-fetch this window from the API before reading the cache. include_detail: If true, include every exercise event (start, pause, stop), split and split summary. Without it each entry carries only how many there are (detail_counts), null where none is stored: an imported workout, one Google sent none for, one synced before these were fetched, or a stored value that cannot be read.
Returns exercise entries with name, duration, calories, avg heart rate, distance, and source (for a synced workout the recording device's name, and data_source.recordingMethod says whether it was logged by hand; for an imported one whatever the import carried), and for a synced workout also start and end times with their UTC offsets, active_seconds, notes, Google's metrics_summary whole (pace, speed, elevation, heart-rate zone durations, mobility), exercise_metadata (hasGps, pool length) and data_source. Note: HR data from cycling may be unreliable (optical sensor vs handlebar grip).
Inputs: live, end_date, start_date, exercise_type, +1 more.
health_get_food_logA
Get daily food and water totals, and each entry on request.
Returns calories consumed and water intake (in mL) per day. Only populated where the user logs food or water by hand in a connected app. Returns from cache by default, syncing once a day from a few days before the last sync. An entry logged since today's first sync, or for an older date, needs live=True over a window covering it.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier; 7 with include_entries. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache. include_entries: If true, also return each food and drink logged, with Google's fields for it: for food, foodDisplayName, mealType, serving, energy, energyFromFat, totalCarbohydrate, totalFat, nutrients and food (Google's reference to the food record); for a drink, amountConsumed. Integers may arrive as strings. The first sync of entries covers 30 days, so a day before that can have a total and no entries until health_sync is run with since.
Returns food_log, one row per logged day with calories_in and water_ml, and count, the number of rows. Days with no logging are omitted. With include_entries, also food_entries and water_entries. Each entry carries date, the local date it was logged for, and data_source. It also carries start_time and end_time in UTC, and start_utc_offset for the local time; on entries logged in the app, end_time falls seconds after start_time. entry_count is how many entries both lists hold.
Inputs: live, end_date, start_date, include_entries.
health_get_heart_rateA
Get daily resting heart rate and heart rate zones.
Returns resting HR and zone breakdown (Out of Range, Fat Burn, Cardio, Peak) from the local cache by default, auto-syncing if stale.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per day with resting_hr, zones array, calculation_method (Google's WITH_SLEEP or ONLY_WITH_AWAKE_DATA) and data_source (the device and platform Google says recorded it). Zone data: name, minutes, caloriesOut, max/min HR for each zone. Zones are present only on days that arrived by import; a sync does not write them. Google's own zone boundaries are in health_get_heart_rate_zones.
Inputs: live, end_date, start_date.
health_get_heart_rate_zonesA
Get Google's daily heart-rate zone boundaries.
Each day's four zones (LIGHT, MODERATE, VIGOROUS, PEAK) with the minimum and maximum beats per minute of each, as Google reports them. Boundaries only: time spent in each zone is not part of this. health_get_heart_rate carries an import's zones, with minutes, on days that arrived that way.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per day with zone_boundaries (the list as Google sent it, the bounds as strings).
Inputs: live, end_date, start_date.
health_get_heightA
Get height readings, in millimetres as Google reports them.
Height is usually logged once, often years back, so the default window is ten years. Returns data from the local cache by default.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "Nd". Default: ten years back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch height from the API before reading the cache.
Returns one entry per reading with datetime, date, height_mm and provider.
Inputs: live, end_date, start_date.
health_get_hrvA
Get nightly HRV (heart rate variability) data.
Returns data from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.
HRV data is sparse: only nights with on-wrist sleep tracking produce readings.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per night with daily_rmssd and deep_rmssd (ms), entropy, non_rem_hr (non-REM heart rate, bpm) and data_source (the device and platform Google says recorded it). RMSSD = root mean square of successive RR interval differences. Higher values generally indicate better recovery and parasympathetic activity.
Inputs: live, end_date, start_date.
health_get_irregular_rhythmA
Get irregular heart rhythm notifications raised by the watch.
These are background checks the watch runs while the user is still - an alert means it saw a rhythm consistent with atrial fibrillation over one or more windows, not a diagnosis. Most accounts never have one. For a deliberate reading with a trace behind it, use health_get_ecg.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per notification with start_time, end_time and alert_windows (the periods that triggered it).
Inputs: live, end_date, start_date.
health_get_lifetime_statsA
Get all-time activity totals and personal best records.
Totals for steps, floors, distance and calories over every day held in the cache, plus the best single day for steps, floors and distance with the date each record was set.
The answer is bounded by what has been synced, so it is returned with a
coverage block giving the first and last dates and the number of days
counted - read it before quoting a total as all-time. There is no
tracker-versus-total split and no "active score"; neither has a source.
Inputs: no named parameters.
health_get_profileA
Get the account's profile, settings and irregular-rhythm enrolment.
Each is the record Google returns, kept whole: the profile carries age, membership start and stride lengths, the settings carry units, time zone and locale, and the enrolment says whether irregular-rhythm notifications are on. Returns data from the local cache by default.
Args: live: If true, re-fetch the records from the API before reading the cache.
Returns profile, settings and irn_profile, and when each was fetched
(UTC). A record is null when it has never been fetched, which includes one
whose permission the grant lacks.
Inputs: live.
health_get_skin_temperatureA
Get nightly skin temperature variation (degrees Celsius from personal baseline).
This is the device-derived RELATIVE deviation recorded during sleep, NOT an absolute body temperature - for fever / body-temperature readings use health_get_core_temperature instead. A baseline takes about three nights to establish before values appear. Useful as an illness/cycle/recovery signal.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per night with nightly_relative (degrees C, can be negative), the absolutes behind it (nightly_absolute, baseline), nightly_stddev_30d (the 30-day standard deviation of the relative value), log_type (e.g. "dermal") and data_source (the device and platform Google says recorded it).
Inputs: live, end_date, start_date.
health_get_sleepA
Get nightly sleep data (duration, stages, efficiency).
Returns sleep data from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.
Sleep data is sparse: only nights with watch-tracked sleep are present. Travel, off-wrist nights, or manual logs may be missing.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per night with total_minutes, efficiency, start/end times, and stage breakdown (deep, light, REM, wake minutes).
Inputs: live, end_date, start_date.
health_get_sleep_sessionsA
Get each sleep session as Google recorded it, rather than the nightly total.
A night can be several sessions (a wake-and-resume, a nap); health_get_sleep sums them per night, while this returns each one whole: its interval, type (CLASSIC or STAGES), Google's metadata (mainSleep, nap, processed, manuallyEdited, stagesStatus), its summary (minutesAsleep, minutesAwake, minutesInSleepPeriod, minutesToFallAsleep, minutesAfterWakeUp, and the per-stage minutes and counts), and the device that recorded it.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache. include_stages: If true, include every stage segment, short awakening and out-of-bed segment. Without it each session carries only how many there are, since a night runs to dozens.
Returns one entry per session with session_id, date (the local day it ended), start_time, end_time, provider, record (the session as Google sent it, less the segment arrays unless include_stages) and segment_counts (how many of each; absent where the stored record cannot be read).
Inputs: live, end_date, start_date, include_stages.
health_get_spo2A
Get nightly SpO2 (blood oxygen saturation) data.
Returns data from the local cache by default. Run health_sync first to populate it.
SpO2 data is sparse: only nights with on-wrist sleep tracking produce readings.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per night: avg SpO2 percentage and up to two pairs of bounds. avg_ci_low/avg_ci_high come from this API, which Google describes as the lower and upper bound of the confidence interval of oxygen saturation samples during sleep. min/max hold whatever an import carried; on the history checked, they matched avg_ci_low/avg_ci_high on every night carrying both. std_dev is Google's standard deviation of the daily SpO2 averages over the past 7-30 days, not of this night's samples, and data_source the device and platform Google says recorded it. Normal range: 95-100%. Below 90% may indicate sleep apnea.
Inputs: live, end_date, start_date.
health_get_weightA
Get weight log entries (weight, BMI, body fat percentage).
Returns data from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.
Weight data is sparse: only days with weigh-in entries are present.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per day with weight_kg, bmi, fat_pct. Every individual weigh-in is in health_get_weight_readings.
Inputs: live, end_date, start_date.
health_get_weight_readingsA
Get every weigh-in and body-fat reading, as Google recorded each one.
health_get_weight keeps one row a day; this returns every reading: its value in Google's own unit (weightGrams, percentage), when it was taken, and the device or app that recorded it.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns weight_readings and body_fat_readings, each entry with reading_id, datetime (local), date, provider and record (the reading as Google sent it), and count, the number of readings of both kinds.
Inputs: live, end_date, start_date.
health_rebuildA
Fetch a date range again from Google and report every row that would change.
For when the cache may hold something Google no longer does, or holds it differently. These dates are fetched again, with a day either side, and a row Google sent before and no longer holds is removed. A removed row loses any imported value it carried, and the reply lists it with every value. Where Google still holds a row, an imported value beside Google's stays. History only an import wrote is never touched. A type whose fetch brings back nothing it can store keeps its rows, and says so in a note. A daily weight or body-fat figure synced before release 1.13.0 stays even after its readings are deleted. Without apply nothing is changed: the reply is a preview. Show the person what it lists before running it again with apply=True. A preview copies the cache into memory and makes the same requests to Google as applying does.
Args: since: First date to rebuild, "YYYY-MM-DD". Required. until: Last date, "YYYY-MM-DD". Default: today. data_types: "all", or comma-separated names as health_sync takes them. "account" has no dates and is never rebuilt. apply: If true, change the cache. Default: false, a preview.
Returns, per type, removed (each row Google no longer holds, with its values), changed (each row whose values differ, before and after), added and unchanged (counts), and the range the fetch covered. A type whose fetch fails has nothing removed.
Inputs: since (required), apply, until, data_types.
health_syncA
Sync health data to the local cache.
Fetches data from the Google Health API and stores it in SQLite for fast offline queries. Run this before using other health_get_* tools.
Syncs incrementally: only fetches data newer than the most recent entry in each table. First sync fetches the specified number of days.
Args: data_types: What to sync. Options: "all", "heart_rate", "heart_rate_zones", "activity", "exercises", "sleep", "weight", "spo2", "hrv", "azm", "breathing_rate", "skin_temperature", "core_temperature", "cardio_fitness", "food_log", "ecg", "irn", "account", "height", "exercise_routes", "sleep_sessions", "weight_readings", "body_fat_readings", "sedentary_periods", "altitude_gains", "swim_lengths", "respiratory_rate_sleep", "food_entries", "water_entries". Comma-separated for multiple, e.g. "sleep,hrv". Default: "all". days: Days of history for first sync (default: 30). Ignored on subsequent syncs (uses last synced date). since: Optional "YYYY-MM-DD" backfill date. When set, fetches from this date regardless of what is already cached - use to pull history older than the current cache. Overrides incremental resume and days. until: Optional "YYYY-MM-DD" inclusive end date; requires since. Together they re-fetch and upsert exactly the since..until window - use to repair a gap in the middle of the cache without re-pulling everything from the gap to today.
Returns summary of records synced per data type; for the day-at-a-time types (sedentary_periods, altitude_gains, swim_lengths, respiratory_rate_sleep, food_entries, water_entries) the count is of days. Not for querying data - use health_get_heart_rate, health_get_activity, health_get_sleep, etc. instead.
Inputs: days, since, until, data_types.
health_trendsA
Analyse trends in cached health data.
Computes averages and totals over time from the local cache, auto-syncing if stale.
Args: data_type: What to analyse. Options: "heart_rate", "activity", "exercises", "sleep", "weight", "spo2", "hrv", "azm", "breathing_rate", "skin_temperature", "core_temperature", "cardio_fitness", "food_log". Default: "activity". period: Aggregation period. Options: "weekly", "monthly", "quarterly". Default: "monthly". start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "365d". Default: 365 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. compare: Compare two periods. Format: "last_30d vs previous_30d", "2026-03 vs 2026-02", "2026-Q1 vs 2025-Q4". When set, period/start_date/end_date are ignored.
Returns aggregated averages per period. For activity: steps, distance, active minutes. For exercises: sessions, duration, calories. For sleep: duration, efficiency, stage breakdown. For heart_rate: resting HR min/avg/max. For weight: weight, fat%, BMI. For hrv: daily and deep RMSSD.
For cardio_fitness, avg_vo2_max_low/high average a reported band while avg_vo2_max averages a single value: two definitions, each with the count of readings behind it, never one series.
For spo2, min_spo2/max_spo2 are the lowest and highest bound among imported nights (counted by nights_observed_extremes), and avg_nightly_ci_low/avg_nightly_ci_high the mean of the nightly bounds this API reports (counted by nights_confidence_interval).
These fields and their counts appear in the period form only.
compare= reports spo2 as avg_spo2 alone, and carries both cardio_fitness
definitions.
Not for raw data - use health_get_* tools instead.
Inputs: period, compare, end_date, data_type, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Most tools map to one distinct Google data type, and the descriptions explicitly draw boundaries where overlap exists (weight vs weight_readings, sleep vs sleep_sessions, heart_rate vs heart_rate_zones, activity vs azm, core vs skin temperature). A few pairs remain easy to confuse on name alone—health_get_activity vs health_get_activity_events, health_get_weight vs health_get_weight_readings—requiring the agent to read prose before selecting.
Nearly all tools follow the health_get_<noun> pattern with snake_case, which is predictable and readable. The four non-get tools (health_sync, health_rebuild, health_trends) deviate in verb but are clearly operational rather than retrieval, so the break is meaningful rather than sloppy.
27 tools is heavy for a single server, and several are narrow variants of a sibling (sleep_sessions, weight_readings, heart_rate_zones, exercise_route) that could have been flags on their parent tools. It stays justifiable because each tool corresponds to a genuinely distinct Google Health data type, but the surface is hard to scan.
The read surface is unusually thorough—every major metric, plus sync, rebuild/repair, trends, lifetime stats, device state, and profile. Gaps are minor: no intraday/raw-resolution queries (e.g. hourly steps, raw HR samples) and no way to log or edit data, though the underlying API is read-only so the latter is largely out of scope.
Maintenance
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Multi-tenant hosted MCP server for Oura Ring — 21 read-only tools, OAuth per user.
Hosted Apple Health MCP for Claude and ChatGPT, works outside the US. iPhone app, no local server.
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Related MCP Servers
- AlicenseBqualityBmaintenanceA local-first MCP server that enables AI agents to read user-authorized Google Health API v4 data from Fitbit, Pixel Watch, and partners via OAuth, with tokens never leaving the machine.26587 npm86MIT
- AlicenseAqualityDmaintenanceMCP server to read daily activity, sleep, heart rate, and body metrics from Google Health API, allowing AI assistants like Claude to access your health data. Optionally syncs health metrics to an Obsidian vault.5MIT
- AlicenseNot gradedqualityDmaintenanceSelf-hosted MCP server that aggregates personal health data from Google Health, Oura, and Withings into a single, provider-attributed interface with configurable source of truth preferences.MIT
- AlicenseAqualityDmaintenanceAn MCP server that locally authenticates with Google Health API v4 and provides read-only access to Fitbit, Pixel Watch, and other health data for AI agents.29112 npm20MIT