Google Health MCP Bridge
Provides read-only access to Google Health API v4 data, with tools for querying daily steps, sleep sessions, heart rate, HRV, exercises, and arbitrary health data types via custom filters.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Google Health MCP Bridge (Cloud Run Template)
A self-hosted, read-only Model Context Protocol (MCP) bridge that connects your Google Health API v4 data (Fitbit, Pixel Watch, and cloud-synced Google Health metrics) to Gemini (web and mobile) over Streamable HTTP—running on Google Cloud Run + Firestore within Google Cloud's Always Free tier ($0/month for personal use).
Architecture
Gemini (Web & Mobile)
│ Stateless Streamable HTTP + OAuth 2.0 Bearer Token
▼
Google Cloud Run (your-service.run.app)
├── FilterOAuthScopesMiddleware → strips client-internal scopes on /authorize
├── FastMCP GoogleProvider → handles MCP OAuth 2.0 proxy + Google sign-in
├── FirestoreStore (default) → persists OAuth client registrations & tokens across cold starts
└── Read-Only Health Tools → queries https://health.googleapis.com/v4/users/me/dataTypes/*Exposed MCP Tools
Tool | Google Health v4 Data Type | Default Window |
|
| Last 7 days (daily totals) |
|
| Last 7 days (sessions) |
|
| Last 3 days (daily min/max/avg BPM) |
|
| Last 14 days |
|
| Last 14 days |
| Any v4 | Custom filter |
Related MCP server: Google Health Broker
Prerequisites
A Google account with health data synced to Google Health (e.g., Fitbit / Pixel Watch). (Note: Android Health Connect is on-device only and does not expose a cloud API.)
A Google Cloud project with an active billing account (required for Cloud Run; stays $0/month under Always Free limits).
Step-by-Step Deployment
1. Select Your GCP Project & Enable APIs
export PROJECT_ID="YOUR_PROJECT_ID"
gcloud config set project "$PROJECT_ID"
gcloud services enable \
run.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com \
firestore.googleapis.comAlso enable Google Health API in the Google Cloud Console under APIs & Services → Library.
2. Create a Free-Tier Firestore Database (Persists Sessions Across Cold Starts)
gcloud firestore databases create \
--location=us-central1 \
--type=firestore-native
PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format="value(projectNumber)")
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com" \
--role="roles/datastore.user"3. Configure Google OAuth
Open Google Cloud Console → Google Auth Platform → Branding (or APIs & Services → OAuth consent screen) and fill in:
App name, User support email, Application home page, Privacy policy link, and Developer contact email.
Under Data Access / Scopes, add:
openidhttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonlyhttps://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonlyhttps://www.googleapis.com/auth/googlehealth.sleep.readonly
Under Audience, switch Publishing status from Testing to In production (personal apps under 100 users do not need public verification, and In production prevents Google's 7-day refresh token expiration).
Under Clients → Create Client → Web application, create an OAuth 2.0 Web Client and save your Client ID and Client Secret in a password manager.
4. Deploy to Cloud Run
Generate a stable signing key so tokens stay valid across container restarts:
JWT_SIGNING_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))")Deploy to us-central1 with scale-to-zero (--min-instances 0, --max-instances 1) to stay inside the Always Free tier:
gcloud run deploy google-health-mcp \
--source . \
--region us-central1 \
--allow-unauthenticated \
--min-instances 0 \
--max-instances 1 \
--memory 512Mi \
--set-env-vars "GOOGLE_CLIENT_ID=YOUR_CLIENT_ID,GOOGLE_CLIENT_SECRET=YOUR_CLIENT_SECRET,JWT_SIGNING_KEY=${JWT_SIGNING_KEY},BASE_URL=https://placeholder.run.app,ALLOWED_EMAIL=you@example.com,USE_FIRESTORE=true"Copy the Service URL printed by gcloud (e.g., https://google-health-mcp-xxxxx-uc.a.run.app), then update BASE_URL:
export SERVICE_URL="https://google-health-mcp-xxxxx-uc.a.run.app"
gcloud run services update google-health-mcp \
--region us-central1 \
--update-env-vars "BASE_URL=${SERVICE_URL}"5. Add the Authorized Redirect URI
Back in Google Cloud Console → Google Auth Platform → Clients → your OAuth Web Client, add this Authorized redirect URI:
https://google-health-mcp-xxxxx-uc.a.run.app/auth/callbackClick Save.
6. Connect to Gemini
Open gemini.google.com → Settings → Connected Apps → Add Custom MCP Connector (ensure Keep Activity is enabled).
Set:
Name:
Google HealthMCP Server URL:
https://google-health-mcp-xxxxx-uc.a.run.app/mcp
Complete the Google sign-in prompt (click Advanced → Go to … once if your app is unverified).
(Optional) In Gemini Settings → Saved info, add a rule telling Gemini to always use your
Google Healthconnected app whenever you ask about steps, sleep, heart rate, HRV, or workouts.
7. Recommended: Set a Monthly Budget Alert
BILLING_ACCOUNT=$(gcloud billing projects describe "$PROJECT_ID" --format="value(billingAccountName)" | cut -d/ -f2)
gcloud services enable billingbudgets.googleapis.com
gcloud billing budgets create \
--billing-account="$BILLING_ACCOUNT" \
--display-name="Health MCP Monthly Alert" \
--budget-amount=5USD \
--filter-projects="projects/${PROJECT_NUMBER}" \
--threshold-rule=percent=0.5 \
--threshold-rule=percent=0.8 \
--threshold-rule=percent=1.0 \
--threshold-rule=percent=1.0,basis=forecasted-spend(Replace 5USD with your billing account's currency code if different.)
Troubleshooting & Agent Instructions
See AGENTS.md for deployment tips, Google Health API v4 filter gotchas, and troubleshooting steps.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Apple Health MCP: workouts, sleep and HRV in ChatGPT, Claude, Gemini, Grok. Free, no export.
Your Google Health data (Fitbit, Pixel Watch): sleep, HRV, readiness and biological age.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Read wearables and lab health data — sleep, activity, workouts, timeseries, lab tests and orders.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to read Apple Health data through three tools: current stats, detailed metrics, and trends. Deployable to Cloudflare with a one-click phone setup, exposing only read-only access.MIT
- AlicenseNot gradedqualityCmaintenanceSelf-hosted multi-user Google Health OAuth broker and read-only Agent API with remote MCP support. Enables users to connect their Google account and grant agents secure access to activity, sleep, heart, HRV, SpO2, and other health metrics via revocable per-token authentication.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query personal health data collected by any wearable or phone fitness app through Android Health Connect or Apple Health, exposing read-only tools for metrics like heart rate, sleep stages, VO2 max, and body composition. It can run locally over USB with nothing stored, or be self-hosted on Cloudflare Workers with D1 to retain history beyond Health Connect's 30-day limit.20 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI apps to query a user's Google Health data—such as sleep, heart rate, HRV, activity, and paired devices—through read-only tools deployed privately in the user's own Firebase project.1AGPL 3.0