Skip to main content
Glama
google-health-mcp

google-health-mcp

google-health-mcp

CI License: GPL v3 Python 3.13+ PyPI Glama MCP Server

Servidor MCP para la API de Google Health, con caché SQLite local y análisis de tendencias.

Diseñado para Claude Code y otros clientes MCP. Tus datos se sincronizan en una base de datos en tu propia máquina, por lo que las consultas son rápidas, funcionan sin conexión y no consumen cuota de API.

Características

  • Caché SQLite local: sincroniza una vez, consulta al instante

  • Sincronización incremental: cada ejecución obtiene solo lo nuevo, reanudando desde donde se detuvo la anterior

  • Modo sin conexión: sirve la caché sin credenciales y sin red

  • Tendencias: agregados semanales, mensuales o trimestrales, y comparaciones entre dos períodos

  • ECG: lecturas almacenadas completas, incluida la forma de onda, que se devuelven solo cuando se solicitan

  • doctor: diagnostica una configuración sin conexión y de solo lectura, sin gastar cuota

Related MCP server: google-health-mcp-server

Tipos de datos

Herramienta

Datos

health_get_heart_rate

Frecuencia cardíaca en reposo

health_get_activity

Pasos, calorías, distancia, plantas

health_get_exercises

Entrenamientos (nombre, duración, frecuencia cardíaca, calorías)

health_get_sleep

Duración, etapas, período de sueño

health_get_weight

Peso, % de grasa corporal

health_get_spo2

Saturación de oxígeno en sangre nocturna

health_get_hrv

Variabilidad de la frecuencia cardíaca (RMSSD)

health_get_azm

Minutos de zona activa, con el desglose por zona

health_get_breathing_rate

Respiraciones nocturnas por minuto

health_get_skin_temperature

Variación nocturna con respecto a tu valor basal, y los absolutos que hay detrás

health_get_core_temperature

Lecturas de temperatura corporal que registraste manualmente

health_get_cardio_fitness

VO2 máx, cuando el dispositivo lo notifica

health_get_food_log

Calorías de los alimentos y agua, cuando se registran

health_get_ecg

Electrocardiogramas: clasificación, frecuencia media, duración, forma de onda bajo petición

health_get_irregular_rhythm

Notificaciones de ritmo irregular y las ventanas que las provocaron

health_get_devices

Dispositivos emparejados, nivel de batería, última sincronización

health_get_lifetime_stats

Totales y mejores días del historial en caché, con su cobertura

health_trends

Promedios agregados y comparaciones de períodos

Requisitos

  • Python 3.13+ (probado en 3.13 y 3.14 en CI)

  • Una cuenta de Google con datos de salud y un proyecto de Google Cloud para autorizar. No se necesita cuenta de facturación: la consola ofrece una prueba gratuita durante toda la configuración y puedes rechazarla por completo.

Configuración

1. Instalación

pip install google-health-mcp

O ejecútalo sin instalarlo, en cuyo caso cada comando google-health-mcp ... que veas a continuación se convierte en uvx google-health-mcp ...:

uvx google-health-mcp --version

2. Crear el proyecto de Google Cloud

Cada usuario registra su propio cliente OAuth. Son siete pasos en la consola, y los nombres de las páginas son los de Google a fecha de agosto de 2026.

La página de configuración propia de Google te enviará a otro sitio: sigue los pasos a continuación. Su inicio rápido crea un cliente Web con https://www.google.com como URI de redirección, lo que se adapta al OAuth Playground más que a un programa que se ejecuta en tu máquina; este servidor rechaza ese archivo y así lo indica. Usa esa página solo para comprobar si alguna de las páginas siguientes ha cambiado de nombre.

  1. Proyecto. Crea un proyecto en console.cloud.google.com/projectcreate y selecciónalo.

  2. API. Habilita Google Health API en la página de habilitación de API.

  3. Comenzar. Abre Google Auth Platform y completa Comenzar: nombre de la aplicación, correo de soporte, audiencia Externa, correo de contacto. Un proyecto nuevo no tiene páginas de Audiencia, Acceso a datos o Clientes hasta que se hace esto.

  4. Audiencia. En Usuarios de prueba, añade tu propia cuenta de Google. Omitir esto hace que el inicio de sesión falle con 403: access_denied.

  5. Acceso a datos. Haz clic en Añadir o eliminar permisos, busca "Google Health API" y marca los permisos de solo lectura que se indican en Permisos de OAuth a continuación.

  6. Clientes. Crea un cliente OAuth de tipo Aplicación de escritorio y descarga su JSON. Un cliente de escritorio permite la redirección de bucle local automáticamente, por lo que no hay nada que registrar; un cliente web no lo hace y falla en el consentimiento.

  7. Publicar. Vuelve a la página de Audiencia y haz clic en Publicar aplicación.

El paso 7 es el que más duele, y merece la pena comprobarlo en lugar de asumirlo. Mientras el estado de publicación de una aplicación es "Probando", Google emite tokens de actualización que caducan siete días después del consentimiento, así que todo funciona y, una semana después, la sincronización se detiene sin que nada apunte a este momento. La página de Audiencia puede indicar "En producción" mientras que el servidor de tokens no está de acuerdo. Dos lecturas que no fallan: la línea de estado de verificación en la página de Marca, y google-health-mcp doctor, que falla de forma visible cuando el token almacenado registra una caducidad corta.

3. Autorizar

Coloca el JSON del cliente descargado donde el servidor lo busca, sin editar:

mkdir -p ~/.config/google-health-mcp
cp ~/Downloads/client_secret_*.json ~/.config/google-health-mcp/google_client.json
google-health-mcp auth

Tu navegador te advertirá de que Google no ha verificado esta aplicación. Es de esperar, y la aplicación es tuya: estos permisos de salud están clasificados como restringidos y la verificación solo importa por encima de 100 usuarios. Haz clic en Avanzado y luego en Ir a google-health-mcp (no seguro), y concede los permisos.

El flujo escucha en localhost:8081 la devolución de llamada, por lo que ese puerto debe estar libre. Guarda los tokens en ~/.config/google-health-mcp/google_tokens.json con permisos 0600. Los tokens de acceso duran una hora y se renuevan automáticamente. Los tokens de actualización no rotan, por lo que un token emitido en una máquina con navegador se puede copiar a una sin interfaz.

Si autorizaste antes de publicar la aplicación, vuelve a ejecutar google-health-mcp auth después: publicar no amplía un token ya concedido, y ese sigue caducando a los siete días.

4. Regístrate en tu cliente MCP

claude mcp add -s user google-health -- google-health-mcp

Ejecutarlo con uvx en su lugar: claude mcp add -s user google-health -- uvx google-health-mcp.

5. Compruébalo

google-health-mcp doctor

Merece la pena ejecutarlo antes y después del paso 3 (Autorizar): informa de si el puerto 8081 está libre y de si este equipo puede abrir un navegador, que son las dos formas en las que auth falla antes de empezar.

Sin conexión y de solo lectura: informa de qué rutas se resuelven dónde, si los archivos de credenciales tienen la forma correcta, si el token es de corta duración y si la caché se mantiene al día.

6. Primera sincronización (opcional)

Las herramientas de consulta se sincronizan en el primer uso de cada día, por lo que puedes omitir esto. Para precargar la caché o para extraer un historial más antiguo:

google-health-mcp sync --days 30
google-health-mcp sync --since 2023-10-01     # backfill

Uso de la CLI

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 files

Referencia de herramientas MCP

Las herramientas de consulta se sincronizan en la primera consulta de cada día por tipo de datos y luego leen la caché.

Todas las herramientas de consulta excepto health_get_devices y health_get_lifetime_stats, que no aceptan argumentos, aceptan:

  • start_date: AAAA-MM-DD, AAAA-MM o 30d (relativo). Por defecto: últimos 30 días.

  • end_date: AAAA-MM-DD. Por defecto: hoy.

  • live: si es verdadero, vuelve a obtener esta ventana de la API antes de leer la caché. Una actualización fallida se notifica en lugar de responderse silenciosamente desde la caché.

health_get_exercises también acepta exercise_type, una coincidencia de subcadena que no distingue entre mayúsculas y minúsculas en el nombre del entrenamiento. health_get_ecg también acepta include_waveform: una traza son miles de voltajes, por lo que la respuesta predeterminada incluye la clasificación, la frecuencia media, la duración y un recuento de muestras.

health_sync

  • data_types: all o un subconjunto separado por comas de los nombres que se indican en Uso de la CLI anterior (irn son las notificaciones de ritmo irregular). Por defecto: all.

  • days: días de historial para una primera sincronización (por defecto: 30). Las sincronizaciones posteriores son incrementales.

  • since / until: obtiene una ventana exacta independientemente de lo que haya en la caché.

health_trends

  • data_type: cualquier tipo en caché con una serie diaria; las lecturas de ECG y las alertas de ritmo son episodios y no tienen tendencia. Por defecto: activity.

  • period: weekly, monthly, quarterly. Por defecto: monthly.

  • start_date / end_date: por defecto, los últimos 12 meses.

  • compare: dos períodos, p. ej., last_30d vs previous_30d, 2026-03 vs 2026-02, 2026-Q1 vs 2025-Q4. Cuando se establece, se ignoran period, start_date y end_date.

Permisos de OAuth

Marca estos permisos de solo lectura en la página de Acceso a datos. Todos están en https://www.googleapis.com/auth/googlehealth.:

Permiso

Datos a los que se accede

activity_and_fitness.readonly

Pasos, distancia, plantas, calorías, entrenamientos, minutos de zona activa

health_metrics_and_measurements.readonly

Frecuencia cardíaca, VFC, SpO2, frecuencia respiratoria, peso, grasa corporal, temperatura, VO2 máx

sleep.readonly

Sesiones y etapas de sueño

nutrition.readonly

Registros de alimentos y agua

ecg.readonly

Electrocardiogramas

irn.readonly

Notificaciones de ritmo irregular

settings.readonly

Dispositivos emparejados

location.readonly y profile.readonly son dos que la consola ofrece y que este paquete solicita deliberadamente, porque nada de lo que hay aquí lee ninguna de las dos: la primera es la pista GPS que se registra durante un ejercicio.

Lee la lista de la consola, no de la página de permisos publicada: hay permisos de solo lectura que no aparecen ni en la documentación de Google ni en el propio documento de descubrimiento de la API, y el documento de descubrimiento omite nutrition.readonly por completo. Para solicitar menos, marca menos en la página de Acceso a datos y edita GOOGLE_SCOPES en config.py antes de autorizar, lo que requiere una copia del código fuente en lugar de una instalación con pip o uvx. Una concesión no gana permisos al renovarse, por lo que ampliar la lista más tarde significa ejecutar auth de nuevo.

Configuración

Variable

Por defecto

Descripción

GOOGLE_HEALTH_MCP_CONFIG_DIR

~/.config/google-health-mcp/

Directorio que contiene el cliente OAuth y los tokens

GOOGLE_HEALTH_MCP_DB_PATH

~/.local/share/google-health-mcp/google_health.db

Caché SQLite

GOOGLE_HEALTH_MCP_OFFLINE

unset

Si se evalúa como verdadero (1, true, yes, on), se ejecuta como lector de solo caché

Modo sin conexión / solo caché

Por defecto, el servidor sincroniza bajo demanda, por lo que no se necesita ninguna tarea cron. Establece GOOGLE_HEALTH_MCP_OFFLINE=1 para ejecutarlo como un lector puro en su lugar:

  • No se requieren credenciales: el servidor nunca abre el archivo de tokens.

  • No se realiza ninguna llamada de red. La sincronización automática está desactivada, y live=True, health_get_devices y health_sync devuelven un mensaje claro que indica "offline mode" en lugar de acceder a la API.

  • Las herramientas de consulta sirven los datos desde la caché, con la etiqueta "offline_mode": true.

Usos típicos:

  • Varias máquinas, una caché: un host ejecuta google-health-mcp sync desde cron o systemd contra una base de datos compartida; los demás definen GOOGLE_HEALTH_MCP_OFFLINE=1, apuntan GOOGLE_HEALTH_MCP_DB_PATH al mismo archivo y solo leen.

  • CI y privacidad: ejecuta consultas sin acceso a la red y sin credenciales.

Límites de peticiones

Google aplica una cuota de peticiones por usuario, documentada en developers.google.com/health/rate-limits. La sincronización normal no se acerca ni de lejos a esa cuota: la actualización de un día es un puñado de peticiones, y una carga retroactiva de tres años de todos los tipos de datos, medida en la práctica, rondó las 250. Si una sincronización se interrumpe, ese tipo de datos se registra como una sincronización parcial y la siguiente ejecución se reanuda desde su cursor en lugar de empezar de cero.

Consultar desde la caché, la opción predeterminada, no consume cuota alguna.

Seguridad de los datos

Tus datos de salud permanecen en tu máquina: este servidor no tiene backend, no envía nada a ningún sitio y solo se comunica con la API de Google con tus propias credenciales.

El repositorio incluye un hook de pre-commit que rechaza hacer commit de archivos de base de datos, cualquier cosa bajo config/, y archivos grandes; CONTRIBUTING.md explica cómo instalarlo.

Importación de datos existentes

Si ya tienes datos de salud como archivos JSON, procedentes de una exportación o de un script propio:

google-health-mcp import --data-dir /path/to/json/files/

Nombres de archivo esperados: heart_rate.json, activity.json, exercises.json, sleep.json, weight.json, spo2.json, hrv.json. Consulta src/google_health_mcp/importer.py para ver el formato que espera cada uno. La importación cubre esos siete tipos; todo lo demás llega mediante sync.

Contribuciones

Consulta CONTRIBUTING.md para la configuración de desarrollo, el flujo de trabajo de pruebas y el hook de pre-commit. Los cambios se registran en CHANGELOG.md.

Licencia

GPL-3.0-or-later

Available Tools

27 tools
health_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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 27 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness4/5

    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

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      A 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.
      26
      587 npm
      86
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Self-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