Fitbit MCP Server

Fitbit MCP Server

A Model Context Protocol server that bridges LLMs (like Claude) with the Fitbit API, allowing the LLM to request and retrieve user health and fitness data through defined tools.

Category
Visit Server

Tools

get_weight

Get the raw JSON response for weight entries from Fitbit for a specified period ending today. Requires a 'period' parameter such as '1d', '7d', '30d', '3m', '6m', '1y'

get_sleep_by_date_range

Get the raw JSON response for sleep logs from Fitbit for a specific date range. Requires 'startDate' and 'endDate' parameters in 'YYYY-MM-DD' format. Note: The API enforces a maximum range of 100 days.

get_profile

Get the raw JSON response for the user's Fitbit profile.

README

Fitbit MCP Server

This project implements a Model Context Protocol (MCP) server that acts as a bridge between an LLM (like Claude) and the Fitbit API.

It allows the LLM to request and retrieve health and fitness data from a user's Fitbit account via defined tools.

Features

  • Fitbit API Integration: Connects securely to the Fitbit API using OAuth 2.0.
  • MCP Compliance: Exposes Fitbit data through tools compliant with the Model Context Protocol.
  • Extensible: Designed to easily add support for more Fitbit API endpoints.

Supported Endpoints

  • Weight:
    • get_weight: Retrieves raw weight data for a specified period (1d, 7d, 30d, 3m, 6m, 1y) ending today. Requires a period parameter.
  • Sleep:
    • get_sleep_by_date_range: Retrieves raw sleep log data for a specific date range (max 100 days). Requires startDate and endDate parameters in YYYY-MM-DD format.
  • Profile:
    • get_profile: Retrieves the user's Fitbit profile information, including personal details such as name, age, gender, height, weight, and account information.

Planned Endpoints

  • Steps
  • Heart Rate
  • Activity

Setup

  1. Clone the Repository:

    git clone https://github.com/TheDigitalNinja/mcp-fitbit
    cd MCP-Server
    
  2. Install Dependencies:

    npm install
    
  3. Create Environment File:

    • Create a file named .env in the project root (mcp-fitbit/).
    • Add your Fitbit application credentials:
      FITBIT_CLIENT_ID=YOUR_FITBIT_CLIENT_ID
      FITBIT_CLIENT_SECRET=YOUR_FITBIT_CLIENT_SECRET
      
    • You can obtain these by registering an application at dev.fitbit.com. Ensure the OAuth 2.0 Application Type is set to Personal and the Callback URL is http://localhost:3000/callback.
  4. Build the Project:

    npm run build
    

    This compiles the TypeScript source files (src/) into JavaScript files (build/).

Integrating with Claude for Desktop

To use this Fitbit MCP server with Claude for Desktop:

  1. Locate the Claude Configuration File:

    • On Windows, open the file explorer and navigate to %AppData%\Claude\.
    • Open the claude_desktop_config.json file in a text editor.
  2. Add the Server Configuration:

    • Find the mcpServers key in the JSON file (if it doesn't exist, you might need to add it).
    • Add an entry for the Fitbit server. Replace C:\PATH\TO\PARENT\FOLDER\mcp-fitbit with the absolute path to the directory where you cloned this repository.
    {
        "mcpServers": {
            "fitbit": {
                "command": "node",
                "args": [
                    "C:\\PATH\\TO\\PARENT\\FOLDER\\mcp-fitbit\\build\\index.js"
                ]
            }
            // Add other servers here if you have them
        }
        // ... other Claude settings ...
    }
    
    • Important: Ensure you use double backslashes (\\) for paths on Windows in the JSON file.
  3. Save and Restart:

    • Save the claude_desktop_config.json file.
    • Restart the Claude for Desktop application.
  4. First Run & Authorization:

    • The first time Claude connects to the server (e.g., when you ask it a question that requires a Fitbit tool), the server will initiate the Fitbit OAuth 2.0 authorization flow.
    • A console window for the server might appear briefly.
    • The server will attempt to open http://localhost:3000/auth in your default web browser.
    • If the browser doesn't open automatically, navigate to that URL manually.
    • Log in to your Fitbit account and grant the application permission for the requested scopes (Weight and Sleep).
    • You will be redirected to http://localhost:3000/callback.
    • A success message will appear in the browser tab, which can then be closed.
    • The server is now authenticated and Claude can use the Fitbit tools.

Available Tools

Once the server is running and authorized, the following tools will be available to the connected LLM:

  • get_weight: Fetches raw weight time series data as a JSON string for a specified period ending today.
    • Parameter: period (string, required) - Specifies the duration. Must be one of: "1d", "7d", "30d", "3m", "6m", "1y".
    • Example Usage (Conceptual): get_weight(period="7d")
  • get_sleep_by_date_range: Fetches raw sleep log data as a JSON string for a specified date range (maximum 100 days).
    • Parameters:
      • startDate (string, required) - Specifies the start date in YYYY-MM-DD format.
      • endDate (string, required) - Specifies the end date in YYYY-MM-DD format.
    • Example Usage (Conceptual): get_sleep_by_date_range(startDate="2025-04-01", endDate="2025-04-30")
  • get_profile: Fetches the user's Fitbit profile information as a JSON string.
    • Parameters: None required.
    • Example Usage (Conceptual): get_profile()

Development

  • Source code is located in the src/ directory.
  • Run npm run build after making changes to the TypeScript files.
  • Restart Claude for Desktop to ensure it picks up the latest build if the server was already running via Claude.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured