Fitbit MCP Server

Integrations

  • Retrieves health and fitness data from a user's Fitbit account, including weight measurements, sleep logs, and user profile information. Currently supports endpoints for weight data by period, sleep data by date range, and profile details, with planned support for steps, heart rate, and activity data.

Fitbit MCP サーバー

このプロジェクトは、LLM (Claude など) と Fitbit API 間のブリッジとして機能するモデル コンテキスト プロトコル (MCP) サーバーを実装します。

これにより、LLM は定義されたツールを使用してユーザーの Fitbit アカウントから健康とフィットネスのデータを要求し、取得できるようになります。

特徴

  • Fitbit API 統合: OAuth 2.0 を使用して Fitbit API に安全に接続します。
  • **MCP コンプライアンス:**モデル コンテキスト プロトコルに準拠したツールを通じて Fitbit データを公開します。
  • **拡張可能:**より多くの Fitbit API エンドポイントのサポートを簡単に追加できるように設計されています。

サポートされているエンドポイント

  • 重さ:
    • get_weight : 今日までの指定期間( 1d7d30d3m6m1y )の生の体重データを取得します。 periodパラメータが必要です。
  • 寝る:
    • get_sleep_by_date_range : 特定の日付範囲(最大100日間)の睡眠ログの生データを取得します。startDate startDate``endDateパラメータはYYYY-MM-DD形式で指定する必要があります。
  • プロフィール:
    • get_profile : 名前、年齢、性別、身長、体重、アカウント情報などの個人情報を含む、ユーザーの Fitbit プロフィール情報を取得します。

計画されたエンドポイント

  • 手順
  • 心拍
  • 活動

設定

  1. リポジトリをクローンします。
    git clone https://github.com/TheDigitalNinja/mcp-fitbit cd MCP-Server
  2. 依存関係をインストールします:
    npm install
  3. 環境ファイルの作成:
    • プロジェクト ルート ( mcp-fitbit/ ) に.envという名前のファイルを作成します。
    • Fitbit アプリケーションの資格情報を追加します:
      FITBIT_CLIENT_ID=YOUR_FITBIT_CLIENT_ID FITBIT_CLIENT_SECRET=YOUR_FITBIT_CLIENT_SECRET
    • これらは、 dev.fitbit.comでアプリケーションを登録することで取得できます。OAuth 2.0 アプリケーションタイプPersonalに設定され、コールバックURLhttp://localhost:3000/callbackあることを確認してください。
  4. プロジェクトをビルドします。
    npm run build
    これにより、TypeScript ソース ファイル ( src/ ) が JavaScript ファイル ( build/ ) にコンパイルされます。

Claude for Desktopとの統合

この Fitbit MCP サーバーを Claude for Desktop で使用するには:

  1. Claude 構成ファイルを見つけます。
    • Windows では、ファイル エクスプローラーを開き、 %AppData%\Claude\に移動します。
    • テキスト エディターでclaude_desktop_config.jsonファイルを開きます。
  2. サーバー構成を追加します。
    • JSON ファイルでmcpServersキーを見つけます (存在しない場合は、追加する必要がある可能性があります)。
    • Fitbitサーバーのエントリを追加します。C C:\PATH\TO\PARENT\FOLDER\mcp-fitbitこのリポジトリをクローンしたディレクトリへの絶対パスに置き換えてください。
    { "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 ... }
    • 重要: Windows の JSON ファイル内のパスには、必ず二重のバックスラッシュ ( \\ ) を使用してください。
  3. 保存して再起動:
    • claude_desktop_config.jsonファイルを保存します。
    • Claude for Desktop アプリケーションを再起動します。
  4. 初回実行と認証:
    • Claude が初めてサーバーに接続すると (たとえば、Fitbit ツールを必要とする質問をするとき)、サーバーは Fitbit OAuth 2.0 認証フローを開始します。
    • サーバーのコンソール ウィンドウが一時的に表示される場合があります。
    • サーバーは、デフォルトの Web ブラウザでhttp://localhost:3000/authを開こうとします。
    • ブラウザが自動的に開かない場合は、手動でその URL に移動してください。
    • Fitbit アカウントにログインし、要求されたスコープ (体重と睡眠) に対するアプリケーションの権限を付与します。
    • http://localhost:3000/callbackにリダイレクトされます。
    • ブラウザのタブに成功メッセージが表示され、閉じることができます。
    • サーバーが認証され、Claude は Fitbit ツールを使用できるようになりました。

利用可能なツール

サーバーが実行および承認されると、接続された LLM で次のツールが利用できるようになります。

  • get_weight : 今日までの指定期間の生の重量時系列データを JSON 文字列として取得します。
    • パラメータ: period (文字列、必須) - 期間を指定します。 "1d""7d""30d""3m""6m""1y"のいずれかである必要があります。
    • 使用例(概念): get_weight(period="7d")
  • get_sleep_by_date_range : 指定された日付範囲 (最大 100 日) の生の睡眠ログ データを JSON 文字列として取得します。
    • パラメータ:
      • startDate (文字列、必須) - 開始日をYYYY-MM-DD形式で指定します。
      • endDate (文字列、必須) - 終了日をYYYY-MM-DD形式で指定します。
    • 使用例(概念): get_sleep_by_date_range(startDate="2025-04-01", endDate="2025-04-30")
  • get_profile : ユーザーの Fitbit プロファイル情報を JSON 文字列として取得します。
    • **パラメータ:**必要ありません。
    • 使用例(概念): get_profile()

発達

  • ソースコードはsrc/ディレクトリにあります。
  • TypeScript ファイルに変更を加えた後、 npm run build実行します。
  • サーバーがすでに Claude 経由で実行されている場合は、最新のビルドを取得するために Claude for Desktop を再起動します。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

LLM (Claude など) と Fitbit API を橋渡しするモデル コンテキスト プロトコル サーバー。これにより、LLM は定義されたツールを通じてユーザーの健康とフィットネスのデータを要求および取得できるようになります。

  1. 特徴
    1. サポートされているエンドポイント
    2. 計画されたエンドポイント
  2. 設定
    1. Claude for Desktopとの統合
      1. 利用可能なツール
        1. 発達

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server for tracking personal health and well-being, offering tools for workout logging, nutrition management, and daily journaling with AI-assisted analysis integration.
            Last updated -
            2
            Python
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that provides health data from the Senechal API to LLM applications, enabling AI assistants to access, analyze, and respond to personal health information.
            Last updated -
            Python
            GPL 3.0
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides language models with access to personal Whoop fitness data, allowing queries for cycles, recovery, strain, and workout information from the Whoop API.
            Last updated -
            2
            Python
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.
            Last updated -
            13
            2
            TypeScript
            MIT License

          View all related MCP servers

          ID: jcowqolhlh