# wcli > wcli is the agent-first CLI and MCP server for the Withings Health Data API. It gives an AI agent (such as Claude or Codex, or any MCP client) access to a person's own Withings data as JSON: weight, body composition, blood pressure, heart rate, SpO2, temperature, activity, workouts, sleep, and ECG. wcli (short for Withings CLI; the command you type is `wcli`, current version v0.3.1) is an unofficial, independent, open-source project licensed under Apache-2.0. It is not affiliated with, endorsed by, or sponsored by Withings. "Withings" is a trademark of its owner. Output is always JSON on stdout (a single document, an NDJSON stream ending in a summary line, or a typed error envelope), never prose. Every command is described by `wcli schema`. Failures use `{"error":{"kind","code","reason","message","hint","status"?}}` with stable exit codes 0 to 8. Seventeen decoded commands cover every personal reading (`weighins`, `weight`, `body`, `bp`, `measures`, `activity`, `intraday`, `workouts`, `nights`, `sleep-stages`, `ecg`, `ecg-signal`, `stethoscope`, `stethoscope-signal`, `devices`, `goals`, `whoami`): they name every code Withings documents, give times as RFC 3339, and turn objects keyed by epoch seconds into lists sorted by time. Every Withings service action is also a raw command, `wcli `, the fallback that prints Withings' body unchanged: 63 commands across 16 services, of which 22 work with any self-serve developer app and 41 are partner-only. Every raw command takes `--dry-run`. Credentials live in the operating system keyring and never enter the model's context. The same binary is an MCP server (`wcli mcp serve`). You log in with your own Withings developer app (`wcli auth login`), so data goes from Withings to your machine and nowhere else. It is not a medical device and gives no medical advice. Status: v0.3.1 is verified against Withings' published OpenAPI document and a strict local fake server, and on 2 December 2026 its login and decoded read commands were run against one live account with a BodyFit scale. In our source audit of 23 public Withings MCP servers (1 December 2026), none both decoded all 16 BodyFit readings and covered all 12 personal health reads; wcli does both by the same scoring, and the table is in the full site content. `wcli schema` on the installed binary is the source of truth for command and flag names. The command was called `withings` before v0.2.0 and there is no alias; the GitHub repository, the Homebrew tap, the `WITHINGS_*` environment variables, and the `withings_*` MCP tool names keep their names. ## Docs - [Full site content](https://withingscli.com/llms-full.txt): The complete plain-text description of wcli, including install steps, agent setup, the command list, the output contract, and authentication. - [Homepage](https://withingscli.com): The wcli website. Request it with `Accept: text/markdown` to get the full text as markdown. - [Source, README, and issues](https://github.com/withingscli/withings): The full project documentation and source code on GitHub. - [AGENTS.md](https://github.com/withingscli/withings/blob/main/AGENTS.md): The operating manual for a model driving the CLI. ## Setup for agents - [Install](https://withingscli.com/llms-full.txt): `brew install withingscli/withings/wcli` (a Homebrew cask, macOS and Linux), or a binary from GitHub releases, or `go install github.com/withingscli/withings/cmd/wcli@latest`. - [Discover the tool](https://withingscli.com/llms-full.txt): Run `wcli schema --summary` for a compact index, then `wcli schema ` for one command's flags, enums, scopes, output shape, and exit codes, instead of parsing --help. - [Log in](https://withingscli.com/llms-full.txt): `wcli auth login` in a browser session, or `wcli auth login --print-url` followed by `wcli auth login --code ''` on a headless machine. `wcli auth login --demo` uses the Withings demo user. `WITHINGS_TOKEN` overrides the stored credentials with an access token. - [Add to Claude Code](https://withingscli.com/llms-full.txt): Run `claude mcp add withings -- wcli mcp serve` after installing the CLI and logging in. - [Add to Codex](https://withingscli.com/llms-full.txt): Run `codex mcp add withings -- wcli mcp serve`. - [MCP tool gating](https://withingscli.com/llms-full.txt): By default the server exposes only public, read-only tools. `--allow-write` adds mutating tools, `--partner` adds partner-only endpoints. Tools that would return OAuth tokens are never exposed. - [Read data](https://withingscli.com/llms-full.txt): Start with the decoded command for the data area (`wcli weighins --latest`, `wcli bp`, `wcli nights`, `wcli activity`, `wcli workouts`, `wcli ecg`); use the raw command only when you need Withings' untouched body. `--units imperial` converts and keeps the metric value. A weigh-in flagged `ambiguous` may belong to someone else: read the page's `warnings` before reporting it. - [Preview a request](https://withingscli.com/llms-full.txt): Add `--dry-run` to any raw `wcli ` command to print the exact request, secrets redacted, without sending it. - [Read streams safely](https://withingscli.com/llms-full.txt): With `--all`, commands emit NDJSON and always end with one `{"type":"summary", ...}` line. Read until the terminator and check `ok`. - [Recover from errors](https://withingscli.com/llms-full.txt): Branch on `.error.kind` and the exit code, not on message text. Read `.error.hint` for the next step. Exit code 8 (`forbidden`) means a missing OAuth scope, API plan, or partner contract: do not retry. ## Optional - [Releases](https://github.com/withingscli/withings/releases): Release binaries for macOS, Linux, and Windows. - [Homebrew tap](https://github.com/withingscli/homebrew-withings): The tap that holds the `wcli` cask. - [Withings developer portal](https://developer.withings.com/): Where you register the developer app used by `wcli auth login`. - [Withings API reference](https://developer.withings.com/api-reference): The underlying official API that wcli wraps. - [Author](https://akeemjenkins.com): Akeem Jenkins, who designed and built wcli.