# partymola/withings-mcp [Health: Active]

**Category:** 🏃 Sports  
**Repository:** https://github.com/partymola/withings-mcp  
**GitHub Stars:** 1  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/partymola-withings-mcp

## Description
MCP server for the Withings Health API: OAuth, local SQLite cache, and trend analysis for body composition, sleep, activity, workouts, and ECG.

## Tools
Capabilities this server exposes over MCP:

- **withings_sync** — Sync Withings health data to the local cache.

Fetches data from the Withings API and stores it in SQLite for fast
offline queries. Run this before using other withings_get_* tools.

Syncs incrementally: only fetches data newer than the last sync.
First sync fetches the specified number of days of history.

Args:
    data_types: What to sync. Options: "all", "body", "sleep",
        "activity", "workouts". Comma-separated for multiple,
        e.g. "body,sleep". Default: "all".
    days: Days of history for first sync (default: 30). Ignored
        on subsequent syncs (uses last sync timestamp).

Returns summary of records synced per data type.
Not for querying data - use withings_get_body, withings_get_sleep,
withings_get_activity, or withings_get_workouts instead.

- **withings_get_activity** — Get daily activity summaries (steps, distance, calories, active time).

Returns one entry per day from the local cache by default.
Run withings_sync first to populate the cache.

Args:
    start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d".
        Default: last 30 days.
    end_date: End date as "YYYY-MM-DD". Default: today.
    live: If true, fetch from Withings API instead of cache.

Returns daily activity data sorted by date, with steps, distance
in km, calories, and active minutes by intensity level.
Not for workout sessions -- use withings_get_workouts instead.

- **withings_get_workouts** — Get workout sessions (type, duration, HR, calories).

Returns individual workout sessions from the local cache by default.
Run withings_sync first to populate the cache.

Args:
    start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "90d".
        Default: last 90 days.
    end_date: End date as "YYYY-MM-DD". Default: today.
    category: Filter by workout type, case-insensitive partial match. A
        value matching none of the categories below is refused, naming
        the ones your cache holds.
        Options: badminton, baseball, basketball, bmx, bodyboard, boxing,
        calisthenics, climbing, cycling, dancing, elliptical, fencing,
        football, golf, handball, hiking, hockey, horse_riding,
        ice_hockey, ice_skating, indoor_cycling, indoor_running,
        indoor_walk, kitesurfing, martial_arts, multi_sport, other,
        pilates, rowing, rugby, run, skating, skiing, snowboarding,
        soccer, squash, surfing, swimming, table_tennis, tennis,
        volleyball, walk, waterpolo, weightlifting, windsurfing,
        wrestling, yoga, zumba.

    live: If true, fetch from Withings API instead of cache.

Returns workout sessions sorted by date with type, duration,
calories, distance, and heart rate data.
Not for daily step/activity totals -- use withings_get_activity.

- **withings_trends** — Analyse trends in cached health data.

Computes averages, min/max, and changes over time from the local
cache. Auto-syncs if the cache is stale (no sync today).

Args:
    data_type: What to analyse. Options: "body", "sleep", "activity".
    period: Aggregation period. Options: "weekly", "monthly",
        "quarterly". Default: "monthly".
    start_date: Start date as "YYYY-MM-DD" or "12m" for relative.
        Default: last 12 months.
    end_date: End date as "YYYY-MM-DD". Default: today.
    compare: Compare two periods. Format: "last_30d vs previous_30d",
        "2026-03 vs 2026-02", "2026-Q1 vs 2025-Q4".
        When set, period/start_date/end_date are ignored.

Returns aggregated averages with change indicators. For body data:
weight, fat%, muscle trends. For sleep: duration, score, HR trends.
For activity: steps, distance, calorie trends.
Not for raw data -- use withings_get_body/sleep/activity instead.

- **withings_get_body** — Get body composition measurements (weight, fat, muscle, etc.).

Returns measurements from the local cache by default. Use live=True
to fetch directly from Withings API. Run withings_sync first to
populate the cache.

Args:
    start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d" for
        relative days. Default: last 30 days.
    end_date: End date as "YYYY-MM-DD". Default: today.
    metrics: Comma-separated metric filter, e.g. "weight_kg,fat_pct".
        Default: all available metrics. Names match exactly and are
        case-sensitive; one that is not on this list is refused, naming
        them.
        Options: weight_kg, height_m, lean_mass_kg, fat_pct,
        fat_mass_kg, muscle_mass_kg, hydration_kg, bone_mass_kg,
        heart_rate, systolic_bp, diastolic_bp, spo2_pct, temperature_c,
        body_temperature_c, pulse_wave_velocity, visceral_fat_index,
        basal_metabolic_rate.

    live: If true, fetch from Withings API instead of cache.

Returns measurements sorted by date, one entry per measurement group.
Not for sleep or activity data -- use withings_get_sleep or
withings_get_activity instead.

- **withings_get_devices** — Get connected Withings devices with battery and firmware info.

Always fetched live from the Withings API.

Returns device type, model name, battery level (high/medium/low),
and last session date for each connected device.

- **withings_get_heart** — Get ECG recordings and atrial fibrillation detection results.

Always fetched live from the Withings API (not cached due to large
signal data). Requires a Withings device with ECG capability
(ScanWatch, BPM Core).

Args:
    start_date: Start date as "YYYY-MM-DD" or "30d". Default: last 30 days.
    end_date: End date as "YYYY-MM-DD". Default: today.

Returns ECG recording list with timestamps, AFib classification
(negative/positive/inconclusive), and heart rate. Does not include
raw signal waveforms.
For resting heart rate trends, use withings_get_body or
withings_get_sleep instead.

- **withings_get_sleep** — Get sleep data (summaries or detailed phases).

Summary mode (default): nightly totals with duration, sleep score,
HR, respiratory rate, and snoring. From local cache unless live=True.

Detail mode (detail=True): minute-by-minute sleep phases (awake,
light, deep, REM) with HR and respiratory rate. Always fetched live.
Maximum 7 days per request (Withings API limit).

Args:
    start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "7d".
        Default: last 7 days (detail) or last 30 days (summary).
    end_date: End date as "YYYY-MM-DD". Default: today.
    detail: If true, return minute-by-minute sleep phases instead
        of nightly summaries. Always live, max 7 days.
    live: If true, fetch summaries from API instead of cache.
        Ignored when detail=True (always live).

Returns nightly sleep data sorted by date.
Not for body composition -- use withings_get_body instead.


## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "withings-mcp": {
    "command": "uvx",
    "args": ["withings-mcp"]
  }
}
```

## Documentation

## What partymola/withings-mcp MCP server does

partymola/withings-mcp exposes Withings Health API data through the Model Context Protocol. It covers body measurements, sleep, daily activity, workout sessions, connected devices, and ECG recordings with atrial fibrillation classifications. The server is read-only with respect to Withings data: its tools retrieve information and do not modify records on Withings servers.

Most historical data is copied into a local SQLite database. This supports queries without contacting the API for every request and provides the data source used by trend calculations. Body measurements include weight, body fat, muscle, bone, blood pressure, oxygen saturation, temperature, and other available metrics.

## How it works

Run an initial synchronization to populate the cache. The sync operation accepts a selection of data types and a history length; later runs fetch only data newer than the previous synchronization. Cache-backed query tools can also synchronize automatically when their data is stale, or bypass the database with `live=true`.

Body, sleep-summary, activity, workout, and trend queries normally use SQLite. Device and ECG queries always call the Withings API. Detailed sleep mode also uses a live request and returns minute-level sleep phases, with a maximum request range of seven days. OAuth handles authorization and refreshes access credentials; tokens are stored locally.

Trend analysis aggregates body, sleep, or activity data by week, month, or quarter. It can also compare two explicitly specified periods and returns averages, extrema, and change indicators where applicable.

## Setup and configuration

A Withings developer account and registered application are required. Register the application in the Withings developer dashboard and use `http://localhost:8585` as its callback URL. The setup process requires the application’s client ID and client secret.

Install the package with pip, or run it through `uvx`. The command `withings-mcp auth` opens the browser-based authorization flow and saves the resulting credentials in the configuration directory. Start the MCP server with the `withings-mcp` command; it uses stdio transport. Claude Code can register it with `claude mcp add` and the executable path.

By default, credentials and tokens are kept under `./config/`, while the SQLite database is `./withings.db`. Set `WITHINGS_MCP_CONFIG_DIR` to change the credential location or `WITHINGS_MCP_DB_PATH` to select another database path. The `withings-mcp doctor` command checks paths and credentials without making an API request.

## Tools and capabilities

- `withings_sync` downloads selected Withings data into SQLite and reports records synchronized.
- `withings_get_body` retrieves body-composition measurements with date and metric filters.
- `withings_get_sleep` returns nightly summaries or live, detailed sleep phases with heart-rate and respiratory data.
- `withings_get_activity` returns daily steps, distance, calories, and active time.
- `withings_get_workouts` lists workout sessions and can filter by workout category.
- `withings_get_heart` retrieves ECG records, heart rate, and AFib classifications from compatible devices.
- `withings_get_devices` lists connected devices with model, battery, firmware, and session information.
- `withings_trends` calculates period aggregates and comparisons for body, sleep, and activity data.

## Limitations and notes

Python 3.13 or newer is required. Detailed sleep requests are limited to seven days and do not return raw signal waveforms for ECG data. ECG access requires a Withings device with ECG capability, such as ScanWatch or BPM Core. The server depends on a registered Withings application and completed OAuth authorization. Health data and tokens remain in local storage, so the configuration and database paths should be protected appropriately.

_Full upstream README: https://allmcps.com/mcp/partymola-withings-mcp/readme_

