MCP server for Withings health data integration
SaferSkills independently audited Withings Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
[Help me pay for the servers on Patreon][patreon]
[patreon]: https://patreon.com/akutishevskyi?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink
A Model Context Protocol (MCP) server that brings your Withings health data into Claude. Access your sleep patterns, body measurements, workouts, heart data, and more through natural conversation.
🔒 Privacy First: This is my personal project, and the repository is intentionally public to demonstrate transparency. The code shows that no personal information is logged or stored maliciously. All sensitive data (tokens, user IDs) is encrypted at rest and automatically redacted from logs. You can review the entire codebase to verify this commitment to privacy.
⚠️ Disclaimer: This server is provided as-is without any guarantees or warranties. While I've made every effort to ensure security and privacy, I make no guarantees about availability, data integrity, or security. Use at your own risk. For production use cases, consider self-hosting your own instance.
https://withings-mcp.com/mcp → click AddThat's it! Ask Claude about your sleep, weight, workouts, or heart data.
Demo
This MCP server gives Claude access to your Withings health data, allowing you to:
All through natural conversation with Claude or any other MCP-compatible client.
If you just want to use this MCP server with Claude Desktop without hosting anything yourself, follow these steps:
#### Step 1: Add Connector in Claude Desktop
Withings (or any name you prefer)https://withings-mcp.com/mcpNote: If your MCP client doesn't support UI-based connector configuration, you can manually edit the config file instead. See the manual configuration guide below.
#### Step 2: Connect and Authorize
After authorization, Claude will have access to your Withings data!
Once connected, Claude can use these tools to access your data:
#### Sleep & Activity
get_sleep_summary - Sleep duration, stages (light/deep/REM), heart rate, breathing, sleep scoreget_activity - Daily steps, distance, calories, elevation, activity durationsget_intraday_activity - High-frequency activity data throughout the dayget_workouts - Detailed workout summaries with heart rate zones and metrics#### Body Measurements
get_measures - Weight, body composition, blood pressure, heart rate, temperature, VO2 max, and more#### Devices & Goals
get_user_devices - List of connected Withings devicesget_user_goals - Your health and fitness goals (steps, sleep, weight)#### Heart Health
list_heart_records - List of ECG recordingsget_heart_signal - Detailed ECG waveform data#### Stethoscope (if you have BPM Core)
list_stetho_records - List of stethoscope recordingsget_stetho_signal - Detailed audio signal dataTry asking Claude:
Want to run your own instance? Here's how to deploy this MCP server yourself.
https://your-domain.com/callbackThe hosted version includes a Google Analytics tag (G-ZMGF9WXL3W) in the static pages under public/. If you're forking this repo, remove or replace the GA snippet in public/index.html and public/health.html, and update the CSP headers in src/server/app.ts accordingly.
# Clone the repository
git clone https://github.com/your-username/withings-mcp.git
cd withings-mcp
# Install dependencies
bun install
# Generate encryption secret
bun run generate-secret
# Copy the output - you'll need it for environment variablesbun install -g supabase (or use brew install supabase/tap/supabase)supabase link --project-ref <your-project-ref>supabase db pushSUPABASE_URLSUPABASE_SECRET_KEYNote: Withings requires a publicly accessible URL for OAuth callbacks. For local development, use a tunneling service to expose your local server or deploy to a staging environment for testing.
# Copy environment template
cp .env.example .env
# Edit .env with your values
# WITHINGS_CLIENT_ID=your_client_id
# WITHINGS_CLIENT_SECRET=your_client_secret
# WITHINGS_REDIRECT_URI=https://your-tunnel-url.com/callback
# ENCRYPTION_SECRET=paste_generated_secret_here
# SUPABASE_URL=https://your-project.supabase.co
# SUPABASE_SECRET_KEY=your_service_role_key
# PORT=3000
# Run locally (Bun executes TypeScript directly — no build step)
bun run devMake sure your redirect URI in the .env file matches the publicly accessible URL pointing to your local server.
# The project runs TypeScript directly with Bun — no build step required.
bun run startDeploy to DigitalOcean App Platform (its Bun buildpack detects package.json and runs bun run start automatically), or any other host that supports Bun.
Set the following environment variables on your hosting platform:
| Variable | Required | Example |
|---|---|---|
WITHINGS_CLIENT_ID | Yes | your_client_id |
WITHINGS_CLIENT_SECRET | Yes | your_client_secret |
WITHINGS_REDIRECT_URI | Yes | https://your-domain.com/callback |
ENCRYPTION_SECRET | Yes | Generated from step 2 |
SUPABASE_URL | Yes | https://your-project.supabase.co |
SUPABASE_SECRET_KEY | Yes | Your Supabase service role key |
PORT | No | 3000 (or your platform's default) |
LOG_LEVEL | No | info |
ALLOWED_ORIGINS | No | https://example.com,https://app.example.com |
Go back to your Withings developer app and update the redirect URI to match your deployed URL: https://your-domain.com/callback
#### For Claude Desktop:
Withings (or any name you prefer)https://your-domain.com/mcp#### For Other MCP Clients:
Configure your MCP client with the following connection details:
https://your-domain.com/mcp/.well-known/oauth-authorization-server| Variable | Required | Description |
|---|---|---|
WITHINGS_CLIENT_ID | Yes | Your Withings app client ID |
WITHINGS_CLIENT_SECRET | Yes | Your Withings app client secret |
WITHINGS_REDIRECT_URI | Yes | OAuth callback URL (must match Withings app settings) |
ENCRYPTION_SECRET | Yes | 32+ character secret for token encryption (generate with bun run generate-secret) |
SUPABASE_URL | Yes | Your Supabase project URL (from Dashboard → Settings → API) |
SUPABASE_SECRET_KEY | Yes | Your Supabase service role key (from Dashboard → Settings → API) |
PORT | No | Server port (default: 3000) |
LOG_LEVEL | No | Logging level: trace, debug, info, warn, error (default: info) |
ALLOWED_ORIGINS | No | Comma-separated list of allowed CORS origins for browser clients |
bun run start # Run the server
bun run dev # Hot-reload mode
bun run typecheck # Type-check with tsc (no emit)
bun run build # Bundle for production (outputs to ./build)
bun run generate-secret # Generate encryption secret for ENCRYPTION_SECRET env variablesrc/
├── auth/ # OAuth 2.0 authentication & token storage
├── db/ # Supabase client & cleanup scheduler
├── server/ # Hono app, MCP endpoints, middleware
├── tools/ # MCP tools for Withings API (sleep, measure, user, heart, stetho)
├── types/ # TypeScript type definitions (Hono, Withings API)
├── withings/ # Withings API client
├── utils/ # Logger and encryption utilities
└── index.ts # Main entry point
supabase/
└── migrations/ # Database schema migrationsSee CLAUDE.md for detailed architecture documentation.
All Withings access tokens, refresh tokens, and authorization codes are encrypted at rest using AES-256-GCM:
Important: Keep your ENCRYPTION_SECRET:
bun run generate-secret)/authorize endpoint validates redirect_uri against the registered client's allowed URIs, preventing open redirect attacksunsafe-inline directivesThe custom logger automatically redacts all sensitive information:
You can review the logging implementation in src/utils/logger.ts.
This is a personal project, but contributions are welcome! Please:
MIT License - see LICENSE file for details.
Built with:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.