8000 GitHub - Npab19/fitbit-mcp: MCP server for the Fitbit Web API with OAuth 2.1 authentication · GitHub
[go: up one dir, main page]

Skip to content

About

MCP server for the Fitbit Web API with OAuth 2.1 authentication

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Fitbit MCP Server

A Model Context Protocol server for the Fitbit Web API with OAuth 2.1 authentication
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Built With
  3. Getting Started
  4. Usage
  5. Available Tools
  6. Roadmap
  7. Contributing
  8. License
  9. Acknowledgments

About The Project

A self-hosted MCP server that gives Claude access to your Fitbit health and fitness data. Uses MCP OAuth 2.1 with third-party delegation — when Claude connects, you're redirected to Fitbit to authorize. No manual token management needed.

53 read-only tools covering activity, sleep, heart rate, HRV, SpO2, breathing rate, body composition, nutrition, temperature, cardio fitness, and more.

(back to top)

Built With

Python Docker Cloudflare

(back to top)

Getting Started

Prerequisites

Fitbit App Setup

  1. Go to dev.fitbit.com/apps and register a new app
  2. Set OAuth 2.0 Application Type to Personal
  3. Set Redirect URL to https://<your-tunnel-url>/fitbit-callback
  4. Grant Read-Only access
  5. Note your Client ID and Client Secret

Installation

  1. Clone the repo

    git clone https://github.com/npab19/fitbit-mcp.git
    cd fitbit-mcp
  2. Copy the environment template

    cp .env.example .env
  3. Fill in your credentials in .env:

    FITBIT_CLIENT_ID=your_client_id
    FITBIT_CLIENT_SECRET=your_client_secret
    SERVER_URL=https://your-tunnel-url.example.com
    Cloudflare_Token=your_cloudflare_tunnel_token
  4. Start the services

    docker compose up -d

Tip: You can also use the pre-built image from GHCR instead of building locally.

(back to top)

Usage

Claude.ai Web Connectors

Set the connector URL to:

https://<your-tunnel-url>/mcp

OAuth authentication will be handled automatically when you first connect.

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "fitbit": {
      "type": "http",
      "url": "https://<your-tunnel-url>/mcp"
    }
  }
}

(back to top)

Available Tools

Category Tools Description
Activity 7 Daily summaries, activity log, goals, favorites, frequent, recent, lifetime stats
Activity Time Series 2 Steps, calories, distance, floors, elevation, and more over time periods or date ranges
Sleep 4 Sleep logs by date/range, paginated list, sleep goal
Heart Rate 2 Heart rate zones and resting HR by period or date range
HRV 2 Heart rate variability (RMSSD) by date or range
SpO2 2 Blood oxygen saturation by date or range
Breathing Rate 2 Average breaths per minute by date or range
Cardio Fitness 2 VO2 Max estimates by date or range
Active Zone Minutes 2 Fat burn, cardio, and peak zone minutes over time
Body 5 Weight, body fat, BMI logs and time series, body goals
Temperature 4 Core and skin temperature by date or range
Nutrition 9 Food/water logs, goals, favorites, frequent, recent, meals, food search
Intraday 6 Granular activity, heart rate, breathing, HRV, SpO2, AZM data
Devices 1 Paired device info, battery, last sync
User 2 Profile and badges
Friends 2 Friends list and step leaderboard

(back to top)

Roadmap

  • Core Fitbit API read endpoints
  • MCP OAuth 2.1 with Fitbit delegation
  • Docker + Cloudflare Tunnel deployment
  • Token persistence across restarts
  • Subscription/webhook support for real-time data
  • Write endpoints (log activities, food, water)

(back to top)

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

About

MCP server for the Fitbit Web API with OAuth 2.1 authentication

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0