
Withings Health Data
io.github.akutishevsky由 GitHub 账号 akutishevsky 发布v1.3.0更新于 Nov 2, 2026
MCP server for Withings health data — sleep, activity, heart, and body metrics.
概览
远程 MCP 服务器,让助手连接你的 Withings 账户,读取并分析睡眠、活动、身体、锻炼和心脏数据。
- 可以做什么
- 获取睡眠摘要和分钟级 HRV,包括睡眠阶段、心率和呼吸数据
- 读取每日及日内活动:步数、距离、卡路里、爬升和活动时长
- 查询体重、身体成分、血压、体温、VO2 max 等身体测量数据
- 查看带心率区间的锻炼记录,以及已连接设备和健康目标
- 列出 ECG 与听诊器记录,并获取其波形或音频信号数据
- 适用场景
- 适合想用自然语言向助手询问自己 Withings 健康趋势的场景,例如睡眠质量、体重变化、静息心率、锻炼强度或目标完成情况,无需手动导出数据。
- 运行要求
- 需要一个已连接设备的 Withings 账户,以及支持远程连接器或手动配置的 MCP 客户端。托管端点使用 OAuth 2.0,需在浏览器中登录 Withings 完成授权。自行部署还需 Bun、带客户端 ID 和密钥的 Withings 开发者应用、Supabase 项目,以及环境变量 WITHINGS_CLIENT_ID、WITHINGS_CLIENT_SECRET、WITHINGS_REDIRECT_URI、ENCRYPTION_SECRET、SUPABASE_URL 和 SUPABASE_SECRET_KEY。
安装
在 SourceWeft 中
- 打开 控制台中的 Withings Health Data,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.akutishevsky%2Fwithings/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"withings-health-data": {
"type": "http",
"url": "https://withings-mcp.com/mcp"
}
}
}README
Withings MCP Server
Help me pay for the servers on Patreon
[Quality Gate Status] [Bugs] [Code Smells] [Lines of Code] [Reliability Rating] [Security Rating] [Maintainability Rating] [Vulnerabilities]
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.
Quick Setup
- Open Claude Desktop → Customize → Connectors
- Click + → Add Custom Connector
- Set URL to
https://withings-mcp.com/mcp→ click Add - Click Connect and authorize with your Withings account
That's it! Ask Claude about your sleep, weight, workouts, or heart data.
Demo
Table of Contents
- Quick Setup
- Demo
- What Can You Do With This?
- For End Users: Using the Hosted Server
- For Developers: Self-Hosting
- Security Features
- Contributing
- License
- Support
- Acknowledgments
What Can You Do With This?
This MCP server gives Claude access to your Withings health data, allowing you to:
- Analyze your sleep: Ask about sleep quality, duration, deep sleep stages, heart rate during sleep
- Track body metrics: Weight trends, body composition, blood pressure, heart rate over time
- Review workouts: Analyze exercise patterns, calories burned, heart rate zones
- Monitor heart health: Access ECG recordings and detailed heart data
- Set and track goals: Review your fitness and health goals
- Identify patterns: Find correlations between sleep, activity, and other metrics
- Generate insights: Get AI-powered analysis of your health trends
All through natural conversation with Claude or any other MCP-compatible client.
For End Users: Using the Hosted Server
If you just want to use this MCP server with Claude Desktop without hosting anything yourself, follow these steps:
Prerequisites
- A Withings account with connected devices
- Claude Desktop or any other MCP-compatible client installed on your computer
Setup Instructions
Step 1: Add Connector in Claude Desktop
- Open Claude Desktop
- Go to Customize (in the sidebar or menu)
- Navigate to the Connectors section
- Click the + button to add a new connector
- Select Add Custom Connector
- Fill in the following details:
- Name:
Withings(or any name you prefer) - Remote MCP server URL:
https://withings-mcp.com/mcp
- Name:
- Click Add
Note: 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
- In the Connectors settings, find the Withings connector you just added
- Click Connect next to the connector
- Your web browser will open with the Withings authorization page
- Log in to your Withings account
- Review and approve the permissions requested
- You'll be redirected back and the connection will be complete
After authorization, Claude will have access to your Withings data!
Available Tools
Once connected, Claude can use these tools to access your data:
Sleep & Activity
get_hrv- Minute-level RMSSD, SDNN, and quality scores captured during sleepget_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 data
Example Conversations
Try asking Claude:
- "How has my sleep quality been over the past week?"
- "Show me my weight trend for the last month"
- "What's my average resting heart rate?"
- "Did I hit my step goal this week?"
- "Compare my workout intensity between this month and last month"
- "When did I sleep best this month?"
Privacy & Security
- Encrypted tokens: All authentication tokens and authorization codes are encrypted using AES-256-GCM before storage
- No logging of personal data: The code is public - you can verify that no sensitive information is logged
- Automatic redaction: All user IDs, tokens, and credentials are automatically redacted from system logs
- OAuth 2.0: Industry-standard secure authentication with PKCE support and redirect URI validation
- Session security: MCP sessions are bound to the authenticated user, preventing cross-user access
- You're in control: Revoke access anytime from your Withings account settings
For Developers: Self-Hosting
Want to run your own instance? Here's how to deploy this MCP server yourself.
Prerequisites
- Bun 1.1+ installed
- A Withings Developer Account
Step 1: Create Withings Application
- Go to Withings Developer Portal
- Create a new application
- Note your Client ID and Client Secret
- Set your Redirect URI to:
https://your-domain.com/callback- This must be a publicly accessible URL (localhost is not supported by Withings)
- Can be any domain where you'll host the server (e.g., Fly.io, Railway, your own server, etc.)
Important: Remove Google Analytics
The 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.
Step 2: Clone and Setup
Step 2.5: Set Up Supabase Database
- Create a free project at Supabase
- Install the Supabase CLI:
bun install -g supabase(or usebrew install supabase/tap/supabase) - Link your project:
supabase link --project-ref <your-project-ref> - Apply the database migrations:
supabase db push - Get your credentials from Dashboard → Settings → API:
- Project URL →
SUPABASE_URL - Service role key →
SUPABASE_SECRET_KEY
- Project URL →
Step 3: Local Development
Note: 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.
Make sure your redirect URI in the .env file matches the publicly accessible URL pointing to your local server.
Step 4: Deploy to Production
Deploy 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:
Step 5: Update Withings App Settings
Go back to your Withings developer app and update the redirect URI to match your deployed URL:
https://your-domain.com/callback
Step 6: Configure Your MCP Client
For Claude Desktop:
- Open Claude Desktop
- Go to Customize → Connectors section
- Click the + button, then select Add Custom Connector
- Fill in the following details:
- Name:
Withings(or any name you prefer) - Remote MCP server URL:
https://your-domain.com/mcp
- Name:
- Click Add
- Click Connect next to the connector to authorize
For Other MCP Clients:
Configure your MCP client with the following connection details:
- Server URL:
https://your-domain.com - Transport: Streamable HTTP
- Endpoint:
/mcp - Authentication: OAuth 2.0
- Discovery URL:
/.well-known/oauth-authorization-server
Environment Variables Reference
Development Commands
Project Structure
See CLAUDE.md for detailed architecture documentation.
Security Features
Token Encryption
All Withings access tokens, refresh tokens, and authorization codes are encrypted at rest using AES-256-GCM:
- Algorithm: AES-256-GCM (authenticated encryption)
- Key Derivation: PBKDF2 with 100,000 iterations
- Defense in Depth: Even if the database is compromised, tokens remain protected
Important: Keep your ENCRYPTION_SECRET:
- At least 32 characters long
- Randomly generated (use
bun run generate-secret) - Secure and never committed to version control
- Consistent across server restarts
OAuth Hardening
- Redirect URI validation: The
/authorizeendpoint validatesredirect_uriagainst the registered client's allowed URIs, preventing open redirect attacks - Single-use auth codes: Authorization codes are atomically consumed to prevent replay attacks (per RFC 6749)
- PKCE support: SHA-256 code challenge method for enhanced security
- Startup validation: Server refuses to start if required environment variables are missing
Transport Security
- Session-token binding: MCP sessions are bound to the bearer token that created them, preventing cross-user session hijacking
- JSON-RPC validation: All incoming messages are validated against the JSON-RPC 2.0 specification before processing
- Request body limits: 1MB global limit to prevent memory exhaustion
- HTTPS redirect: HTTP requests are automatically redirected to HTTPS in production
- Strict CSP: Content Security Policy with no
unsafe-inlinedirectives - Atomic rate limiting: PostgreSQL function with row-level locking prevents race conditions
Privacy-Safe Logging
The custom logger automatically redacts all sensitive information:
- ✅ Operational events and errors logged
- ❌ No tokens, credentials, or auth codes
- ❌ No user IDs or personal information
- ❌ No API request/response payloads with sensitive data
You can review the logging implementation in src/utils/logger.ts.
Contributing
This is a personal project, but contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
MIT License - see LICENSE file for details.
Support
- Issues: Report bugs or request features on GitHub Issues
- Withings API: See Withings API Documentation
- MCP Protocol: See Model Context Protocol Documentation
Acknowledgments
Built with:
- Model Context Protocol by Anthropic
- Withings API
- Hono web framework
- Supabase for database
- Bun runtime
来源:README.md,提交 a7f78f5
工具
0版本历史
1- v1.3.0最新Sep 16, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分