withings-mcp
withings-mcp
用于 Withings Health API 的 MCP 服务器,具备 OAuth、本地 SQLite 缓存和趋势分析功能。
此服务器与其他 Withings MCP 服务器的区别:
本地 SQLite 缓存,用于快速离线查询和历史趋势分析
增量同步 - 仅获取自上次同步以来的新数据
支持所有 200 多种 Withings 测量类型(身体成分、睡眠、活动、锻炼、心电图)
自动 OAuth 令牌刷新(访问令牌:3 小时,刷新令牌:1 年)
除
mcp外零依赖(使用标准库进行 HTTP 通信)Python 3.13+
工具
工具 | 描述 |
| 将数据从 Withings API 同步到本地缓存 |
| 身体成分(体重、体脂率、肌肉量、骨量、血压、血氧饱和度) |
| 睡眠摘要或详细的阶段时间序列 |
| 每日步数、距离、卡路里、活动时间 |
| 包含类型、持续时间、心率的锻炼会话 |
| 心电图记录和房颤检测 |
| 带有电池状态的已连接设备 |
| 周期平均值、周/月/季度趋势、对比分析 |
Related MCP server: Withings MCP Server
先决条件
Python 3.13+
uv(推荐)或 pip
Withings 开发者账户和已注册的应用程序
安装
git clone https://github.com/partymola/withings-mcp.git
cd withings-mcp
uv venv --python 3.13 .venv
uv pip install -e .设置
1. 注册 Withings 应用
创建一个新应用
将回调 URL 设置为
http://localhost:8585记录您的 Client ID 和 Client Secret
2. 身份验证
.venv/bin/withings-mcp auth这将打开浏览器进行 Withings 授权。批准后,令牌将保存在本地的 config/ 目录中。
3. 在 Claude Code 中注册
claude mcp add -s user withings -- /path/to/withings-mcp/.venv/bin/withings-mcp4. 首次同步
在 Claude Code 中输入:“Sync my Withings data”
这将运行 withings_sync 来填充本地缓存。后续同步仅会获取新数据。
配置
环境变量 | 默认值 | 描述 |
|
| 凭据和令牌的目录 |
|
| SQLite 数据库路径 |
示例提示词
“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”
开发
# 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安全性
只读:没有任何工具会修改 Withings 服务器上的数据
本地存储:健康数据保留在您的本地 SQLite 数据库中
令牌存储:OAuth 令牌存储在
config/中(已加入 gitignore,文件权限为 0600)错误消息:绝不包含健康数据值 - 仅包含状态码
预提交钩子 (Pre-commit hook):拒绝将数据库文件和凭据提交到代码库
贡献
请参阅 CONTRIBUTING.md 了解开发设置、测试工作流程和预提交钩子。变更记录在 CHANGELOG.md 中。
许可证
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