
cabird/loseit-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Unofficial MCP server and CLI for logging food to Lose It!
개요
An MCP server and CLI for logging food to Lose It!. ⚠️ 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. 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. .env is gitignored. The session token is cached at ~/.config/loseit-mcp/session.json with owner-only permissions and refreshes automatically when it expires. Register the stdio server with an MCP client: To host one server for multiple accounts, see DEPLOYMENT.md. The same operations are available directly, which is the easiest way to test: Add --dry-run to either log command to preview the math without writing, and --json for machine-readable output.
README
원문 README의 일부입니다. 원문 보기.
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_food |
Search the food database; returns food_ids |
describe_food |
Full nutrition and serving detail for one food |
get_diary |
A day’s entries with calories and macros, plus totals |
log_food |
Log a database food to a meal |
log_custom_food |
Log arbitrary calories/macros with no database match |
log_weight |
Record a weigh-in |
get_weight_history |
Read weigh-ins over a range, with min/max/change |
delete_entry |
Delete a diary entry |
whoami |
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.
Setup
uv sync
cp .env.example .env # then fill in your credentials
Configuration
Settings resolve in priority order: CLI flags → environment → .env → JSON
config file → defaults.
| Variable | Required | Description |
|---|---|---|
LOSEIT_EMAIL |
yes* | Lose It! account email |
LOSEIT_PASSWORD |
yes* | Lose It! account password |
LOSEIT_TOKEN |
no | A liauth JWT, used instead of email/password |
LOSEIT_HOURS_FROM_GMT |
no | UTC offset in whole hours; auto-detected |
LOSEIT_STRONG_NAME |
no | GWT permutation, if Lose It ships a new build |
LOSEIT_POLICY_HASH |
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 8000
Register 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
loseit-mcp diary 2026-07-25
loseit-mcp log -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 -d 2026-07-25
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"loseit": {
"command": "uv",
"args": ["run", "loseit-mcp", "serve"],
"cwd": "/absolute/path/to/loseit-mcp"
}
}
}