partymola/withings-mcp

🏃 Sports
0 Views
0 Installs

🐍 ☁️ 🏠 - MCP server for the Withings Health API: OAuth, local SQLite cache, and trend analysis for body composition, sleep, activity, workouts, and ECG.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "partymola-withings-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "partymola-withings-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

withings-mcp

CI License: GPL v3 Python 3.13+ PyPI Glama MCP Server

MCP server for the Withings Health API with OAuth, local SQLite cache, and trend analysis.

What makes this different from other Withings MCP servers:

  • Local SQLite cache for fast offline queries and historical trend analysis
  • Incremental sync - only fetches new data since last sync
  • Broad Withings coverage: 17 body-composition metrics plus sleep, daily activity, workouts, and ECG/AFib
  • Automatic OAuth token refresh (access tokens: 3h, refresh tokens: 1 year)
  • Zero dependencies beyond mcp (HTTP via stdlib)
  • Python 3.13+

Tools

ToolDescriptionData source
withings_syncSync data from Withings API to local cacheLive API -> SQLite
withings_get_bodyBody composition (weight, fat%, muscle, bone, BP, SpO2)Local cache (auto-syncs if stale)
withings_get_sleepSleep summaries, or detailed phase time-series with detail=TrueCache (summary) / live (detail)
withings_get_activityDaily steps, distance, calories, active timeLocal cache (auto-syncs if stale)
withings_get_workoutsWorkout sessions with type, duration, HRLocal cache (auto-syncs if stale)
withings_get_heartECG recordings and AFib detectionLive API (always)
withings_get_devicesConnected devices with battery statusLive API (always)
withings_trendsPeriod averages, weekly/monthly/quarterly trends, comparisonsLocal cache (auto-syncs if stale)

The cache-backed query tools auto-sync when their data is stale, and accept live=True to bypass the cache and fetch straight from the Withings API. withings_get_heart and withings_get_devices are always live. withings_get_sleep(detail=True) returns minute-by-minute sleep phases (live, up to 7 days per request).

Prerequisites

  • Python 3.13+
  • uv (recommended) or pip
  • A Withings developer account and registered application

Installation

pip install withings-mcp

Or run it without installing with uvx withings-mcp. For development from a clone:

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

Setup

1. Register a Withings app

  1. Go to https://developer.withings.com/dashboard
  2. Create a new application
  3. Set the callback URL to http://localhost:8585
  4. Note your Client ID and Client Secret

2. Authenticate

.venv/bin/withings-mcp auth

This opens your browser for Withings authorization. After approving, tokens are saved locally in config/.

3. Register with Claude Code

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

4. First sync

In Claude Code, say: "Sync my Withings data"

This runs withings_sync to populate the local cache. Subsequent syncs only fetch new data.

You can also sync from the command line without an MCP client:

.venv/bin/withings-mcp sync                      # all data types, last 30 days
.venv/bin/withings-mcp sync --types body,sleep   # a subset
.venv/bin/withings-mcp sync --days 90            # deeper history on first sync

CLI

withings-mcp              Start the MCP server (stdio transport)
withings-mcp auth         Interactive OAuth setup (opens the browser)
withings-mcp sync         Sync data to the local cache (--types, --days)
withings-mcp --version    Print the installed package version

Configuration

Environment VariableDefaultDescription
WITHINGS_MCP_CONFIG_DIR./config/Directory for credentials and tokens
WITHINGS_MCP_DB_PATH./withings.dbSQLite database path

Example Prompts

  • "Sync my Withings data"
  • "Show my weight for the last 3 months"
  • "How has my sleep changed this year?"
  • "Compare my body composition this month vs last month"
  • "What workouts did I do in March?"
  • "What Withings devices do I have connected?"
  • "Show my sleep trends quarterly"

Development

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

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

Security

  • Read-only: No tools modify data on Withings servers
  • Local storage: Health data stays in your local SQLite database
  • Token storage: OAuth tokens stored in config/ (gitignored, file permissions 0600)
  • Error messages: Never contain health data values - only status codes
  • Pre-commit hook: An optional hook (scripts/check-no-data.sh) blocks database files and credentials from commits - install it with the one-liner in CONTRIBUTING.md

Contributing

See CONTRIBUTING.md for development setup, the test workflow, and the pre-commit hook. Changes are tracked in CHANGELOG.md.

License

GPL-3.0-or-later

Related MCP Servers

anup-shesh/garmin-local-mcp

🐍 🏠 🍎 🪟 🐧 - Local-first Garmin data warehouse: incremental sync into SQLite you own, with server-side trends, lag-aware correlations, personal baselines, and anomaly detection returned as compact tables. Analysis keeps working offline when Garmin's API breaks, and a zero-auth FIT-bundle import fills gaps with no login at all.

🏃 Sports0 views
arturogarrido/claudinho

📇 🏠 🍎 🪟 🐧 - Live scores, fixtures, standings, and read-only prediction-market signals for the 2026 World Cup. No API keys.

🏃 Sports0 views
Backspace-me/sportscore-mcp

📇 ☁️ 🍎 🪟 🐧 - Live scores, standings, top scorers, player stats, and knockout brackets for football, basketball, cricket, and tennis. Free public API, no key required.

🏃 Sports0 views
chessceo/chessceo-mcp

📇 ☁️ 🏠 🍎 🪟 🐧 - Chess data via chess.ceo — 11.7M+ games and 1.5M FIDE player profiles. 8 tools: player search, per-player opening preparation (opening tree with frequency + win rate), position statistics from the full game database, head-to-head records, and live tournament broadcasts. No API key. Remote server at https://mcp.chess.ceo/mcp or local via npx -y @chessceo/mcp.

🏃 Sports0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.