Skip to content
unofficial WeightWatchers MCP

Set up the WeightWatchers MCP server

Node.js 20, a WeightWatchers login with e-mail and password, one sign-in. Then connect your AI client below, or use the ww command line straight away.

Unofficial. Not affiliated with WeightWatchers (WW International, Inc.). Uses the private API behind the WW apps, which may break and may violate the WW terms. What that means

Requirements

  • Node.js 20 or newer
  • A WeightWatchers account that signs in with e-mail and password
  • Region de (weightwatchers.de) is the tested one; see Region

Sign in

npx --package unofficial-weightwatchers-mcp ww login --email you@example.com

From a checkout: node bin/ww.js login --email you@example.com.

The password is asked without echo and sent only to auth.weightwatchers.<region>. It is not stored unless you ask for it (below). The command stores the session, a token and not the password, in ~/.weightwatchers/auth.json (mode 600).

Other ways to sign in:

HowWhen
ww login --browserNo terminal prompt wanted: a local page on 127.0.0.1 opens in your browser
ww login --password-stdinScripts: printf '%s' "$PW" | ww login --email ... --password-stdin
The ww_login toolFrom an AI client; opens the same local page, the password never passes through the chat
WW_PASSWORD in the environmentUsed by ww login instead of the prompt, and for unattended renewal

Staying signed in

The WW session lasts a few hours. When it expires, the client signs in again by itself if it can find your password, in this order:

  1. WW_EMAIL and WW_PASSWORD in the environment (for servers; the e-mail may also come from the stored sign-in)
  2. the system credential store, if you signed in with --save-password or ticked the box on the login page
OSStoreNeeds
macOSKeychainthe security tool (built in)
Linuxlibsecretsecret-tool (package libsecret-tools) and a running keyring
WindowsCredential ManagerWindows PowerShell 5.1 (least tested)

If neither exists, the next call after expiry fails with a clear message and you sign in again.

Region

WW_REGION or --region sets the domain suffix of your WW site: de (default), com, co.uk, ... Only de is tested. Other regions are experimental: they use the same endpoints, but nobody has confirmed they behave the same. The region you sign in with is stored and reused.

First commands

ww status                 # who is signed in, when the token expires
ww day                    # points used and left today
ww tracked                # what you tracked today
ww search "basmati rice"  # food search

Writing data

ww_track and ww_untrack add and remove real diary entries, and the recipe, food, meal, water and activity tools change real account data. Let your client ask before running them. To try them safely, track a quick entry with 0 points on a day you do not care about and remove it again.

Any MCP client

The MCP server speaks stdio. Every client needs the same things: a command, its arguments, and optionally environment variables. The server reads the session that ww login stored, so sign in first (Getting started), or give WW_EMAIL and WW_PASSWORD in env.

Variantcommandargs
npx (after the npm release)npx["-y", "unofficial-weightwatchers-mcp"]
Node and a checkoutnode["/absolute/path/to/unofficial-weightwatchers-mcp/src/index.js"]

Use an absolute path for the checkout: clients usually start servers with a different working directory than your shell. If node is not found (common with version managers such as nvm), use the absolute path of the node binary (which node, or where node on Windows).

The variables in Configuration can go into the client's env block; none are required. After changing a client configuration, restart the client. The server logs to stderr only; stdout carries the protocol.

Generic stdio

Run this command and speak MCP over its standard input and output:

npx -y unofficial-weightwatchers-mcp

The server name in the handshake is unofficial-weightwatchers-mcp. It supports the tools capability only. To inspect it by hand:

npx @modelcontextprotocol/inspector npx -y unofficial-weightwatchers-mcp

Signing in from the chat

The ww_login tool takes no password. It opens a local page where you type it in the browser, so the password does not pass through the AI client. ww_status shows the state without revealing any secret.

Environment variables

VariableDefaultPurpose
WW_REGIONde (or the region of the stored sign-in)Domain suffix of the WW site. Allowed: de, com, co.uk, fr, nl, be, ch, com.au, ca (a fixed list of WW-owned domains, so credentials can never go to a look-alike domain). de is tested, the others are experimental.
WW_EMAILnoneAccount e-mail for unattended sign-in. Needs WW_PASSWORD.
WW_PASSWORDnoneAccount password for unattended re-login on servers. Never written to disk. Takes precedence over the credential store.
WW_ALLOW_RAW_WRITESunsetSet to 1 to let ww_api_call send POST, PUT and DELETE. Without it the tool only does GET.
WW_API_KEYgeneratedAPI key of ww serve (at least 16 characters); overrides $WW_HOME/api-key. See HTTP API.
WW_HOME~/.weightwatchersConfig directory (auth.json, api-key).

Order for the region: --region / constructor option, then WW_REGION, then the stored sign-in, then de.

Files

$WW_HOME/auth.json, mode 600, directory mode 700, written atomically:

FieldMeaning
regionRegion of the sign-in (older files call this tld, still understood)
emailAccount e-mail
tokenIdWW session; renews the JWT; lasts a few hours
jwt, jwtExpiresAtCurrent access token and its expiry
memberIdMember ID from the token
savedAtWhen the file was written

There is no password field. A password field in a file from an older version is ignored, moved to the credential store when possible, and dropped the next time the file is written.

Delete the file or run ww logout to sign out. ww logout --keychain also removes the stored password.

Password handling

SourceHow it gets thereUsed when
EnvironmentWW_EMAIL and WW_PASSWORD set by youfirst choice for re-login; also signs in when no session is stored
Credential storeww login --save-password, or the checkbox on the ww_login pagesecond choice for re-login

ww status and ww_status show which source would be used (env, keychain, or null) without reading the password.

Docker

docker build -t unofficial-weightwatchers-mcp .
docker run -i --rm -v ww-data:/data \
  -e WW_EMAIL -e WW_PASSWORD -e WW_REGION unofficial-weightwatchers-mcp

The image runs the stdio server as an unprivileged user and keeps its session in /data. Pass the password through your orchestrator's secret mechanism, not in an image or a compose file in a repository.

Continue with