wcli unofficial
v0.3.1 · Apache-2.0 · CLI + MCP server

Every reading, on the record for your agent.

wcli, short for Withings CLI, is an agent-first command line tool and MCP server for the Withings Health Data API. Your scale, blood pressure cuff, sleep mat and watch already keep a record of your body over time. This hands that record to an AI agent as JSON it can parse, never prose it has to guess at.

brew install withingscli/withings/wcli

Homebrew on macOS and Linux. Or grab a binary from GitHub releases (macOS, Linux, Windows), or install with Go.

CH I · weight · 12 weeks
72.3kg
75747372 SepOctNovnow
$ wcli weight --latest --pretty
{
  "measures": [
    { "time": "2026-11-30T13:00:00+01:00",
      "key": "weight", "value": 72.3, "unit": "kg",
      "model": "Body+",
      "raw": { "value": 72300, "exponent": -3 } }
  ],
  "count": 1, "more": false
}
Example data, response abridged. Withings sends value × 10^unit; the CLI does that arithmetic (72300 × 10^-3 = 72.3 kg) and keeps the original in raw.
Data · four channels, one record

The whole Withings API, as commands.

Seventeen decoded commands cover every personal reading, from weighins and bp to nights, workouts and ecg. They add a name beside every code Withings documents (workout category, sleep state, device model, AFib result, attribution), 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 <service> <action>, the fallback that prints Withings' body unchanged. An agent never has to remember any of them, because wcli schema lists every command, flag and exit code that the installed binary really has.

CH I · scale

Weight and body composition

wcli weighins returns one record per step on the scale: the measure groups it arrives as are merged, readings are keyed by name, and segment readings are nested by limb (left_arm, torso). weight and body give one record per value; body asks for all 16 readings Withings lists for the BodyFit scale. A weigh-in the scale could not attribute is flagged ambiguous. Raw: measure getmeas.

$ wcli weighins --latest
$ wcli body --units imperial
CH II · cuff, watch, thermometer

Blood pressure and vitals

Systolic and diastolic pressure with pulse from bp, SpO2 and temperature through measures --types. wcli ecg lists ECG recordings with the AFib result named, and ecg-signal returns one waveform with its sampling rate; stethoscope does the same for chest recordings. Raw: heart list, heart get, stetho list, stetho get.

$ wcli bp --latest
$ wcli ecg
CH III · sleep mat, watch

Sleep

wcli nights returns one record per night: durations in seconds, score, heart and breathing rates, and the night's events in time order. wcli sleep-stages returns the stages in order, each named (light, deep, rem) with its samples as timestamped lists, 24 hours per call. Raw: sleep getsummary, sleep get.

$ wcli nights --start 2026-11-01
$ wcli sleep-stages
CH IV · watch, tracker

Activity and workouts

wcli activity returns one record per day (steps, distance, calories, active time, heart rate), wcli intraday the samples within a day as a time-ordered list, and wcli workouts each workout with its activity named, start, end and duration. Raw: measure getactivity, measure getintradayactivity, measure getworkouts.

$ wcli activity --start 2026-11-01
$ wcli workouts --all
Coverage · the everyday commands, as reported by wcli schema
Decoded commandRaw fallbackWhat comes back
wcli weighinsmeasure getmeasOne record per weigh-in, its measure groups merged, with every reading keyed by name and segments nested by limb
wcli weight · body · bp · measuresmeasure getmeasOne record per value with the unit applied: weight, body composition, blood pressure, pulse, SpO2, temperature and the other measure types
wcli activitymeasure getactivityOne record per day: steps, distance, elevation, calories, active time, heart rate zones
wcli intradaymeasure getintradayactivitySamples (steps, heart rate, SpO2, HRV) as a list sorted by time, at most 24 hours per call
wcli workoutsmeasure getworkoutsWorkouts with the activity named, start, end, duration and every metric
wcli nightssleep getsummaryOne record per night: durations, score, heart and breathing rates, events
wcli sleep-stagessleep getThe stages of a night in order, each named, with heart rate, breathing and movement samples as lists; at most 24 hours per call
wcli ecg · ecg-signalheart list · heart getECG recordings with the AFib result named, and one waveform with its sampling rate, duration and wear position
wcli stethoscope · stethoscope-signalstetho list · stetho getStethoscope recordings, and the audio samples of one with their encoding, rate and chest position
wcli devicesuser getdeviceDevices with model, type, battery and last sync
wcli goalsuser getgoalsDaily steps, sleep duration and target weight
wcli notify subscribe · list · get · update · revokeRaw onlyNotification (webhook) subscriptions for new data
wcli whoami · auth · doctor · schema · mcp serveLocalWho is logged in, login, diagnostics, the JSON manifest, the MCP server

A decoded record keeps every number Withings sent and adds the name beside it. --units imperial on the decoded measure commands converts kg to lb, m to in and °C to °F and keeps the metric value in metric. A page holding an ambiguous weigh-in carries a warnings entry naming the command that confirms or rejects it. A test in the CLI repository fails unless every reading in Withings' per-device table (27 devices) is reachable through a decoded command and comes back named.

Raw commands are named after the services in the Withings API reference. In all there are 63 raw commands across 16 services: 22 work with any self-serve developer app, and 41 are partner-only, for companies with a Withings contract (anyone else gets a forbidden error, exit code 8). Reading data changes nothing. The commands that do change something at Withings are marked mutating in the schema; for an ordinary app those are notify subscribe, notify update, notify revoke, oauth2 revoke and oauth2 requesttoken.

Status: v0.3.1 is verified against Withings' published OpenAPI document and a strict local fake server. On 2 December 2026 the login and every decoded read command were also run against one live Withings account with a BodyFit scale; that account has no watch, sleep, blood pressure, ECG or stethoscope data, so those reads returned empty lists. The partner-only commands have not been run against a partner account.

Contract · what an agent can rely on

Built for a caller that cannot squint at a terminal.

A language model is the primary user, so the interface is a contract instead of a display. Eight things hold across the tool.

stdout is JSON, always

One JSON document, an NDJSON stream ending in a summary line, or an error envelope. Never a table, never a spinner, never a half-line. Pass --pretty when a person is reading.

One manifest instead of --help

wcli schema prints every command, flag, enum, OAuth scope, output shape and exit code as JSON, reflected off the command tree of the binary that is running.

$ wcli schema --summary   # compact index
$ wcli schema weight      # one command in full
$ wcli schema             # everything

A typed error envelope

Every failure has the same shape, and kind always agrees with the process exit code. Branch on either, and read hint for the next step. When Withings itself refused the call, status carries its status number. This one is real output, wrapped to fit.

$ wcli weight   # before logging in; exit code 2
{"error":{"kind":"auth","code":2,
  "reason":"no_credentials",
  "message":"no Withings credentials are configured",
  "hint":"run 'wcli auth login', or set WITHINGS_TOKEN to an access token"}}

Streams that say when they are done

--all follows pagination and streams one record per line, then exactly one summary line. If a later page fails, the summary still arrives with "ok":false and the error inside. Example data, records shortened.

$ wcli bp --all
{"key":"systolic_bp","value":118,"unit":"mmHg",...}
{"key":"diastolic_bp","value":76,"unit":"mmHg",...}
{"key":"heart_pulse","value":61,"unit":"bpm",...}
{"command":"bp","count":3,"ok":true,"requests":2,"type":"summary"}

Secrets stay out of the context window

OAuth tokens and your client secret live in the operating system keyring (macOS Keychain, Windows Credential Manager, Secret Service on Linux), or in an encrypted file where no keyring is reachable. The 3-hour access token is refreshed for you, and the managed commands never print a token. For a script, WITHINGS_TOKEN supplies an access token directly.

stderr is sanitized

Progress and a readable copy of any error go to stderr, stripped of ANSI escapes, bidi and zero-width characters. An agent never needs to parse it to know whether a call worked.

A dry run for every raw command

--dry-run validates the flags, prints the exact request with secrets redacted and sends nothing. It needs no credentials. Real output:

$ wcli notify subscribe --appli 1 \
    --callbackurl https://example.com/hook --dry-run --pretty
{
  "dry_run": true,
  "sent": false,
  "endpoint": "notify subscribe",
  "mutating": true,
  "auth": "bearer",
  "method": "POST",
  "url": "https://wbsapi.withings.net/notify",
  "headers": {
    "Authorization": "Bearer <redacted>",
    "Content-Type": "application/x-www-form-urlencoded",
    "User-Agent": "withings-cli/0.3.1"
  },
  "params": {
    "action": "subscribe",
    "appli": "1",
    "callbackurl": "https://example.com/hook"
  }
}

The awkward parts of the API, handled once

Withings answers every call with HTTP 200 and a status number in the body, encodes measures as value × 10^unit, wants epoch seconds on some endpoints and YYYY-MM-DD on others, keys intraday and sleep series by epoch seconds, and returns almost nothing for activity and sleep unless you name the fields.

The CLI maps the status to the error envelope, decodes the measures, accepts YYYY-MM-DD, RFC 3339 or unix seconds on any date flag, returns those series as lists sorted by time, and asks for every documented field by default. The endpoints limited to 24 hours per call refuse a longer window instead of silently dropping data; --all walks it in 24-hour chunks.

Exit codes · stable, one per error.kind
CodeKindWhat happenedWhat an agent should do
0okSuccessContinue
1internalInternal error (a bug)Report it as is, do not retry blindly
2authMissing, invalid or expired credentialsRun wcli auth login, do not loop
3usageBad flag, value or date, caught locally or reported by WithingsFix the call using wcli schema
4configConfig directory or keyring problemRun wcli doctor
5apiWithings failed or refused the request for another reasonInspect .error.reason and .error.status
6networkNetwork failure or timeout reaching WithingsRetry with backoff
7ratelimitRate limited (120 requests a minute per app on the free plan)Wait 60 seconds, then retry with backoff
8forbiddenNot entitled: missing OAuth scope, API plan or partner contractDo not retry. Re-authorize with the needed scopes, or tell the user
MCP · the same binary, as tools

Already an MCP server.

wcli mcp serve speaks the Model Context Protocol over stdio, using the credentials stored by wcli auth login. The decoded commands and the API endpoints become tools, driven by the same registry as the CLI and the schema manifest, so the three cannot drift apart. A failed tool call returns the same error envelope.

Claude Code

claude mcp add withings -- wcli mcp serve

Codex

codex mcp add withings -- wcli mcp serve

Any other MCP client

{
  "mcpServers": {
    "withings": {
      "command": "wcli",
      "args": ["mcp", "serve"]
    }
  }
}
Tool gating · a session starts read-only
Started asTools exposed
wcli mcp servePublic, read-only tools only: the decoded commands, the public read endpoints, login status and version
wcli mcp serve --allow-writeAdds the mutating tools, such as notification subscriptions. Each one takes dry_run
wcli mcp serve --partnerAdds the partner-only endpoints, which need a Withings partner contract

Tools that would return OAuth tokens are never exposed, whatever the flags. Tool arguments are the CLI flags in snake_case. There is no --all over MCP: each call returns one page, and you page with offset.

Compare · 23 servers, one audit

Every reading and every read.

We read the source of 23 public Withings MCP servers and scored each against two lists: the 16 readings Withings documents for the BodyFit scale, and the 12 personal health reads of the API. Two decoded all 16 readings, one covered all 12 reads, and none did both. wcli was built to do both.

Coverage · read from source, 1 December 2026
ProjectBodyFit readingsHealth readsRuns asLicence
wcli16 of 16 readings12 of 12 readsGo binary: CLI and MCP server, localApache-2.0
stefanocaronia/withings-mcp16 of 16 readings4 of 12 readsPython, localMIT
thomascoverstone/withings-mcp16 of 16 readings3 of 12 readsPython local, or Cloudflare WorkerMIT
akutishevsky/withings-mcp13 of 16 readings12 of 12 readsHosted, or self-hostMIT
mrstevefay/withings-mcp13 of 16 readings9 of 12 readsPython, localNo licence
jamesdelevoryas/withings-mcp13 of 16 readings6 of 12 readsTypeScript, self-hostNo licence
emilniclashofseth/personal-health-data-mcp13 of 16 readings4 of 12 readsJavaScript, localMIT, archived
davidmosiah/withings-mcp11 of 16 readings6 of 12 readsnpm, localMIT
owenobyrne/mcp-withings10 of 16 readings1 of 12 readsAWS LambdaNo licence
partymola/withings-mcp9 of 16 readings6 of 12 readsPyPI, local SQLite cacheGPL-3.0
jomargon/wellspring-mcp9 of 16 readings6 of 12 readsCloudflare WorkerApache-2.0
YpsilonTM/withings-mcp8 of 16 readings10 of 12 readsPython, localMIT
madebydia/withings-mcp8 of 16 readings1 of 12 readsPython, DockerMIT
bigshanu/withings-mcp7 of 16 readings7 of 12 readsPythonNo licence
IcaroBichir/mcp_withings6 of 16 readings4 of 12 readsPython, localMIT (declared)
brianokelly1/withings-mcp6 of 16 readings1 of 12 readsPython, localNo licence
gchallen/withings-mcp6 of 16 readings1 of 12 readsTypeScript, localISC (declared)
jlricon/withings-mcp5 of 16 readings1 of 12 readsVercelNo licence
jlxq0/withings-mcp3 of 16 readings1 of 12 readsRust, self-hostMIT
borgels/mcp-server-withings0 of 16 readings10 of 12 readsTypeScriptFSL-1.1, source available
Npab19/withings-mcp0 of 16 readings10 of 12 readsPython, DockerMIT
mattia-bugossi/withings-mcp-server0 of 16 readings7 of 12 readsAWS LambdaMIT (declared)
Schimmilab/withings-mcp-server0 of 16 readings7 of 12 readsPython, DockerMIT
insalata-fresca/withings-mcp0 of 16 readings1 of 12 readsC#, containerMIT

Scored on 1 December 2026 by reading each project's source at its latest commit; none was run against a Withings account, and a project may have changed since, so check its repository. A reading counts when the server returns it decoded and named, with each limb of a segment reading named; readings returned raw, unnamed or under a wrong name do not count. The 16 readings are the ones Withings' device table lists for BodyFit, and the 12 reads are body measures, daily activity, intraday activity, workouts, sleep summary, sleep detail, ECG list, ECG signal, stethoscope list, stethoscope signal, devices and goals.

wcli's row is our own scoring of our own tool, by the same rules, and wcli was written after the audit with that list in hand. On 2 December 2026 it was run against one live account with a BodyFit: 13 of the 16 readings arrived, decoded and named. Heart rate, vascular age and pulse wave velocity were not returned for that scale; Withings marks pulse wave velocity as EU only.

Install · four steps to a first reading

From nothing to your own data.

You bring your own Withings developer app, so your data goes from Withings to your machine and nowhere else. There is no hosted service in the middle and no account with this project.

  1. Install the binary

    Homebrew is the short path: the wcli cask from the withingscli/homebrew-withings tap that installs the prebuilt binary on macOS (Apple Silicon and Intel) and on Linux (x86_64 and arm64). Release archives for macOS, Linux and Windows are on GitHub releases with a cosign-signed checksum file, and Go users can build it directly.

    brew install withingscli/withings/wcli
    go install github.com/withingscli/withings/cmd/wcli@latest
  2. Create a Withings developer app

    Sign in at the Withings developer portal with your normal Withings account and create an application of the Public API integration kind. As its Callback URL enter exactly http://localhost:8989/callback. Withings gives you a client ID and a client secret. It is free, and you do it once. A localhost callback keeps the app in Withings' restricted mode, limited to 10 users, which is fine for reading your own data.

  3. Log in

    The login command asks for the client ID and secret, opens the Withings consent page in your browser, captures the redirect on a local listener, and stores the resulting tokens in your keyring.

    wcli auth login

    No browser on that machine? wcli auth login --print-url prints the address to open, and wcli auth login --code '<redirected URL>' finishes the login. The code is valid for 30 seconds. No devices yet? Withings has no public test environment, but wcli auth login --demo signs in as its demo user, which has dummy data.

  4. Check, then read

    wcli doctor runs a JSON checklist (config, keyring, network, clock, token), each failing check with its own hint. Then ask for data, or hand the tool to your agent.

    wcli doctor --pretty
    wcli weight --latest --pretty

Nothing here needs an account to try: wcli schema --summary, --dry-run and wcli doctor all work before you log in. The command was called withings before v0.2.0 and there is no alias: if you installed the old cask, run brew uninstall withings first, and point scripts and MCP client configs at wcli.

Agents: read llms.txt or llms-full.txt, or request this page with Accept: text/markdown.