
Withings Mcp
io.github.partymola由 GitHub 账号 partymola 发布v0.11.0更新于 Nov 6, 2026
MCP server for the Withings Health API with OAuth, local SQLite cache, and trend analysis.
概览
面向 Withings 健康 API 的本地 MCP 服务器,把身体、睡眠、活动、锻炼和心脏数据同步到 SQLite 缓存并做趋势分析。
- 可以做什么
- 把 Withings 数据同步到本地 SQLite 缓存,支持增量同步或指定历史天数
- 从缓存查询身体成分、每日活动和锻炼记录,也可绕过缓存直接实时获取
- 读取睡眠摘要或逐分钟睡眠阶段明细,以及心电图与房颤记录
- 列出已连接设备及其电量状态
- 计算周期平均值、周/月/季度趋势和周期对比
- 适用场景
- 适合让助手回答关于自己 Withings 测量数据的问题,例如体重与身体成分、睡眠、步数、锻炼、心电图,并进行周期对比或长期趋势分析,也可离线使用缓存数据。
- 运行要求
- 需要 Python 3.13+ 及 pip 或 uv,以本地 stdio 进程运行。需要 Withings 开发者账号和已注册应用(回调地址为本地地址),并完成一次交互式 OAuth 授权,令牌保存在本地。可选环境变量 WITHINGS_MCP_CONFIG_DIR 和 WITHINGS_MCP_DB_PATH 指定凭据与数据库位置。同步和实时查询需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Withings Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
withings-mcp
[CI] [License: GPL v3] [Python 3.13+] [PyPI] [Glama MCP Server]
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
- Broad Withings coverage: 17 body-composition metrics plus sleep, daily activity, workouts, and ECG/AFib
- Automatic OAuth token refresh (access tokens: 3h, refresh tokens: 1 year)
- Zero dependencies beyond
mcp(HTTP via stdlib) - Python 3.13+ (tested on 3.13, 3.14 and 3.15, on Linux, macOS and Windows, in CI)
Tools
The cache-backed query tools auto-sync when their data is stale, and accept live=True to bypass the cache and fetch straight from the Withings API. withings_get_heart and withings_get_devices are always live. withings_get_sleep(detail=True) returns minute-by-minute sleep phases (live, up to 7 days per request).
Prerequisites
- Python 3.13+ (tested on 3.13, 3.14 and 3.15, on Linux, macOS and Windows, in CI)
- uv (recommended) or pip
- A Withings developer account and registered application
Installation
Or run it without installing with uvx withings-mcp. For development from a clone:
Setup
1. Register a Withings app
- Go to https://developer.withings.com/dashboard
- Create a new application
- Set the callback URL to
http://localhost:8585 - Note your Client ID and Client Secret
2. Authenticate
This opens your browser for Withings authorization. After approving, tokens are saved locally in config/.
3. Register with Claude Code
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.
If anything does not work - no data where you expect it, a sync that stops happening - run withings-mcp doctor. It reports the paths and credentials actually in use and what needs fixing, without making an API call.
You can also sync from the command line without an MCP client:
CLI
Configuration
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
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; created 0600 on POSIX - Windows ignores the mode and governs access by ACLs) - Error messages: Never contain health data values - only status codes
- Pre-commit hook: An optional hook (
scripts/check-no-data.sh) blocks database files, files underconfig/and large files from commits. It does not read file contents. Install it with the one-liner in CONTRIBUTING.md
Contributing
See CONTRIBUTING.md for development setup, the test workflow, and the pre-commit hook. Changes are tracked in CHANGELOG.md.
License
GPL-3.0-or-later
来源:README.md,提交 55228d9
工具
0版本历史
6- v0.11.0最新Nov 6, 2026
- v0.10.2Nov 6, 2026
- v0.10.1Nov 5, 2026
- v0.10.0Nov 4, 2026
- v0.9.0Nov 3, 2026
- v0.8.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分