loseit-mcp
The server provides unofficial private API access to Lose It! for managing nutrition and weight. Capabilities include:
Search food: Find food items by name (
search_food).Describe food: Get nutrition and serving details for a food ID (
describe_food).Read diary: View a day's entries with calories, macros, and totals (
get_diary).Log database food: Add a food to a meal with portion control; dry-run supported (
log_food).Log custom food: Record entries with arbitrary calories/macros; dry-run supported (
log_custom_food).Record weight: Log a weigh-in; dry-run supported (
log_weight).View weight history: Retrieve weigh-ins over a range (
get_weight_history).Delete entries: Remove a diary entry, with local backup (
delete_entry).Check account: Display authenticated user (
whoami).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@loseit-mcp search for Greek yogurt"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
loseit-mcp
An MCP server and CLI for logging food to Lose It!.
⚠️ Unofficial. Lose It! publishes no public API. This talks to the private GWT-RPC endpoint used by the Lose It! web app, so it can break whenever they ship a new web build.
Tools
Tool | Description |
| Search the food database; returns |
| Full nutrition and serving detail for one food |
| A day's entries with calories and macros, plus totals |
| Log a database food to a meal |
| Log arbitrary calories/macros with no database match |
| Record a weigh-in |
| Read weigh-ins over a range, with min/max/change |
| Delete a diary entry |
| Show the authenticated account |
log_custom_food exists because updateFoodLogEntry carries the food's name,
brand, and nutrient map inline — so an entry can describe a food the database
has never heard of. Use it for restaurant meals, homemade dishes, or any
portion where forcing a database match would distort the numbers.
Related MCP server: nutrition-mcp
Setup
uv sync
cp .env.example .env # then fill in your credentialsConfiguration
Settings resolve in priority order: CLI flags → environment → .env → JSON
config file → defaults.
Variable | Required | Description |
| yes* | Lose It! account email |
| yes* | Lose It! account password |
| no | A |
| no | UTC offset in whole hours; auto-detected |
| no | GWT permutation, if Lose It ships a new build |
| no | GWT policy hash, if Lose It ships a new build |
* Not required if LOSEIT_TOKEN is set.
.env is gitignored. The session token is cached at
~/.config/loseit-mcp/session.json with owner-only permissions and refreshes
automatically when it expires.
Running the server
loseit-mcp serve # stdio (default)
loseit-mcp serve --transport streamable-http --port 8000Register the stdio server with an MCP client:
{
"mcpServers": {
"loseit": {
"command": "uv",
"args": ["run", "loseit-mcp", "serve"],
"cwd": "/absolute/path/to/loseit-mcp"
}
}
}To host one server for multiple accounts, see DEPLOYMENT.md.
CLI
The same operations are available directly, which is the easiest way to test:
loseit-mcp search "greek yogurt" -n 5
loseit-mcp describe <food_id>
loseit-mcp diary 2026-07-25
loseit-mcp log <food_id> -m lunch -a 120 -u g
loseit-mcp log-custom "Caesar Salad" 620 -m lunch -b "Gastrohub" -p 46 -c 18 -f 40
loseit-mcp weigh 199.2
loseit-mcp weights -n 14
loseit-mcp delete <entry_id> -d 2026-07-25Add --dry-run to either log command to preview the math without writing, and
--json for machine-readable output.
Two more, for hosted deployments:
loseit-mcp gen-secret # a secret for LOSEIT_URL_SECRET
loseit-mcp enroll https://<host> # get a credential URL for a clientA hosted deployment also serves a self-service enrollment page at /: someone
enters their Lose It! email and password and gets their own MCP URL back, ready
to paste into Claude, ChatGPT, or any other MCP client. Credentials are checked
against Lose It before a URL is issued, so a typo fails immediately instead of
producing a link that silently doesn't work.
The page is a single self-contained document under a strict CSP — no external scripts, styles, or fonts — so nothing but Lose It ever sees the credentials. Nothing is stored: the password is used once, in memory, and then encrypted into the URL itself, which is why there is no database and no account system.
Notes
Deleting writes a recoverable copy to local trash before the wire call.
When Lose It changes their private API, tools return an explanation of what broke and what the operator needs to refresh, rather than a decoder traceback — see
errors.py.Hosted deployments rate-limit per client address and per credential, since an address alone is a weak identity behind a NAT pool. Enrollment adds a third limit, per email address, so verifying credentials can't be used to guess them.
/healthzreports the running version and commit, so you can tell what is actually deployed without reading logs.Weights carry no unit over the wire; the number is interpreted in whatever unit the account displays (lb or kg).
saturated_fat_gis not recorded. The upstream SDK's payload builder filters that nutrient ordinal out, solog_custom_foodreports it in anignored_nutrientsfield rather than claiming to have logged it. Every other macro goes through.Weight history is fetched in windows and bisected further when a response is too large for the SDK decoder — an unchunked year-long query would otherwise silently return "no weigh-ins".
Relative dates (
today/yesterday) resolve in the account's timezone, not the host's, so a server in another region doesn't log to the wrong day.Fractional portions of database foods can display a misleading unit (half a banana rendering as "1/4 Each") because the server's canonical serving count differs from the food's native unit. Calories stay correct, but
log-customis the more predictable route for odd portions.
Architecture
The GWT-RPC wire format is handled by the
phitoduck/lose-it SDK. This project
adds email/password authentication (the SDK expects you to supply a JWT
yourself, and its browser-cookie import does not support Windows), the
custom-food logging path, weight recording via saveRecordedWeight (captured
from the web app's weigh-in widget), and the MCP server and CLI layers.
License
0BSD — the BSD Zero Clause License. Use it, change it, ship it, sell it. No attribution, no notice, no conditions of any kind.
This is deliberate. If FitNow (the makers of Lose It!) want any part of this, they should take it and treat it as their own — no permission needed, nothing to negotiate, no obligation to credit me. The same goes for anyone else.
Two things a license cannot do, stated plainly:
Trademark is separate. "Lose It!" is a registered trademark of FitNow, Inc. This project is unofficial and unaffiliated; the license grants no rights in their marks.
Dependencies keep their own terms. They are all permissive (MIT, BSD-3, Apache-2.0), but the
lose-itSDK is MIT and asks that its copyright notice be preserved. Anyone vendoring this code should either keep that notice or replace the dependency.
Available Tools
8 toolsdelete_entryA
Delete a diary entry. Get the entry_id from get_diary for the same day. A recoverable copy is written to local trash before deleting.
Inputs: entry_id (required), date. Returns: object
describe_foodA
Get full nutrition detail and serving information for one food, identified by the food_id returned from search_food.
Inputs: food_id (required). Returns: object
get_diaryA
Read the food diary for a day: every logged entry with calories and macros, plus the day's totals. Each entry carries an entry_id for delete_entry.
Inputs: date. Returns: object
log_custom_foodA
Log a food by its exact nutrition values, without needing a match in the food database. Use this for restaurant meals, homemade dishes, or anything where you know the calories and macros but search_food has no good match. Values are per serving.
Inputs: name (required), calories (required), date, meal, +11 more. Returns: object
log_foodB
Log a food to a meal in the diary. Specify the portion EITHER as serving_amount + serving_unit (e.g. 120 and 'g') OR as servings (a multiplier of the food's default serving). Set dry_run to preview.
Inputs: food_id (required), date, meal, dry_run, +3 more. Returns: object
log_weightA
Record a weigh-in for a day. The unit follows the account's display setting (lb or kg).
Inputs: weight (required), date, dry_run. Returns: object
search_foodA
Search the Lose It! food database. Returns candidate foods with a food_id to pass to log_food or describe_food.
Inputs: query (required), limit. Returns: result
whoamiA
Show which Lose It! account this server is authenticated as.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: diary reading, food searching, nutrition detailing, two types of food logging, entry deletion, weight logging, and account info. No overlap that would confuse an agent.
Tools mostly follow a verb_noun pattern (get_diary, search_food, log_food, delete_entry, log_weight). The exception is 'whoami', which is a standard command but doesn't fit the verb_noun convention, causing minor inconsistency.
With 8 tools, the server is well-scoped for a food and weight tracking service. Each tool earns its place, covering diary, food database, logging, weight, and account queries.
Core workflows are covered: diary reading, food search and description, logging (both database and custom), deletion, weight logging, and account info. Missing update/edit functionality for diary entries, but agents can delete and re-log as a workaround.
Maintenance
Related MCP Connectors
Unlock the power of food transparency with our Open Food Facts MCP server. Easily look up any food
Nutrition tracking from any MCP client. Free on web and app; MCP access is part of Munch Premium.
The official MCP Server for the Mux API
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for managing food diary, nutrition tracking, meal planning, and weight logging via the FatSecret Platform API.15MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for USDA nutrition data lookup, meal logging, and daily macro tracking.40 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server that reads local SQLite database populated by a Playwright scraper to provide daily summary, food log, weight history, and water log from LoseIt.MIT
- AlicenseNot gradedqualityBmaintenanceTracks macros and logs meals via plain language by exposing a local USDA food database as an MCP server.MIT