fitbit-mcp
Deploys the MCP server on Cloudflare Workers, providing a hosted endpoint for the Fitbit integration.
Provides access to Fitbit/Pixel Watch health data via the Google Health API, including tools for daily summaries, sleep, heart rate, HRV, activity, workouts, trends, devices, and raw data queries.
Uses Google Health API and Google OAuth to read Fitbit health data, with per-user Google sign-in and token storage.
Requires enabling the Google Health API and creating OAuth credentials in Google Cloud to authorize access to health data.
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., "@fitbit-mcpHow did I sleep this 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.
fitbit-mcp
Connect your Fitbit / Pixel Watch data to Claude (or any MCP client). Ask things like "How did I sleep this week?" or "Is my resting heart rate trending down?" and get answers from your real data.
Free. Runs on Cloudflare Workers' free tier. No servers to babysit.
Open source. MIT. Read every line.
Read-only. It never writes to your Google Health data.
Works on your phone. Add it once in Claude's settings; it syncs to the mobile apps.
Simple dashboard included. 30-day sleep, steps, resting HR, HRV, zone minutes.
It talks to the Google Health API (the replacement for the Fitbit Web API, which shut down in September 2026).
Claude ──MCP──▶ this Worker ──Google Health API──▶ your Fitbit data
(Cloudflare)Setup (about 20 minutes, one time)
You'll do three things: register an app with Google, deploy the Worker, add it to Claude.
1. Google Cloud (10 min)
Go to console.cloud.google.com and create a new project (call it anything, e.g.
fitbit-mcp).Enable the API: APIs & Services → Library → search "Google Health API" → Enable.
Consent screen: APIs & Services → OAuth consent screen (may be called "Google Auth Platform → Branding"):
User type: External. App name:
Fitbit MCP. Add your email as support and developer contact.Audience → Test users: add the Google account your Fitbit is linked to. (While the app is in "Testing", only test users can sign in and Google expires sign-ins every 7 days. See Going public to remove both limits.)
Data access / Scopes: add these three:
https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonlyhttps://www.googleapis.com/auth/googlehealth.sleep.readonlyhttps://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
Create credentials: APIs & Services → Credentials → Create credentials → OAuth client ID → type Web application.
Leave redirect URIs empty for now (you'll add one after deploying).
Copy the Client ID and Client secret.
2. Deploy (5 min)
You need Node.js 20+ and a free Cloudflare account.
git clone https://github.com/ArnavSankhe/fitbit-mcp.git
cd fitbit-mcp
npm install
npm run setupsetup logs you in to Cloudflare, creates the storage namespace, asks for your Google client ID and secret, and deploys. At the end it prints your URL, something like https://fitbit-mcp.yourname.workers.dev.
Then go back to Google Cloud → Credentials → your OAuth client → Authorised redirect URIs and add:
https://fitbit-mcp.yourname.workers.dev/callback3. Add to Claude (1 min)
Claude → Settings → Connectors → Add custom connector.
Name:
Fitbit. URL:https://fitbit-mcp.yourname.workers.dev/mcpClick Connect → sign in with Google → Allow.
Now ask Claude: "Use the Fitbit tool to check my devices". If it lists your watch, you're done.
Works the same in Claude Desktop, claude.ai, and the phone apps (custom connectors on mobile are in beta at the time of writing).
Related MCP server: google-health-mcp
What Claude can ask for
Tool | What it returns |
| One row per day: steps, distance, floors, active calories, HR avg/min/max, resting HR, HRV, active zone minutes, weight, sleep hours |
| Each night: time asleep/awake, light/deep/REM minutes, efficiency |
| Daily resting HR, HRV, and HR range |
| Steps, distance, floors, calories, zone minutes |
| Logged exercises with duration, distance, calories, avg/max HR |
| Last N days vs the N before, with % change |
| Paired devices and unit settings (good connection test) |
| Any raw data type, for debugging or things the summaries miss |
Dates are UTC. Data is fetched live from Google on every request and never stored.
Dashboard
Open https://fitbit-mcp.yourname.workers.dev/dashboard, sign in with Google, and you get a 30-day view (7 to 90 days selectable) of sleep, steps, resting HR, HRV, zone minutes, calories, and workouts. Light and dark mode, works on phones.
Sharing it with other people
Anyone can use your deployment: they add the same URL in Claude and sign in with their own Google account. Their tokens are stored separately; nobody can see anyone else's data.
Two Google limits apply while your app is in "Testing":
100 users max, and you have to add each one as a test user.
Sign-ins expire after 7 days, so people need to reconnect weekly.
Going public
To lift both limits, publish the app: Google Cloud → OAuth consent screen → Publish app, then Prepare for verification. Google asks for:
A homepage and privacy policy (this Worker serves both:
/and/privacy).A short video showing the sign-in flow and what the app does.
A justification for each scope (e.g. "Reads sleep sessions to show the user their sleep summary in their AI assistant").
Because the Worker stores Google refresh tokens, Google's Health API policy may also require an annual CASA security assessment. Some authorised labs offer the basic tier free or cheaply. Verification itself is free but takes a few weeks.
Costs
Cloudflare's free tier allows 100,000 requests a day. A typical user makes a few dozen. The dashboard's 90-day view is the heaviest thing here (about 20 Google calls). You'd need thousands of daily users before paying anything, and then it's about $5/month.
Privacy
Stored in Cloudflare KV, per user: Google user ID, name, email, an encrypted refresh token, and a short-lived cached access token. No health data is stored. Full policy at /privacy. To delete everything: dashboard → Disconnect, or revoke at myaccount.google.com/permissions.
Development
cp .dev.vars.example .dev.vars # fill in your Google credentials
npm run dev # http://localhost:8788
npm test # unit + tool tests (Google mocked)
npm run type-checkTest the MCP endpoint with the MCP Inspector: npx @modelcontextprotocol/inspector → connect to http://localhost:8788/mcp.
For local OAuth, add http://localhost:8788/callback as a redirect URI in Google Cloud.
Project layout
src/index.ts Worker entry: OAuth provider + MCP handler
src/google-handler.ts Sign-in screens, Google callback, dashboard routes
src/tools.ts The MCP tools
src/data.ts Fetch + aggregate daily rows, sleep, workouts, trends
src/health.ts Google Health API client and normalizers
src/tokens.ts Refresh-token storage and access-token refresh
src/pages.ts Home, privacy, dashboard HTML
scripts/setup.mjs One-command setup
tests/ Node test runner; Google API mockedTroubleshooting
"Google refused access (403)" — the Health API isn't enabled in your project, or your account isn't listed as a test user.
"isn't connected yet, or the connection expired" — Testing-mode sign-ins expire after 7 days. Remove and re-add the connector in Claude. Publishing the app fixes this permanently.
Empty numbers for a metric — the data type name or response shape may differ from what the normalizers expect. Ask Claude to call
get_rawwith that type (e.g.heart-rate), then open an issue with the output."redirect_uri_mismatch" — the
/callbackURL isn't in your OAuth client's redirect URIs, or has a typo.
Credits
Built on Cloudflare's remote MCP Google OAuth template and the agents SDK. Not affiliated with Google or Fitbit.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read wearables and lab health data — sleep, activity, workouts, timeseries, lab tests and orders.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Connect your health, fitness, nutrition, sleep, and wearable data to your AI assistant.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables Claude to access and query your Garmin Connect data, including sleep, activities, training load, and health metrics, through a set of read-only MCP tools.28137 PyPI1MIT
- AlicenseNot gradedqualityCmaintenanceGives Claude read access to wearable health data from Fitbit or Wear OS devices via the Google Health API, exposing tools for metrics like steps, heart rate, sleep, and workouts, plus a computed recovery score.MIT
- AlicenseAqualityBmaintenanceProvides read-only access to Fitbit health data (sleep, steps, heart rate, HRV) via local sync with Google Health API. Enables querying daily health summaries and trends through MCP tools without uploading data to cloud.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to read your WHOOP recovery, sleep, strain, and workout data.196 npmMIT