google-health-mcp-server
Retrieves health data from Apple Watch (steps, distance, heart rate, sleep, etc.) unified through Google Health.
Retrieves health data from Fitbit devices (steps, distance, heart rate, sleep, etc.) unified through Google Health.
Provides tools to read daily activity, sleep, heart rate, and body metrics from the Google Health API v4.
Syncs health data into an Obsidian vault as daily markdown notes and a rolling dashboard.
Click on "Deploy 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-server show me my daily activity summary for the last 3 days"
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
Hand your whole-body health data to your AI β steps, distance, heart rate, and more from Apple Watch, Fitbit, or Pixel Watch, unified through Google Health.
An MCP server for the Google Health API v4 β read your daily activity, sleep, heart rate, and body metrics from any source connected to Google Health (Apple Watch import, Fitbit Air, Pixel Watch, ...) in Claude or any MCP client, and optionally sync them into an Obsidian vault.
Self-hosted and local-first: it uses your own Google Cloud OAuth app, tokens are stored
on your machine at mode 0600, and no health data leaves your control.
Beta notice. The Google Health API v4 is new (public beta; legacy Fitbit Web API turns down September 2026). Field shapes may still shift. This server normalizes daily values best-effort and always returns the raw rollup points alongside, so nothing is lost if a field mapping in
src/constants.tsneeds a tweak against live data.
Tools
Tool | What it does |
| Per-day table of steps, distance, active calories, active minutes, resting HR, sleep over a date range (or trailing |
| Raw, un-rolled-up points for one dataType β intraday HR, sleep stages, or any type not in the summary. |
| Devices paired to the account β confirm a new device (e.g. Fitbit Air) has connected. |
| Health-check: token works? which scopes granted? which metrics actually return data over the last 7 days? Run this first after setup. |
| Daily markdown notes under |
Related MCP server: Google Health Fitbit MCP
One-time setup
1. Google Cloud project + API
Create or pick a project at https://console.cloud.google.com/.
Enable the Google Health API: https://console.cloud.google.com/apis/library/health.googleapis.com
2. OAuth consent screen
Go to APIs & Services β OAuth consent screen. User type External.
Fill in the app name and your email.
Under Audience β Test users, add your own Google account.
On the Data access page, add these scopes (search "Google Health"):
β¦/auth/googlehealth.profile.readonlyβ¦/auth/googlehealth.settings.readonlyβ¦/auth/googlehealth.activity_and_fitness.readonlyβ¦/auth/googlehealth.health_metrics_and_measurements.readonlyβ¦/auth/googlehealth.sleep.readonlyβ¦/auth/googlehealth.nutrition.readonly
β οΈ 7-day token caveat (and why you should stay in Testing). While the consent screen is in Testing status, Google issues refresh tokens that expire after 7 days. You might expect to fix this by publishing to Production β but the Google Health scopes are Google's Restricted tier, and Restricted scopes in Production require a full security verification (CASA assessment). There is no "click through the unverified warning" bypass for Restricted scopes (that bypass only exists for Sensitive scopes). Verification is impractical for a single-user personal tool, so the recommended setup is: keep the app in Testing, add yourself as a Test user, and accept the 7-day expiry. Re-authorize lazily β only when you actually use the data and a call reports the token has lapsed β by re-running
npm run oauth(a ~10s browser approve). Don't bother re-authing in weeks you don't touch the data.
3. OAuth credentials
APIs & Services β Credentials β Create credentials β OAuth client ID.
Application type: Web application.
Under Authorized redirect URIs, add exactly:
http://localhost:47813/callback(Must match
GOOGLE_HEALTH_OAUTH_PORT. Change both together if 47813 is taken.)Copy the Client ID and Client secret.
4. Configure + authorize
npm install
cp .env.example .env # then paste your client ID + secret into .env
npm run oauth # opens a browser; approve access. Tokens saved to
# ~/.config/google-health-mcp/tokens.json (mode 0600)
npm run buildVerify it works:
node dist/index.js # should print "Google Health MCP server running on stdio"β¦or call connection_status once registered in your MCP client.
Register in Claude
Add to ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude:
{
"mcpServers": {
"google-health": {
"command": "node",
"args": ["/Users/<you>/projects/google-health-mcp-server/dist/index.js"],
"env": {
"GOOGLE_HEALTH_TOKENS_PATH": "/Users/<you>/.config/google-health-mcp/tokens.json",
"OBSIDIAN_VAULT_PATH": "/Users/<you>/Documents/Obsidian Vault"
}
}
}
}The runtime reads the client ID/secret back from the tokens file, so they don't need to be
in the MCP env block β only the token path and (optionally) the vault path.
Obsidian sync (optional)
Interactive queries via the MCP tools are always live and pull on demand. The Obsidian notes +
dashboard only need a periodic refresh, so set OBSIDIAN_VAULT_PATH and either call
sync_health_to_obsidian from Claude or run the CLI:
npm run sync # incremental sync since last runFor an automated refresh, a launchd template is in launchd/. Copy it to
~/Library/LaunchAgents/, replace __USERNAME__, and
launchctl bootstrap gui/$(id -u) <plist>. It runs every 4 days (well under the 7-day
refresh-token expiry) and is best-effort: if the token has lapsed it logs a "re-auth needed"
note, fires a macOS notification, and exits cleanly (no crash-loop) β re-auth with
npm run oauth (~10s browser approve).
The 4-day cadence narrows staleness, it does not prevent expiry. The cron can only refresh the access token; the refresh token's 7-day Testing-mode cap is fixed by Google regardless of how often it runs, and getting a new refresh token requires the one-time interactive browser approval in
npm run oauthβ that step can't be scripted into a cron. What the cadence change buys you is a couple of chances per week to notice an expiry (via the notification) instead of going silent for up to a month.
Develop
npm run build # tsc --noCheck β dist/
npm run typecheck # strict type check (excludes tests)
npm test # vitest β pure logic (civil-date math, value extraction)
npm run dev # build + run the server on stdioSee CLAUDE.md for architecture notes and known pitfalls.
Available Tools
5 toolsconnection_statusCheck Connection StatusARead-only
Health-check the Google Health connection: confirms the OAuth token works, reports granted vs recommended scopes, and probes which metrics actually return data over the last 7 days. Run this first when setting up or after a new device syncs to confirm data is flowing.
Inputs: no named parameters.
get_daily_summaryGet Daily Health SummaryARead-only
Daily health metrics (steps, distance, active calories, active-zone minutes, floors, resting heart rate, and avg/max heart rate) across all connected Google Health sources (Apple Watch import, Fitbit Air, Pixel Watch). Returns a per-day table plus the raw points. Use start_date/end_date for an explicit range, or days (default 7) for a trailing window. Pass metrics to pick a subset. This is the primary tool for "how have my steps/HR/calories trended" questions.
Inputs: days, metrics, end_date, start_date.
list_data_pointsList Raw Health Data PointsARead-only
Fetch raw (un-rolled-up) data points for a single Google Health dataType β use when you need finer-than-daily granularity (e.g. intraday heart rate samples, individual sleep stages) or a dataType not covered by get_daily_summary. Accepts a friendly key (steps, sleep, heartRate, ...) or a raw API dataType string, plus an optional date range or raw filter. Prefer get_daily_summary for trend/summary questions β it is far cheaper.
Inputs: data_type (required), filter, max_pages, page_size.
list_paired_devicesList Paired DevicesARead-only
List devices paired to the Google Health account (e.g. Apple Watch import source, Fitbit Air, Pixel Watch) with manufacturer/model/type. Useful to confirm a new device has connected.
Inputs: no named parameters.
sync_health_to_obsidianSync Health to ObsidianA
Export daily health summaries to Obsidian as per-day markdown notes under {vault}/Lifestyle/Health/ (frontmatter: steps, distance_km, calories, active_minutes, resting_hr, sleep_hours for Dataview), and refresh {vault}/Lifestyle/Health-Dashboard.md with rolling 7/30-day aggregates. Runs incrementally from the last sync by default; set full_sync=true to re-render the whole window. Requires OBSIDIAN_VAULT_PATH to be set.
Inputs: days, end_date, full_sync, start_date.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Tools are mostly distinct: connection_status is a health-check, get_daily_summary and list_data_points differ by granularity and scope, but get_daily_summary also returns raw points, causing potential overlap. Descriptions help guide selection.
Naming is inconsistent: 'connection_status' uses noun_noun while others use verb_noun patterns (get_, list_, sync_). Mixed styles like 'daily_summary' and 'paired_devices' also break pattern.
Five tools are well-scoped for a Google Health MCP server: connection check, daily summary, raw data points, device listing, and Obsidian export. No redundancy or excess.
Covers core data retrieval and export, but lacks tools for updating or managing health data, which are less common in this domain. Minor gap in querying specific data types beyond the summary.
Maintenance
Related MCP Connectors
MCP server for Withings health data β sleep, activity, heart, and body metrics.
Hosted Apple Health MCP for Claude and ChatGPT, works outside the US. iPhone app, no local server.
Hosted Apple Health MCP: workouts, sleep and HRV in ChatGPT, Claude, Gemini, Grok. Free, no export.
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Related MCP Servers
- AlicenseBqualityBmaintenanceA 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.26875 npm84MIT
- AlicenseAqualityDmaintenanceAn MCP server that locally authenticates with Google Health API v4 and provides read-only access to Fitbit, Pixel Watch, and other health data for AI agents.29119 npm19MIT
- AlicenseNot gradedqualityDmaintenanceA personal MCP server on Cloudflare Workers that connects Claude to Google Health API v4, enabling reading of health data like activity, sleep, heart rate, SpOβ, HRV, and nutrition.MIT
- FlicenseNot gradedqualityDmaintenanceSelf-hosted MCP server that provides read-only access to Google Health API v4, enabling analysis of personal health data via OpenAI Responses API or ChatGPT.-