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

Google Health API용 MCP 서버로, 로컬 SQLite 캐시와 추세 분석을 제공합니다.

Claude Code 및 기타 MCP 클라이언트를 위해 설계되었습니다. 데이터는 사용자 머신의 데이터베이스에 동기화되므로 쿼리가 빠르고, 오프라인에서도 작동하며, API 할당량을 소모하지 않습니다.

기능

  • 로컬 SQLite 캐시 - 한 번 동기화하고 즉시 쿼리

  • 증분 동기화 - 실행할 때마다 마지막으로 중단된 지점부터 새 항목만 가져옵니다.

  • 오프라인 모드 - 자격 증명이나 네트워크 없이 캐시 제공

  • 추세 - 주간, 월간, 분기별 집계 및 두 기간 비교

  • ECG - 판독값 전체(파형 포함)를 저장하며, 요청 시에만 반환

  • doctor - 할당량을 소모하지 않고 오프라인 및 읽기 전용으로 설정을 진단

Related MCP server: google-health-mcp-server

데이터 유형

도구

데이터

health_get_heart_rate

안정 시 심박수

health_get_activity

걸음 수, 칼로리, 거리, 층수

health_get_exercises

운동 (이름, 시간, 심박수, 칼로리)

health_get_sleep

수면 시간, 단계, 수면 주기

health_get_weight

체중, 체지방률

health_get_spo2

야간 혈중 산소 포화도

health_get_hrv

심박 변이도 (RMSSD)

health_get_azm

활성 영역 시간(구간별 세부 내역 포함)

health_get_breathing_rate

야간 분당 호흡수

health_get_skin_temperature

기준 대비 야간 변동 및 그 배경이 되는 절대 수치

health_get_core_temperature

직접 기록한 체온 측정값

health_get_cardio_fitness

기기가 보고하는 VO2 최대치

health_get_food_log

기록된 음식 칼로리와 수분 섭취량

health_get_ecg

심전도: 분류, 평균 심박수, 지속 시간, 요청 시 파형

health_get_irregular_rhythm

부정맥 알림 및 이를 유발한 시간대

health_get_devices

페어링된 기기, 배터리 잔량, 마지막 동기화

health_get_lifetime_stats

캐시된 기록의 총계와 최고 기록일 및 적용 범위

health_trends

집계 평균 및 기간 비교

요구 사항

  • Python 3.13+ (CI에서 3.13 및 3.14로 테스트됨)

  • 건강 데이터가 있는 Google 계정과 인증에 사용할 Google Cloud 프로젝트가 필요합니다. 결제 계정은 필요 없습니다 - 콘솔에서 설정 내내 무료 평가판을 제안하지만 모두 거부할 수 있습니다.

설정

1. 설치

pip install google-health-mcp

또는 설치하지 않고 실행할 수 있습니다. 이 경우 아래에서 실행하는 모든 google-health-mcp ... 명령은 uvx google-health-mcp ...가 됩니다.

uvx google-health-mcp --version

2. Google Cloud 프로젝트 만들기

각 사용자는 자신의 OAuth 클라이언트를 등록합니다. 콘솔에서 7단계로 진행되며, 페이지 이름은 2026년 8월 기준 Google의 이름입니다.

Google의 설정 페이지는 다른 곳으로 안내할 수 있으니 아래 단계를 따르세요. Google의 빠른 시작은 https://www.google.com을 리디렉션 URI로 사용하는 웹 클라이언트를 생성하는데, 이는 사용자 머신에서 실행되는 프로그램보다 OAuth Playground에 적합합니다. 이 서버는 해당 파일을 거부하며 그 이유를 알려줍니다. 해당 페이지는 아래 페이지 중 하나의 이름이 변경되었는지 확인하는 용도로만 사용하세요.

  1. 프로젝트. console.cloud.google.com/projectcreate에서 프로젝트를 만들고 선택합니다.

  2. API. API 사용 설정 페이지에서 Google Health API를 사용 설정합니다.

  3. 시작하기. Google Auth Platform을 열고 시작하기를 완료합니다 - 앱 이름, 지원 이메일, 외부 사용자 유형, 연락처 이메일. 이 작업을 완료하기 전까지 새 프로젝트에는 Audience, Data Access 또는 Clients 페이지가 없습니다.

  4. 사용자. 테스트 사용자에서 본인의 Google 계정을 추가합니다. 이 단계를 건너뛰면 403: access_denied 오류로 로그인에 실패합니다.

  5. 데이터 액세스. 범위 추가 또는 삭제를 클릭하고 "Google Health API"를 검색한 후 아래 OAuth 범위에 나열된 읽기 전용 범위를 선택합니다.

  6. 클라이언트. 데스크톱 앱 유형의 OAuth 클라이언트를 만들고 해당 JSON을 다운로드합니다. 데스크톱 클라이언트는 루프백 리디렉션을 자동으로 허용하므로 등록할 항목이 없습니다. 웹 클라이언트는 그렇지 않으며 동의 단계에서 실패합니다.

  7. 게시. Audience 페이지로 돌아가 앱 게시를 클릭합니다.

가장 골치 아픈 단계는 7단계이므로, 추측하지 말고 확인해 볼 가치가 있습니다. 앱의 게시 상태가 테스트 중인 동안 Google은 동의 후 7일이 지나면 만료되는 리프레시 토큰을 발급합니다. 따라서 모든 것이 정상 작동하다가 일주일 후 동기화가 중단되며, 그 원인을 알 수 없습니다. Audience 페이지에는 "프로덕션"으로 표시되어도 토큰 서버는 다를 수 있습니다. 브랜딩 페이지의 확인 상태 줄과 google-health-mcp doctor는 다릅니다. 후자는 저장된 토큰의 만료 기간이 짧을 때 오류를 명확히 표시합니다.

3. 인증

다운로드한 클라이언트 JSON을 편집하지 말고 서버가 찾는 위치에 넣습니다:

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

브라우저에 이 앱은 Google에서 인증되지 않았습니다라는 경고가 표시됩니다. 이는 정상이며, 이 앱은 사용자 본인의 앱입니다. 이러한 건강 범위는 제한적으로 분류되며, 인증은 사용자 100명 이상일 때만 중요합니다. 고급을 클릭한 다음 google-health-mcp(안전하지 않음)(으)로 이동을 클릭하고 범위를 승인합니다.

이 플로우는 localhost:8081에서 콜백을 수신하므로 해당 포트가 비어 있어야 합니다. 토큰은 0600 권한으로 ~/.config/google-health-mcp/google_tokens.json에 저장됩니다. 액세스 토큰은 1시간 동안 유효하며 자동으로 갱신됩니다. 리프레시 토큰은 회전하지 않으므로 브라우저가 있는 머신에서 생성된 토큰을 헤드리스 머신에 복사할 수 있습니다.

앱을 게시하기 전에 인증한 경우 나중에 google-health-mcp auth를 다시 실행하세요. 게시해도 이미 발급된 토큰이 연장되지는 않으며, 해당 토큰은 여전히 7일 후에 만료됩니다.

4. MCP 클라이언트에 등록

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

대신 uvx로 실행: claude mcp add -s user google-health -- uvx google-health-mcp.

5. 확인

google-health-mcp doctor

3단계(인증) 전후로 실행해 볼 만합니다. 포트 8081이 비어 있는지, 이 호스트에서 브라우저를 열 수 있는지 보고합니다. 이는 auth가 시작되기 전에 실패하는 두 가지 경우입니다.

오프라인 및 읽기 전용: 어떤 경로가 어디서 확인되었는지, 자격 증명 파일의 형식이 올바른지, 토큰이 단기인지, 캐시가 최신 상태로 유지되고 있는지 보고합니다.

6. 첫 번째 동기화(선택 사항)

쿼리 도구는 매일 첫 사용 시 동기화되므로 건너뛸 수 있습니다. 캐시를 미리 채우거나 더 오래된 기록을 가져오려면:

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

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

MCP 도구 참조

쿼리 도구는 데이터 유형별로 매일 첫 번째 쿼리에서 동기화한 후 캐시를 읽습니다.

인수를 사용하지 않는 health_get_devices 및 health_get_lifetime_stats를 제외한 모든 쿼리 도구는 다음을 허용합니다:

  • start_date - YYYY-MM-DD, YYYY-MM 또는 30d(상대적). 기본값: 최근 30일.

  • end_date - YYYY-MM-DD. 기본값: 오늘.

  • live - true이면 캐시를 읽기 전에 API에서 이 기간을 다시 가져옵니다. 새로 고침 실패는 캐시에서 자동으로 응답하지 않고 보고됩니다.

health_get_exercises는 운동 이름에 대해 대소문자를 구분하지 않는 부분 문자열 일치인 exercise_type도 사용합니다. health_get_ecg는 include_waveform도 사용합니다. 추적에는 수천 개의 전압이 포함되므로 기본 응답에는 분류, 평균 심박수, 지속 시간 및 샘플 수가 대신 포함됩니다.

health_sync

  • data_types - all 또는 위의 CLI 사용법에 나열된 이름의 쉼표로 구분된 하위 집합(irn은 부정맥 알림). 기본값: all.

  • days - 첫 번째 동기화의 기록 일수(기본값: 30). 이후 동기화는 증분입니다.

  • since / until - 캐시된 내용과 관계없이 정확한 기간을 가져옵니다.

health_trends

  • data_type - 일일 계열이 있는 모든 캐시된 유형. ECG 판독값과 리듬 알림은 에피소드이므로 추세가 없습니다. 기본값: activity.

  • period - weekly, monthly, quarterly. 기본값: monthly.

  • start_date / end_date - 기본값: 최근 12개월.

  • compare - 두 기간(예: last_30d vs previous_30d, 2026-03 vs 2026-02, 2026-Q1 vs 2025-Q4). 설정하면 period, start_date 및 end_date는 무시됩니다.

OAuth 범위

데이터 액세스 페이지에서 다음 읽기 전용 범위를 선택합니다. 모두 https://www.googleapis.com/auth/googlehealth. 아래에 있습니다:

범위

액세스 데이터

activity_and_fitness.readonly

걸음 수, 거리, 층수, 칼로리, 운동, 활성 영역 시간

health_metrics_and_measurements.readonly

심박수, HRV, SpO2, 호흡수, 체중, 체지방, 체온, VO2 최대치

sleep.readonly

수면 세션 및 단계

nutrition.readonly

음식 및 수분 기록

ecg.readonly

심전도

irn.readonly

부정맥 알림

settings.readonly

페어링된 기기

location.readonly 및 profile.readonly는 콘솔에서 제공하지만 이 패키지에서 의도적으로 요청하지 않는 두 가지입니다. 여기서는 둘 다 읽지 않기 때문입니다. 전자는 운동 중 기록된 GPS 추적입니다.

게시된 범위 페이지가 아닌 콘솔에서 목록을 읽으세요 - Google 문서나 API의 검색 문서에도 없는 읽기 전용 범위가 있으며, 검색 문서에는 nutrition.readonly가 아예 없습니다. 더 적게 요청하려면 데이터 액세스 페이지에서 더 적게 선택하고 인증 전에 config.py의 GOOGLE_SCOPES를 편집하세요. 이 경우 pip 또는 uvx 설치가 아닌 소스 체크아웃이 필요합니다. 권한 부여는 새로 고침 시 범위를 획득하지 않으므로 나중에 목록을 확장하려면 auth를 다시 실행해야 합니다.

구성

변수

기본값

설명

GOOGLE_HEALTH_MCP_CONFIG_DIR

~/.config/google-health-mcp/

OAuth 클라이언트와 토큰을 보관하는 디렉터리

GOOGLE_HEALTH_MCP_DB_PATH

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

SQLite 캐시

GOOGLE_HEALTH_MCP_OFFLINE

미설정

truthy(1, true, yes, on) 값이면 캐시 전용 읽기 모드로 실행

오프라인 / 캐시 전용 모드

기본적으로 서버는 요청 시 동기화하므로 cron 작업이 필요 없습니다. 대신 순수 읽기 전용으로 실행하려면 GOOGLE_HEALTH_MCP_OFFLINE=1을 설정하세요:

  • 자격 증명이 필요 없습니다. 서버는 토큰 파일을 열지 않습니다.

  • 네트워크 호출이 이루어지지 않습니다. 자동 동기화가 꺼져 있으며, live=True, health_get_devices, health_sync는 API에 접근하는 대신 명확한 "offline mode" 메시지를 반환합니다.

  • 쿼리 도구는 캐시를 제공하며 "offline_mode": true로 표시됩니다.

일반적인 사용 사례:

  • 여러 머신, 하나의 캐시 - 한 호스트가 공유 데이터베이스에 대해 cron 또는 systemd에서 google-health-mcp sync를 실행하고, 나머지 머신은 GOOGLE_HEALTH_MCP_OFFLINE=1을 설정하고 GOOGLE_HEALTH_MCP_DB_PATH를 같은 파일로 지정한 뒤 읽기만 합니다.

  • CI 및 개인정보 보호 - 네트워크 접근과 자격 증명 없이 쿼리를 실행합니다.

속도 제한

Google은 developers.google.com/health/rate-limits에 문서화된 사용자별 요청 할당량을 적용합니다. 일반적인 동기화는 그에 한참 못 미칩니다. 하루 업데이트는 몇 건의 요청에 불과하며, 측정된 3년치 전체 데이터 유형 백필(backfill)은 약 250건이었습니다. 동기화가 중단되면 해당 데이터 유형은 부분 동기화로 기록되고 다음 실행은 처음부터 다시 시작하는 대신 커서(cursor)에서 재개됩니다.

기본값인 캐시에서의 쿼리는 할당량을 전혀 소모하지 않습니다.

데이터 안전

건강 데이터는 사용자 머신에만 남습니다. 이 서버에는 백엔드가 없고, 어디로도 아무것도 보내지 않으며, 사용자 자신의 자격 증명으로 Google API에만 통신합니다.

저장소에는 데이터베이스 파일, config/ 아래의 모든 항목, 그리고 대용량 파일의 커밋을 거부하는 pre-commit 훅이 포함되어 있습니다. 설치 방법은 CONTRIBUTING.md에 나와 있습니다.

기존 데이터 가져오기

내보내기나 직접 작성한 스크립트에서 얻은 JSON 파일 형태의 건강 데이터가 이미 있다면:

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

예상 파일 이름: heart_rate.json, activity.json, exercises.json, sleep.json, weight.json, spo2.json, hrv.json. 각 파일이 기대하는 형식은 src/google_health_mcp/importer.py를 참조하세요. 가져오기는 이 일곱 가지 유형을 다루며, 그 외의 모든 것은 sync로 가져옵니다.

기여

개발 환경 설정, 테스트 워크플로, pre-commit 훅은 CONTRIBUTING.md를 참조하세요. 변경 사항은 CHANGELOG.md에서 추적됩니다.

라이선스

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