- Home
- MCP servers
- Withings
Withings
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"schimmmi-withings-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"WITHINGS_CLIENT_ID=your_client_id",
"-e",
"WITHINGS_CLIENT_SECRET=your_client_secret",
"-e",
"WITHINGS_ACCESS_TOKEN=your_access_token",
"-e",
"WITHINGS_REFRESH_TOKEN=your_refresh_token",
"withings-mcp-server"
],
"env": {
"WITHINGS_CLIENT_ID": "your_client_id",
"WITHINGS_ACCESS_TOKEN": "your_access_token",
"WITHINGS_REDIRECT_URI": "http://localhost:8080/callback",
"WITHINGS_CLIENT_SECRET": "your_client_secret",
"WITHINGS_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}You can connect your Withings health data to an MCP client to query body measurements, activities, sleep, and more. This MCP server handles OAuth2 authentication with Withings, fetches data from the Withings Health API, and exposes it through a standardized interface that your client can consume.
How to use
Use this MCP server to access your Withings data from an MCP-enabled client. You authenticate once, and then you can retrieve measurements like weight and body fat, daily activity metrics, sleep details, workouts, and heart-rate data over a selected period. Tokens are refreshed automatically, so you can maintain continuous access without manual token management.
How to install
Prerequisites: you need Python or Docker, and you will run the MCP server with environment credentials for Withings.
# Option A: Docker (recommended)
# 1. Create Withings API Credentials in the Withings Developer Dashboard
# - Note your Client ID and Client Secret
# - Set Redirect URI to http://localhost:8080/callback
# 2. Configure environment variables for Docker
cp .env.example .env
# Edit .env and add credentials:
# WITHINGS_CLIENT_ID=your_client_id_here
# WITHINGS_CLIENT_SECRET=your_client_secret_here
# WITHINGS_REDIRECT_URI=http://localhost:8080/callback
# 3. Generate OAuth tokens (tokens saved to .env automatically)
python -m venv .venv
source .venv/bin/activate
pip install -e .
python generate_tokens.py
# 4. Build and run the container
docker build -t withings-mcp-server .
docker-compose up -d
# Option B: Local Python installation
# 1. Create a virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate
pip install -e .
# 2. Create Withings API Credentials as above and set Redirect URI
# 3. Configure environment variables
cp .env.example .env
# Edit .env and add credentials (same as above)
WITHINGS_CLIENT_ID=your_client_id_here
WITHINGS_CLIENT_SECRET=your_client_secret_here
WITHINGS_REDIRECT_URI=http://localhost:8080/callback
# 4. Run the server locally
python -m withings_mcp_server
Configuration and startup options
If you prefer running locally, you can run either the Docker image or a Python-based server. Use the shown commands to ensure the server starts and can perform OAuth flows and data retrieval.
Security and tokens
Tokens are generated through the OAuth flow and stored in the environment file. Access and refresh tokens are automatically refreshed when needed. Keep your credentials secure and do not commit the .env file to version control.
Testing the setup
After starting the server, you can verify the integration by exercising the exposed endpoints through your MCP client. The server handles token management and will refresh tokens as needed without manual intervention.
Known notes
All dates can be specified as YYYY-MM-DD or Unix timestamps when requesting data. The Withings API has rate limits; plan your polling cadence accordingly.
Available tools
get_authorization_url
Generates the OAuth2 authorization URL to start the Withings login flow.
get_user_info
Retrieves basic user information from the Withings account.
get_measurements
Fetches body measurements such as weight, fat percentage, and muscle mass.
get_activity
Retrieves daily activity data including steps, calories, distance, and elevation.
get_sleep_summary
Retrieves a summary of sleep data for a date range.
get_sleep_details
Retrieves detailed sleep data with sleep phases.
get_workouts
Retrieves workout or training sessions.
get_heart_rate
Retrieves heart rate measurements over a time period.