fitbit-health-mcp
Allows retrieval of Fitbit sleep and recovery data, including sleep sessions and stages, sleep summaries, HRV, SpO2, respiratory rate, and resting heart rate, via the Google Health API v4.
Uses the Google Health API v4 as the data source to query Fitbit health data, including sleep, recovery vitals, and arbitrary health dataTypes.
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-health-mcphow was my sleep last night?"
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-health-mcp
Servidor MCP personal que expone tus datos de sueño y recuperación de Fitbit a Claude, vía la Google Health API v4 (no la Fitbit Web API legacy, que se apaga en septiembre 2026).
Tools expuestas:
get_sleep_sessions— sesiones de sueño individuales (etapas, eficiencia)get_sleep_summary— promedios de los últimos N díasget_recovery_vitals— HRV, SpO2, frecuencia respiratoria, FC en reposoget_health_data_raw— escape hatch para cualquier otro dataType
1. Google Cloud Console
Crea un proyecto en https://console.cloud.google.com
Habilita Google Health API (busca "Health API" en el marketplace de APIs)
Configura la pantalla de consentimiento OAuth (External, modo "Testing" está bien para uso personal — agrégate a ti mismo como test user)
Crea credenciales OAuth 2.0 → tipo "Web application"
Authorized redirect URI:
http://127.0.0.1:8788/oauth2callback
Copia el Client ID y Client Secret a tu
.env(ver.env.example)
Related MCP server: Oura Ring MCP Server
2. Instalar y autorizar
cp .env.example .env
# pega GOOGLE_CLIENT_ID y GOOGLE_CLIENT_SECRET en .env
# genera un secreto para Claude:
openssl rand -hex 32 # pega el resultado en MCP_SHARED_SECRET en .env
npm install
npm run auth # abre el navegador, apruebas el consentimiento de Google
# una sola vez -> guarda GOOGLE_REFRESH_TOKEN en .env3. Correr el servidor
npm start
# fitbit-health-mcp escuchando en http://localhost:8787/mcpPruébalo local:
curl -X POST http://localhost:8787/mcp \
-H "Authorization: Bearer $MCP_SHARED_SECRET" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'4. Exponerlo públicamente (HTTPS)
Claude necesita alcanzar tu servidor por HTTPS. Dado tu setup (Mac Mini M4 siempre encendido, ya corriendo Docker/Jellyfin), la opción más consistente con tu enfoque local-first es un Cloudflare Tunnel:
brew install cloudflare/cloudflare/cloudflared
cloudflared tunnel login
cloudflared tunnel create fitbit-mcp
cloudflared tunnel route dns fitbit-mcp fitbit.tudominio.com
cloudflared tunnel --url http://localhost:8787 run fitbit-mcpAlternativas más simples para probar rápido (sin dominio propio):
ngrok http 8787 — pero para algo que vas a dejar corriendo, el tunnel de
Cloudflare es gratis y no expone tu IP ni requiere abrir puertos en el router.
5. Conectar en Claude
En claude.ai: Settings → Connectors → Add custom connector
URL:
https://fitbit.tudominio.com/mcpAuthentication: elige autenticación por header (
static_headers, en beta) → headerAuthorization, valorBearer <tu MCP_SHARED_SECRET>
Si no ves la opción de header auth en tu versión de la UI, es porque
static_headers está en beta — como alternativa, Claude Code sí soporta
headers directamente:
claude mcp add --transport http fitbit-health https://fitbit.tudominio.com/mcp \
--header "Authorization: Bearer $MCP_SHARED_SECRET"Notas y cosas a verificar
Nombres de dataType: confirmé contra la documentación oficial
sleep,daily-heart-rate-variability,daily-oxygen-saturationyrespiratory-rate-sleep-summary. El de frecuencia cardíaca en reposo (daily-resting-heart-rate) lo infería por patrón — siget_recovery_vitalste devuelve un error para esa clave, revisa el nombre exacto en https://developers.google.com/health/reference/rest/v4/users.dataTypes.dataPoints y ajústalo ensrc/server.js. Mientras tanto,get_health_data_rawte deja consultar cualquier dataType directo sin tocar código.Paginación:
sleeplimita a 25 sesiones por página; el cliente sigue hasta 3 páginas (75 noches) — de sobra para "esta semana" o "este mes".dataSourceFamily: por default uso
google-wearables(solo tu Fitbit, sin estimaciones del teléfono). Cámbialo en.envsi quieresall-sourcesogoogle-sources.Scopes: pedí solo
sleep.readonlyyhealth_metrics_and_measurements.readonly. Si más adelante quieres pasos, calorías o VO2 max, agrega el scope correspondiente enscripts/setup-oauth.jsy vuelve a corrernpm run auth.Reautorización: el token de Google no vence solo mientras uses la app; si algún día ves errores de refresh, borra
GOOGLE_REFRESH_TOKENdel.envy vuelve a corrernpm run auth.
This server cannot be deployed
Maintenance
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
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.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes Whoop fitness data (recovery, sleep, strain, workouts) to Claude for use as a daily training coach, enabling natural language queries about your health metrics and training readiness.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to access and query Oura Ring health data including sleep, activity, readiness, heart rate, and more via the Oura API.MIT
- 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
- AlicenseNot gradedqualityDmaintenanceConnects your Whoop health data to Claude, enabling natural language queries about recovery, sleep, strain, and workouts.458 npmMIT