google-health-mcp-server
Provides tools for interacting with the Google Health API, enabling access to user profile and settings, paired devices, raw data points, source reconciliation, physical- and civil-time rollups, and exercise TCX export.
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-mcp-serverShow my daily step count and sleep data for the past week"
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.
google-health-mcp-server
A complete, open-source single tenant MCP server for the Google Health API v4 -- the OAuth-based successor to the Fitbit Web API. Every method reachable with just a user's own OAuth grant is exposed as a tool below, including profile/settings, paired devices, raw data points, source reconciliation, and both physical- and civil-time rollups.
Runs two ways:
Locally over stdio -- for Claude Desktop / Claude Code, zero hosting required.
Remotely over HTTP -- for claude.ai / Cowork connectors, deployable to Fly.io with the included Dockerfile.
View the full product and technical design here.
Tools
17 tools cover every non-Cloud-IAM method in the API. Full list with exact endpoint coverage: docs/tools.md.
Read | Write |
|
|
|
|
|
|
|
|
| |
| |
| |
|
Related MCP server: fitbit-google-health-mcp
One-time setup: getting a refresh token
This server acts on behalf of one Google account (yours). Before running it, you need an OAuth client and a refresh token for that account:
Follow Set up Google Cloud and OAuth to enable the Google Health API on a Google Cloud project and create a Web application OAuth 2.0 Client ID. Use
https://developers.google.com/oauthplaygroundas an authorized redirect URI if you plan to use the OAuth Playground for the next step (or run your own short local script).Add yourself as a test user for the OAuth consent screen, and add the scopes you want this instance to use (e.g.
.../auth/googlehealth.activity_and_fitness.readonly,.../auth/googlehealth.sleep.readonly).Using the OAuth 2.0 Playground (gear icon → "Use your own OAuth credentials" → paste your client ID/secret), authorize the scopes from step 2 against your Google account, then exchange the authorization code for tokens. Copy the refresh token it returns.
You now have the three values this server needs:
GOOGLE_HEALTH_CLIENT_ID,GOOGLE_HEALTH_CLIENT_SECRET,GOOGLE_HEALTH_REFRESH_TOKEN.
Note: while your OAuth consent screen is in Testing status, refresh tokens expire after 7 days and need to be re-minted. Publish the consent screen (or request verification) for a long-lived refresh token -- see Token behavior during testing.
Quick start (local, stdio)
Requires Node.js 20+.
npx google-health-mcp-serverPoint your MCP client (Claude Desktop, Claude Code, etc.) at it. For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"google-health": {
"command": "npx",
"args": ["google-health-mcp-server"],
"env": {
"GOOGLE_HEALTH_CLIENT_ID": "your-client-id",
"GOOGLE_HEALTH_CLIENT_SECRET": "your-client-secret",
"GOOGLE_HEALTH_REFRESH_TOKEN": "your-refresh-token",
"GOOGLE_HEALTH_READ_ONLY": "false"
}
}
}
}Configuration
Env var | Required | Default | Description |
| yes | -- | OAuth 2.0 client ID from your Google Cloud project. |
| yes | -- | OAuth 2.0 client secret paired with the client ID. Never logged, never echoed in tool output. |
| yes | -- | Refresh token for the one Google account this instance acts on behalf of. Never logged, never echoed in tool output. |
| no |
| When |
| no |
| Override for testing against a mock server. |
| no |
| Override for testing against a mock token endpoint. |
HTTP mode (below) needs three more: PORT, PUBLIC_URL, MCP_HTTP_PASSWORD. See .env.example for all of them with descriptions.
Remote (HTTP) deployment on Fly.io
The HTTP transport is gated by OAuth (required for claude.ai/Cowork connector approval). This is single-tenant OAuth, and it is a separate concern from the Google OAuth grant above: it just gates access to your instance behind one shared password, not per-user Google accounts. See docs/architecture.md for why and how.
Install flyctl and
fly auth login.fly launch --no-deployfrom this directory (it will readfly.toml; rename theappthere first if you want a specific subdomain).Set secrets (never put these in
fly.toml, which is committed to git):fly secrets set GOOGLE_HEALTH_CLIENT_ID=your-client-id fly secrets set GOOGLE_HEALTH_CLIENT_SECRET=your-client-secret fly secrets set GOOGLE_HEALTH_REFRESH_TOKEN=your-refresh-token fly secrets set MCP_HTTP_PASSWORD=choose-a-strong-passwordEdit
fly.toml'sPUBLIC_URLto match your actual*.fly.devhostname (or custom domain), then:fly deployIn claude.ai / Cowork, add a custom connector pointing at
https://<your-app>.fly.dev/mcp. You'll be redirected to a login page on your own instance -- enterMCP_HTTP_PASSWORDto approve the connection.
Notes:
Single
shared-cpu-1xmachine, no volume. Both the cached Google access token and the downstream OAuth session state (registered clients, tokens) live in memory and are lost on redeploy or restart -- you'll just need to reconnect the connector afterwards (the Google refresh token itself is unaffected; it's re-exchanged for a fresh access token automatically). Acceptable trade-off for a low-traffic personal instance; see the TDD.fly.toml's[http_service]is configured to stay always-on (not scaled to zero) for exactly that reason -- a stop/start cycle would otherwise force reconnection too.
Development
npm install
npm run dev:stdio # run src/stdio.ts directly with tsx
npm run dev:http # run src/http.ts directly with tsx
npm run typecheck
npm run lint # biome check
npm run lint:fix
npm test
npm run build # bundles dist/stdio.js and dist/http.js with tsupSee docs/architecture.md for the repo layout and request-flow details.
License
MIT -- see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Related MCP Connectors
Read wearables and lab health data — sleep, activity, workouts, timeseries, lab tests and orders.
- JotiOAuthcom.kompetic
Read your workouts, history, and stats; create and schedule new workouts. Writes are additive only.
- mcpOAuthcom.medplum
Securely access and manage FHIR healthcare data stored in Medplum.
Read and write patients, facilities, medical documents, and consolidated FHIR records in Metriport.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables access to Withings Health API data including body measurements, activity tracking, sleep analysis, workouts, and heart rate monitoring through OAuth2 authentication.81MIT
- AlicenseNot gradedqualityBmaintenanceRead-only MCP access to Fitbit-synced health data through Google Health API v4. Provides tools for metrics, summaries, trends, and data quality without write or arbitrary HTTP operations.MIT
- FlicenseNot gradedqualityBmaintenanceProvides read access to Garmin Connect health and training data (sleep, heart rate, stress, HRV, activities) and supports writes like creating workouts, editing activities, and exporting files.-
- AlicenseNot gradedqualityBmaintenanceSelf-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.2MIT
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/lukendatigh/google-health-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server