Google Health Fitbit MCP
This MCP server enables AI agents to query your Google Health API data—from Fitbit trackers, Pixel Watch, and connected partner sources—through a local OAuth flow. All processing and token storage happen on your machine (with strict 0600 permissions), credentials never leave your device, and GPS/route data is redacted by default. All shipped data tools are read-only; write/destructive operations are explicitly gated.
Setup & Authentication
Check connection status, config, token, and scope readiness without calling Google APIs
Generate OAuth URLs, exchange authorization codes, and revoke access
Run a guided quickstart walkthrough
User & Device Data
Retrieve your identity, profile, settings (units, timezone), and paired devices
Check irregular rhythm / AFib notification status
Health Data Queries
Query intraday data points across 39 supported types (steps, sleep, heart rate, calories, weight, blood glucose, ECG, etc.)
Fetch a specific data point by ID
Reconcile deduplicated data streams across all sources
Get civil-day aggregates (daily rollup) or custom time-window aggregates (physical-time rollup)
Summaries & Wellness Context
Daily summary — steps, distance, calories, active-zone minutes, sleep, resting HR, HRV, weight with data-quality flags
Weekly summary — scorecard with optional prior-window comparison, load classification, and bottlenecks
Wellness context — normalized activity/sleep shape for recommendation engines
Discovery & Metadata
Browse the data inventory, list all 39 data types with units/scopes/verbs, and build coverage plans or run live coverage checks
Access an agent manifest, capabilities overview, and realistic synthetic demo payloads
Privacy & Diagnostics
Run a privacy audit reviewing local posture, cache settings, and token paths without exposing secrets
Check optional SQLite response cache stats
Local Wellness Profile
Read and update a local wellness profile (goals, devices, training/nutrition preferences, safety flags)
Access an 11-question onboarding flow to guide initial setup
Allows querying Google Health API v4 data from Fitbit devices, including steps, sleep, heart rate, and other health metrics, with OAuth authentication.
Provides access to Google Health API v4 for retrieving health data from various sources, including Fitbit and Pixel Watch, with OAuth authentication and local token storage.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Health Fitbit MCPShow me my step count from today."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
An MCP server that runs locally and hands your AI agent your own Google Health API data — from Fitbit trackers, Pixel Watch and supported partner sources — through OAuth.
Install in one command —
npx -y google-health-fitbit-mcp setupRun it in Claude Desktop · Claude Code · Cursor · Windsurf · Hermes · OpenClaw — see client examples.
On your machine — OAuth tokens are stored locally with
0600permissions and are never returned by any tool (privacy).Read-only by default — every shipped data tool is a read. Writes are a gated, opt-in, dry-run-first design that is not enabled.
Beta status: Google Health API is available to developers but the surface is still moving. Because Google's release notes keep listing scope and data-type changes after launch, this connector remains in beta and steers testers toward safe read-only validation before any production use.
Independent, community-built connector — no affiliation with, endorsement from or support by Google, Fitbit or Alphabet. Not a medical device or medical advice; treat the data as trend context only.
⚡ Quick Connect
Prerequisite: a Google Cloud OAuth client (type: Desktop) with the Google Health API enabled and the redirect
http://127.0.0.1:3000/callbackregistered — details in Install.
Step 1 — Install & authorize (once):
npx -y google-health-fitbit-mcp setup # guided: Google Cloud OAuth client + scopes
npx -y google-health-fitbit-mcp auth # browser OAuth — tokens stay on your machine
npx -y google-health-fitbit-mcp checkup # ✓ verifies everything is readysetup asks for a Client ID and Client Secret. You create these once, for free, in Google Cloud:
New project — open console.cloud.google.com/projectcreate, name it (e.g.
health-mcp), click Create, then select it.Enable the API — open the Google Health API page and click Enable.
Consent screen — go to OAuth consent screen, choose External, and fill in the required app name / email fields. Under Test users, add your own Google account — skip this and sign-in fails with
403: access_denied.Create the client — go to Credentials → + Create credentials → OAuth client ID → Application type: Desktop app → Create.
Copy the Client ID (ends in
…apps.googleusercontent.com) and the Client secret, then paste each one whensetupprompts you.
Redirect URI: Desktop-app clients allow the
http://127.0.0.1:3000/callbackloopback automatically — you don't register it anywhere. Just press Enter to accept the default whensetupasks. For every othersetupprompt (scope preset, privacy mode), pressing Enter picks a sensible default.
Heads-up — the 7-day rule: while the consent screen sits in Testing publishing status, Google revokes refresh tokens after 7 days. Around once a week the next request fails with
invalid_grant, which is normal and not a bug in this server. It reopens the consent flow for you (see Staying connected); approving takes a couple of seconds. Publishing the app removes the expiry entirely — check what your scopes require on the consent screen before switching.
Step 2 — Connect your app:
claude mcp add google-health -- npx -y google-health-fitbit-mcpSettings → Developer → Edit Config, then add to claude_desktop_config.json:
{
"mcpServers": {
"google_health": {
"command": "npx",
"args": ["-y", "google-health-fitbit-mcp"]
}
}
}Restart Claude Desktop — the tools appear under the 🔌 connectors menu.
Add the same mcpServers block to .cursor/mcp.json (per-project) or ~/.cursor/mcp.json (global), or use Settings → MCP → Add new server.
{
"mcpServers": {
"google_health": {
"command": "npx",
"args": ["-y", "google-health-fitbit-mcp"]
}
}
}Add the same mcpServers block to ~/.codeium/windsurf/mcp_config.json.
npx -y google-health-fitbit-mcp setup --client hermes # writes the Hermes config for youThen reload with /reload-mcp or hermes mcp test google_health.
Step 3 — Test it. Ask your agent:
Run google_health_connection_status and tell me if I'm connected.Related MCP server: Fitbit MCP
Why this exists
The Google Health API is the successor to the Fitbit Web API: new OAuth, new base URL (https://health.googleapis.com), a streamlined endpoint schema, standardized kebab-case data types, reconciled cross-source streams and daily/physical-time rollups.
It gives agents a clean path to explore the API, verify their setup, sign in locally and pull data — with no need to paste tokens into prompts or agent configs.
Try it with your agent
Three good opening prompts, built around tools this connector genuinely ships:
Check my setup with google_health_connection_status, then call
google_health_data_inventory and tell me which Google Health
domains and scopes I've granted.Pull today's google_health_daily_summary, then google_health_weekly_summary.
Keep observed data separate from any suggestions, and stay non-medical.List my paired devices with google_health_list_paired_devices and tell me
which device is producing my sleep and heart-rate data.Tools
29 tools, all read-only except the two explicitly gated local-profile/auth actions noted below.
Start here
Tool | What it does |
| Local config, token, scope and MCP-client readiness — no Google call |
| Personalized 3-step setup walkthrough that adapts to your current state |
| Supported domains, scopes, data-type naming and recommended agent flow |
| The 39 kebab-case data-type slugs with units, scopes and supported verbs |
| Realistic synthetic payloads so agents see the contract before real calls |
Data reads (Google Health API)
Tool | Endpoint |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Summaries & wellness context
Tool | What it does |
| Steps, distance, calories, active-zone minutes, sleep, resting HR, HRV and weight for one day, with data-quality flags |
| Weekly scorecard with optional prior-window comparison, load classification and bottlenecks |
| Normalized activity/sleep context for recommendation engines |
Auth, diagnostics & metadata
google_health_get_auth_url · google_health_exchange_code (gated: requires explicit user intent) · google_health_revoke_access (gated + destructive: disconnects Google Health) · google_health_privacy_audit · google_health_cache_status · google_health_data_type_coverage · google_health_capabilities · google_health_agent_manifest · google_health_onboarding · google_health_profile_get · google_health_profile_update (local file only, requires explicit_user_intent=true)
Resources & prompts
MCP resources: google-health://agent-manifest, google-health://capabilities, google-health://inventory, google-health://latest/steps, google-health://profile, google-health://summary/daily, google-health://summary/weekly.
MCP prompts: google_health_daily_checkin, google_health_weekly_review, google_health_data_type_investigation.
Data types
39 data types from the official Google Health table, including steps, sleep, heart-rate, heart-rate-variability, daily-resting-heart-rate, active-zone-minutes, distance, total-calories, weight, body-fat, blood-glucose, oxygen-saturation, vo2-max, electrocardiogram, irregular-rhythm-notification, exercise, floors, swim-lengths-data, nutrition-log and hydration-log.
Naming rules agents need:
Endpoints use kebab-case data types:
steps,daily-resting-heart-rate.Filters use snake_case field paths:
sleep.interval.civil_start_time,heart_rate.sample_time.physical_time.Source families:
all-sources,google-wearables,google-sources.
Call google_health_list_data_types for the full catalog with units, scopes and which verbs (list/reconcile/rollup) each type supports.
Privacy & what runs offline
OAuth tokens live on disk at
~/.google-health-mcp/tokens.json, locked down to0600permissions.Client secrets go in
~/.google-health-mcp/config.jsonor theGOOGLE_HEALTH_*environment variables.No tool ever hands back an access token, refresh token or client secret; error output is redacted too.
The default privacy mode is
GOOGLE_HEALTH_PRIVACY_MODE=structured;summarystrips identifiers further, andrawis an explicit opt-in for debugging.GPS/route data is treated as sensitive and redacted unless explicitly requested.
supportprints a copy-paste support bundle for GitHub issues — always redacted, never contains tokens, secrets, local paths or health measurements.support --feedback --jsonprints an anonymous setup-feedback bundle for beta testers (guide).coverage --live --jsonprints only redacted data-type status and point-count buckets — never raw Google Health payloads (guide).
Install
Set up a Google Cloud OAuth client (type: Desktop), turn on the Google Health API, and register the local redirect:
http://127.0.0.1:3000/callbackThen run:
npx -y google-health-fitbit-mcp setup --scope-preset full
npx -y google-health-fitbit-mcp auth
npx -y google-health-fitbit-mcp checkupScope presets
Presets keep OAuth consent easy to reason about — request only what your use case needs:
Preset | Grants |
| profile + settings |
| basic + activity/fitness + health metrics |
| basic + sleep |
| basic + health metrics + ECG + irregular-rhythm notifications |
| all recommended read-only scopes (default) |
| opt-in nutrition write scope — the only preset with any write capability; no write tool ships yet |
Advanced users can pass --scopes with an explicit space/comma-separated scope list.
If setup gets stuck
npx -y google-health-fitbit-mcp checkup --fix # repairs local config/token permissions (chmod 600 where supported)
npx -y google-health-fitbit-mcp checkup --live # hits read-only identity/profile/settings endpoints to confirm the API responds
npx -y google-health-fitbit-mcp coverage --live --json # redacted read-only data-type coverage report
npx -y google-health-fitbit-mcp support # shareable support bundle, stripped of tokens/secrets/measurements
npx -y google-health-fitbit-mcp support --feedback --json # anonymous setup feedback bundleStaying connected
Access tokens refresh silently in the background. The refresh token behind them is what expires — Google revokes it after 7 days while the consent screen is in Testing publishing status, and the next call comes back as invalid_grant. Retrying cannot fix that: the grant is gone, and only a fresh authorization brings it back.
So the server does the authorization for you. On the first call that hits a revoked grant it opens your browser at Google's consent screen; approve, and the original request finishes on its own — no command to run, nothing to diagnose. If you take longer than GOOGLE_HEALTH_REAUTH_WAIT_MS (45s by default), the call returns the URL instead and the listener stays up, so approving still works and the next request goes through.
This only runs on the local stdio transport, where the browser and the server are on the same machine. Under the HTTP transport — where the server may be remote, and its default port collides with the loopback redirect — the call fails with an explicit instruction to run auth instead. Set GOOGLE_HEALTH_AUTO_REAUTH=0 to always handle re-authorization yourself, or GOOGLE_HEALTH_AUTH_NO_BROWSER=1 on headless hosts to get the URL without a browser launch.
MCP client config
Claude Desktop / Cursor / Windsurf (see examples/):
{
"mcpServers": {
"google_health": {
"command": "npx",
"args": ["-y", "google-health-fitbit-mcp"]
}
}
}Hermes
npx -y google-health-fitbit-mcp setup --client hermes --no-auth
npx -y google-health-fitbit-mcp auth
npx -y google-health-fitbit-mcp checkup --client hermesOnce the config changes, run /reload-mcp or hermes mcp test google_health — there's no need to restart the gateway just to read data.
HTTP transport (optional)
The default transport is stdio. A local Streamable-HTTP transport is available for clients that need it:
npx -y google-health-fitbit-mcp --http # serves http://127.0.0.1:3000/mcp (+ /health)Configuration
Environment variable | Purpose | Default |
| Google Cloud OAuth client ID | — (or local config) |
| OAuth client secret (prefer local config over MCP client config) | — (or local config) |
| Registered redirect URI | — (or local config) |
| Token file location |
|
|
|
|
| Optional SQLite response cache ( | disabled |
| SQLite cache location |
|
| Bypass the in-memory HTTP cache (60s TTL, GET-only) | unset |
|
|
|
| HTTP transport bind address |
|
| Reopen the consent flow automatically when the grant is revoked ( | enabled |
| How long a tool call waits for you to approve before returning the URL instead |
|
| Never launch a browser; print/return the URL only (headless hosts) | unset |
Reliability built in: every Google call goes through retry middleware (exponential backoff + jitter, honors Retry-After, retries 408/429/5xx) and a 60-second GET-only response cache. Multi-day summaries limit request concurrency to stay under rate limits.
CLI commands
All commands run via npx -y google-health-fitbit-mcp <command> (installed binary: google-health-fitbit-mcp-server).
Command | What it does | Key flags |
(none) | Start the MCP server on stdio |
|
| Guided setup: writes local config + MCP client config |
|
| Browser OAuth with local callback; saves tokens with |
|
| Setup diagnosis with ✓/✗ checks and next steps (aliases: |
|
| Data-type coverage report across list/reconcile/rollup |
|
| Redacted support bundle for GitHub issues |
|
| Shared wellness onboarding flow as JSON |
|
| Print version / full usage |
Beta testers wanted
Right now the most valuable thing you can contribute is hands-on setup feedback from real Fitbit, Pixel Watch, Android and Google Health API accounts.
If you have a real account to test with:
Run
npx -y google-health-fitbit-mcp checkupand let us know whether the OAuth flow reads clearly.Run
npx -y google-health-fitbit-mcp support --feedback --jsonand drop the anonymous bundle into a GitHub issue.Once OAuth is done, run
npx -y google-health-fitbit-mcp coverage --live --jsonand post the redacted coverage report after you've reviewed it.Exercise
google_health_connection_status,google_health_data_inventoryandgoogle_health_daily_summaryfrom inside your MCP client.File an issue if you hit missing data types, unclear setup steps, client-specific friction or privacy concerns.
Please keep OAuth tokens, client secrets, local paths and personal health measurements out of public issues.
Development
git clone https://github.com/BerkKilicoglu/google-health-fitbit-mcp.git
cd google-health-fitbit-mcp
npm install
npm testnpm test runs typecheck, build, MCP smoke tests (stdio + HTTP), summary fixtures, privacy/cache/retry suites, CLI UX checks and metadata validation. See CONTRIBUTING.md for guidelines and SECURITY.md for the security policy.
Links
Google Health API: https://developers.google.com/health
Release notes: https://developers.google.com/health/release-notes
REST reference: https://developers.google.com/health/reference/rest
Data types: https://developers.google.com/health/data-types
Migration guide (Fitbit → Google Health): https://developers.google.com/health/migration
Contact & support
🐛 Bug reports / feature requests — GitHub Issues
📨 klcogluberk@gmail.com — general questions and integration help
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceA 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.Last updated261,27136MIT
- AlicenseBqualityAmaintenanceLocal-first MCP server that connects AI agents to your Fitbit activity, sleep, heart-rate, HRV, SpO2 and weight data.Last updated328321MIT
- AlicenseAqualityBmaintenanceMCP 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.Last updated5MIT
- Alicense-qualityBmaintenanceAn MCP server that connects AI clients to the Google Health API, enabling natural language queries about health and fitness data such as steps, sleep, heart rate, and exercise sessions.Last updated684MIT
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Hosted MCP server exposing US hospital procedure cost data to AI assistants
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BerkKilicoglu/google-health-fitbit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server