Repository avatar
AI Tools
v0.1.0
active

unofficial-weightwatchers-mcp

io.github.derdennis1012/unofficial-weightwatchers-mcp

Unofficial MCP server for WeightWatchers (WW): daily points, food diary, food search, points.

Documentation

Unofficial WeightWatchers MCP

Unofficial WeightWatchers MCP

Unofficial WeightWatchers (WW) MCP server, CLI and library: daily points, food diary, food search and points calculation from Claude, Cursor or your terminal.

CI License: MIT Node.js 20 or newer Website Buy me a coffee

An assistant saves a recipe in WeightWatchers, WW computes the points, and one serving is tracked for lunch (stylised mock with invented data, not a real client)

Disclaimer. This project is unofficial. It is not affiliated with, endorsed by, or supported by WW International, Inc. or WeightWatchers. "WeightWatchers", "WW" and related names and logos are trademarks of their owners; they are used here only to say what this software talks to, and no WW logo is part of this project. It uses a private, undocumented API that can change or break at any time. Using it may violate the WeightWatchers Terms of Service and could get your account restricted. Use it at your own risk. The write and destructive tools (diary, recipes, own foods, meals, favorites, water, activity, ww_api_call) change your real data. This project has no server and no telemetry, and its requests go only to WeightWatchers. Tool results (points, weight, diary entries) are passed to your AI assistant and processed by its provider. Not medical advice.

Logging a recipe for lunch through the MCP server (stylised mock, not a real client) The ww command line tool showing the day summary and tracked foods (invented data)

What you can do

WeightWatchers has no public API. This project uses the private API behind the WW apps (the old web tracker has been switched off) and gives you four ways to use it:

WayWhat it is
MCP server42 tools for Claude, Cursor, VS Code and any other MCP client
CLI (ww)Sign in, day summary, tracked foods, food search and read-only views of recipes, foods, meals, water, weight and activity in the terminal
LibraryThe typed WeightWatchers class for your own Node.js code, Express/Next.js backends and serverless functions (docs/library.md)
HTTP API (ww serve)Local REST + OpenAPI + MCP over HTTP for scripts, n8n and other languages (docs/http-api.md)

What the tools cover today: the day summary (points used, target, remaining, weekly allowance, nutrition against targets, weight), the food diary (list, add, change, remove, copy a day or meal), food search with portions, frequent and recent foods, the WW points formula for nutrition values, your own recipes, foods and saved meals (create, change, delete, with WW computing the points), favorite foods, water, activity (search, log, change, delete) and weight (read only), plus raw access to the private API for everything else. The full list is in docs/tools.md.

AreaToolsReadsWritesDeletes
Diaryww_day, ww_tracked, ww_track, ww_update_tracked, ww_copy_tracked, ww_untrack, ww_frequent_and_recent331
Food and pointsww_search_food, ww_calculate_points2
Own recipes, WW recipesww_list_my_recipes, ww_get_my_recipe, ww_create_my_recipe, ww_update_my_recipe, ww_delete_my_recipe, ww_calculate_recipe_points, ww_search_recipes421
Own foodsww_list_my_foods, ww_get_my_food, ww_create_my_food, ww_update_my_food, ww_delete_my_food221
Saved mealsww_list_my_meals, ww_create_my_meal, ww_update_my_meal, ww_delete_my_meal121
Favorite foodsww_list_favorite_foods, ww_add_favorite_food, ww_remove_favorite_food111
Waterww_get_water, ww_set_water (overwrites the day), ww_delete_water12
Activityww_search_activity, ww_calculate_activity_points, ww_activity_week, ww_log_activity, ww_update_activity, ww_delete_activity321
Weight (read only)ww_weight_entries, ww_weight_status2
Account, rawww_status, ww_login, ww_api_call111

Deleting is a soft delete at WW: a deleted recipe, food or meal only gets isActive: false, leaves all lists, and stays readable by its ID.

Example prompts for an AI client: "How many points do I have left today?", "What did I track for lunch?", "Find a generic entry for basmati rice and track 80 g for dinner", "How many points would a snack with 250 kcal, 12 g fat, 20 g carbs and 5 g protein be?", "Save this recipe in WW and track one serving for dinner", "Copy yesterday's breakfast to today", "Log 30 minutes of walking".

Region

The region is the domain suffix of your WW site (weightwatchers.<region>) and is set with WW_REGION or --region, default de. de is the only tested region. Others (com, co.uk, fr, nl, be, ch, com.au, ca) point to the same WW infrastructure and are accepted, but nobody has verified them; reports are welcome. Any other value is refused, so your password can never be sent to a look-alike domain.

Works well with

Unofficial Samsung Food MCP (source): your Samsung Food recipes, collections, meal plan and shopping lists in the same assistant. Recipes live there, your diary lives here. Run both servers side by side and ask for example: "Take my Samsung Food recipe 'Oat pancakes', save it in WeightWatchers and track one serving for breakfast."

  1. The assistant reads the recipe (ingredients, amounts, servings) from Samsung Food.
  2. It looks up every ingredient in WW with ww_search_food (generic hit, with its portion) and checks the result with ww_calculate_recipe_points.
  3. It creates the recipe in your WW account with ww_create_my_recipe, so WW computes the points itself instead of the assistant estimating them.
  4. It tracks the portion with ww_track (sourceType MEMBERRECIPE, portionSize = servings eaten).

The two projects do not depend on each other; nothing is shared except what the assistant passes between them. The other side of this workflow is described on the Samsung Food MCP site.

Install in Claude Desktop (one click)

  1. Download unofficial-weightwatchers-mcp.mcpb from the latest release (available once the first release is published).
  2. Double-click the file (or drag it into Claude Desktop, Settings, Extensions) and click Install.
  3. Ask Claude: "Log in to WeightWatchers". A page opens on your computer where you type your WW e-mail and password.

Details: docs/claude-desktop.md.

Quick start

Requires Node.js 20 or newer and a WeightWatchers account with an e-mail and password login.

1. Sign in once

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

The password is asked without echo, goes only to WeightWatchers and is not written to any file. The session (a token, not the password) is stored in ~/.weightwatchers/auth.json with mode 600. The WW session lasts a few hours. To renew it without asking you again, pick one:

OptionForHow
System credential storedesktopww login --save-password (macOS Keychain, Linux secret-tool, Windows Credential Manager)
Environment variablesserversWW_EMAIL and WW_PASSWORD in the environment of the process

Without either, the next call after the session expired fails with a hint to sign in again. In an AI client the ww_login tool opens a local sign-in page instead, so the password never passes through the chat. Details: docs/configuration.md and SECURITY.md.

2. Configure your client

{
  "mcpServers": {
    "weightwatchers": { "command": "npx", "args": ["-y", "unofficial-weightwatchers-mcp"] }
  }
}

Paths and formats for Claude Desktop, Claude Code, Cursor, VS Code and generic stdio clients are in docs/mcp-clients.md. Restart the client and ask: "How many points do I have left today?"

From source

git clone https://github.com/derdennis1012/unofficial-weightwatchers-mcp.git
cd unofficial-weightwatchers-mcp
npm install
node bin/ww.js login --email you@example.com
npm run check        # lint, generated docs, offline tests

CLI

ww login [--email you@example.com] [--region de] [--save-password] [--browser] [--password-stdin]
ww logout [--keychain]
ww status
ww day [YYYY-MM-DD]
ww tracked [YYYY-MM-DD]
ww search <text> [--limit n]
ww recipes | foods | meals | favorites [--limit n]
ww water [YYYY-MM-DD]
ww weight [--limit n]
ww activity [YYYY-MM-DD]
ww get <path> [--full]
ww tools

Every command accepts --json. See docs/cli.md.

Use as a library

npm install unofficial-weightwatchers-mcp
import { WeightWatchers, MemoryStorage, today } from 'unofficial-weightwatchers-mcp';

// Sign in once. The password is used once and never stored; the session goes to `storage`.
const ww = await WeightWatchers.login({
  email: 'you@example.com',
  password: process.env.WW_PASSWORD,
  region: 'de',
  storage: new MemoryStorage(), // or your own { load, save } on top of a database
});

const day = await ww.daySummary(today());
console.log(day.pointsDetails.dailyPointsRemaining);
await ww.track(today(), [{ name: 'Snack', points: 3, timeOfDay: 'anytime', isQuickAdd: true }]);
  • Typed (TypeScript types are included) and no file system needed: pass a storage to keep sessions per user in your own database; resume later with new WeightWatchers({ storage }) or WeightWatchers.resume({ tokenId }). Without options the Node entry uses the same session file as the CLI.
  • Errors are WWAuthError and WWApiError (with status and code); a 401 is retried once with a fresh token.
  • Not for browsers. WW's API allows no cross-origin calls. Use the library in a backend (Express, a Next.js route handler, serverless) or call ww serve. Bundlers get a node:-free build through the exports map.
  • A stored session is access to health data: encrypt it at rest. Details, all methods and examples: docs/library.md, examples/.

HTTP API

ww login
ww serve                      # http://127.0.0.1:8787, read-only with --read-only
curl -H "Authorization: Bearer $(ww serve --show-key)" http://127.0.0.1:8787/v1/day/2026-12-03

Loopback only by default, API key required, OpenAPI 3.1 at /openapi.json, a docs page at /docs, REST routes for the main areas, every tool at POST /v1/tools/{name}, and MCP over Streamable HTTP at /mcp. Rate and body limits, --read-only, and raw writes only with WW_ALLOW_RAW_WRITES=1. See docs/http-api.md.

Safety

  • Write tools change real data. ww_track adds diary entries, ww_untrack deletes them, the recipe, food, meal, favorite, water and activity tools create, change or delete account data (ww_set_water overwrites a day's water), ww_api_call can send any POST, PUT or DELETE once WW_ALLOW_RAW_WRITES=1 is set (GET only otherwise). Configure your MCP client to ask before running them; the tools carry readOnlyHint and destructiveHint annotations.
  • Credentials. No plaintext password file. Tokens, passwords and health values are never logged. See SECURITY.md for what is stored where.
  • Private API. It can change without notice. If something breaks, see docs/troubleshooting.md.

Limitations

  • Only e-mail and password logins work. Accounts that sign in only through a social login have no password to give.
  • Only region de is tested. The Windows credential store path is the least tested.
  • Not covered because the endpoints are not verified: writing weigh-ins, steps, writing sleep, barcode lookup and points for a whole meal. They are on the roadmap; weight is read only.
  • Activities cannot be logged for future days (WW accepts such a call but stores nothing, so the tool refuses it).
  • The WW web API is not documented by WW. docs/api.md describes what this project knows.

Documentation

docs/README.md has the full index: getting started, MCP clients, CLI, library, HTTP API, tool reference, configuration, troubleshooting, FAQ, architecture.

Contributing, security, license

CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, CHANGELOG.md, ROADMAP.md. MIT license, see LICENSE.

Made by Dennis Bölling. Like it? Buy me a coffee.