withings-mcp
The withings-mcp server lets you sync, query, and analyze Withings health data using a local SQLite cache with automatic OAuth token management.
Sync data (
withings_sync): Pull body, sleep, activity, and workout data from the Withings API into a local SQLite cache, with incremental updates fetching only new data since the last sync.Body composition (
withings_get_body): Retrieve weight, fat percentage, muscle mass, bone mass, hydration, heart rate, blood pressure, and SpO2 for a given date range.Sleep data (
withings_get_sleep): Get nightly summaries (duration, sleep score, HR, respiratory rate, snoring) or detailed minute-by-minute phase breakdowns (awake, light, deep, REM).Daily activity (
withings_get_activity): Access step counts, distance, calories burned, and active time by intensity level.Workout sessions (
withings_get_workouts): View individual sessions with type, duration, heart rate, calories, and distance; filterable by category (e.g., cycling, running).ECG & heart health (
withings_get_heart): Fetch ECG recordings and atrial fibrillation (AFib) detection results live from compatible devices (ScanWatch, BPM Core).Connected devices (
withings_get_devices): List all connected Withings devices with model info, battery level, firmware, and last session date (fetched live).Trend analysis (
withings_trends): Compute weekly, monthly, or quarterly averages, min/max, and change indicators for body, sleep, or activity data, with period-over-period comparisons.
All data is stored locally for fast offline access and privacy. ECG and device info are fetched live from the API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@withings-mcpshow my weight trends for the last 3 months"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
withings-mcp
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
Tool | Description | Data source |
| Sync data from Withings API to local cache | Live API -> SQLite |
| Body composition (weight, fat%, muscle, bone, BP, SpO2) | Local cache (auto-syncs if stale) |
| Sleep summaries, or detailed phase time-series with | Cache (summary) / live (detail) |
| Daily steps, distance, calories, active time | Local cache (auto-syncs if stale) |
| Workout sessions with type, duration, HR | Local cache (auto-syncs if stale) |
| ECG recordings and AFib detection | Live API (always) |
| Connected devices with battery status | Live API (always) |
| Period averages, weekly/monthly/quarterly trends, comparisons | Local 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).
Related MCP server: Withings MCP Server
Prerequisites
Python 3.13+
uv (recommended) or pip
A Withings developer account and registered application
Installation
pip install withings-mcpOr 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
Create a new application
Set the callback URL to
http://localhost:8585Note your Client ID and Client Secret
2. Authenticate
.venv/bin/withings-mcp authThis 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-mcp4. 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.
If anything does not work - no data where you expect it, a sync that stops happening - run withings-mcp doctor. It reports the paths and credentials actually in use and what needs fixing, without making an API call.
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 syncCLI
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 doctor Check the setup and report what needs fixing
withings-mcp --version Print the installed package versionConfiguration
Environment Variable | Default | Description |
|
| Directory for credentials and tokens |
|
| SQLite 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/ -vSecurity
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
Maintenance
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
- Flicense-qualityDmaintenanceEnables 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
- AlicenseAqualityBmaintenanceEnables access to Withings Health API data including body measurements, activity tracking, sleep analysis, workouts, and heart rate monitoring through OAuth2 authentication.81MIT
- AlicenseCqualityDmaintenanceProvides access to body composition data from Renpho smart scales, enabling users to query weight, BMI, body fat percentage, muscle mass, and other health metrics with trend analysis over customizable time periods.3264MIT
- Alicense-qualityCmaintenanceRead-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
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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