Skip to main content
Glama
partymola
by partymola

withings-mcp

CI License: GPL v3 Python 3.13+

OAuth、ローカルSQLiteキャッシュ、トレンド分析機能を備えたWithings Health API用MCPサーバーです。

他のWithings MCPサーバーとの違い:

  • 高速なオフラインクエリと過去のトレンド分析のためのローカルSQLiteキャッシュ

  • 増分同期 - 前回の同期以降の新しいデータのみを取得

  • 200種類以上のすべてのWithings測定タイプをサポート(体組成、睡眠、アクティビティ、ワークアウト、ECG)

  • 自動OAuthトークン更新(アクセストークン: 3時間、リフレッシュトークン: 1年)

  • mcp以外の依存関係なし(HTTPは標準ライブラリを使用)

  • Python 3.13+対応

ツール

ツール

説明

withings_sync

Withings APIからローカルキャッシュへデータを同期

withings_get_body

体組成(体重、体脂肪率、筋肉量、骨量、血圧、SpO2)

withings_get_sleep

睡眠サマリーまたは詳細なフェーズ時系列データ

withings_get_activity

毎日の歩数、距離、消費カロリー、アクティブ時間

withings_get_workouts

ワークアウトセッション(タイプ、期間、心拍数)

withings_get_heart

ECG記録およびAFib(心房細動)検出

withings_get_devices

バッテリー状態を含む接続済みデバイス

withings_trends

期間平均、週次/月次/四半期ごとのトレンド、比較

Related MCP server: Withings MCP Server

前提条件

  • Python 3.13+

  • uv(推奨)または pip

  • Withings開発者アカウントおよび登録済みアプリケーション

インストール

git clone https://github.com/partymola/withings-mcp.git
cd withings-mcp
uv venv --python 3.13 .venv
uv pip install -e .

セットアップ

1. Withingsアプリの登録

  1. https://developer.withings.com/dashboard にアクセス

  2. 新しいアプリケーションを作成

  3. コールバックURLを http://localhost:8585 に設定

  4. クライアントIDとクライアントシークレットを控える

2. 認証

.venv/bin/withings-mcp auth

これによりブラウザが開き、Withingsの認証が行われます。承認後、トークンはローカルの config/ ディレクトリに保存されます。

3. Claude Codeへの登録

claude mcp add -s user withings -- /path/to/withings-mcp/.venv/bin/withings-mcp

4. 初回同期

Claude Codeで「Sync my Withings data」と入力してください。

これにより withings_sync が実行され、ローカルキャッシュが作成されます。以降の同期では新しいデータのみが取得されます。

設定

環境変数

デフォルト

説明

WITHINGS_MCP_CONFIG_DIR

./config/

認証情報とトークン用のディレクトリ

WITHINGS_MCP_DB_PATH

./withings.db

SQLiteデータベースのパス

プロンプト例

  • 「Sync my Withings data」(Withingsデータを同期して)

  • 「Show my weight for the last 3 months」(過去3ヶ月の体重を表示して)

  • 「How has my sleep changed this year?」(今年の睡眠はどう変化した?)

  • 「Compare my body composition this month vs last month」(今月と先月の体組成を比較して)

  • 「What workouts did I do in March?」(3月にはどんなワークアウトをした?)

  • 「What Withings devices do I have connected?」(接続されているWithingsデバイスは何?)

  • 「Show my sleep trends quarterly」(四半期ごとの睡眠トレンドを表示して)

開発

# Install with dev dependencies
uv pip install -e . && uv pip install pytest

# Run tests (74 tests, all use in-memory SQLite with fictional data)
.venv/bin/python -m pytest tests/ -v

セキュリティ

  • 読み取り専用: Withingsサーバー上のデータを変更するツールはありません

  • ローカルストレージ: 健康データはローカルのSQLiteデータベース内にのみ保持されます

  • トークンストレージ: OAuthトークンは config/ に保存されます(gitignored、ファイル権限は0600)

  • エラーメッセージ: 健康データの値は含まれず、ステータスコードのみが表示されます

  • プリコミットフック: データベースファイルや認証情報がコミットされるのを防ぎます

コントリビューション

開発環境のセットアップ、テストワークフロー、プリコミットフックについては CONTRIBUTING.md を参照してください。変更履歴は CHANGELOG.md で管理されています。

ライセンス

GPL-3.0-or-later

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
31dResponse time
3wRelease cycle
6Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    Enables retrieval of health data from Withings smart scales including weight measurements and comprehensive body composition metrics like fat mass, muscle mass, and hydration levels. Supports multiple users, unit preferences, and OAuth authentication for secure access to personal health data.
    2
  • A
    license
    A
    quality
    B
    maintenance
    Enables access to Withings Health API data including body measurements, activity tracking, sleep analysis, workouts, and heart rate monitoring through OAuth2 authentication.
    8
    1
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Read-only Model Context Protocol server for Withings weight and body-composition history, providing normalized measurements, weight history, and latest measurements via OAuth 2.0.
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for Withings health data — sleep, activity, heart, and body metrics.

  • Connect your Oura Ring account securely in minutes. Enable authorized access to your sleep, activi…

  • Glucose readings from your LibreLink Up sensor: graph, logbook, stats and summaries (read-only). Sec

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/partymola/withings-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server