withings-mcp

withings-mcp

Provides read-only access to Withings health metrics including body composition, sleep, workouts, and ECG data with local SQLite caching and trend analysis. Features incremental synchronization, automatic OAuth token refresh, and supports all 200+ Withings measurement types for comprehensive health tracking.

Category
Visit Server

README

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
  • All 200+ Withings measurement types supported (body comp, sleep, activity, workouts, ECG)
  • Automatic OAuth token refresh (access tokens: 3h, refresh tokens: 1 year)
  • Zero dependencies beyond mcp (HTTP via stdlib)
  • Python 3.13+

Tools

Tool Description
withings_sync Sync data from Withings API to local cache
withings_get_body Body composition (weight, fat%, muscle, bone, BP, SpO2)
withings_get_sleep Sleep summaries or detailed phase time-series
withings_get_activity Daily steps, distance, calories, active time
withings_get_workouts Workout sessions with type, duration, HR
withings_get_heart ECG recordings and AFib detection
withings_get_devices Connected devices with battery status
withings_trends Period averages, weekly/monthly/quarterly trends, comparisons

Prerequisites

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

Installation

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.

Configuration

Environment Variable Default Description
WITHINGS_MCP_CONFIG_DIR ./config/ Directory for credentials and tokens
WITHINGS_MCP_DB_PATH ./withings.db 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 (74 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: Rejects database files and credentials from commits

License

GPL-3.0-or-later

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured