
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 分