{"id":51594307,"url":"https://github.com/commandertvis/weight-mcp","last_synced_at":"2026-07-11T17:01:42.776Z","repository":{"id":366674853,"uuid":"1277290762","full_name":"CommanderTvis/weight-mcp","owner":"CommanderTvis","description":"A calorie counter delivered as a self-hosted Model Context Protocol server with Apps extension dashboard","archived":false,"fork":false,"pushed_at":"2026-07-04T10:37:08.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-04T12:13:40.249Z","etag":null,"topics":["calorie-counter","mcp","mcp-server","model-context-protocol","nutrition","python","self-hosted","sqlite","weight-tracker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CommanderTvis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-22T19:00:06.000Z","updated_at":"2026-07-04T10:37:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/CommanderTvis/weight-mcp","commit_stats":null,"previous_names":["commandertvis/weight-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CommanderTvis/weight-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommanderTvis%2Fweight-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommanderTvis%2Fweight-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommanderTvis%2Fweight-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommanderTvis%2Fweight-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CommanderTvis","download_url":"https://codeload.github.com/CommanderTvis/weight-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommanderTvis%2Fweight-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35368768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calorie-counter","mcp","mcp-server","model-context-protocol","nutrition","python","self-hosted","sqlite","weight-tracker"],"created_at":"2026-07-11T17:01:36.942Z","updated_at":"2026-07-11T17:01:42.759Z","avatar_url":"https://github.com/CommanderTvis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# weight-mcp\n\nA personal calorie \u0026 protein counter delivered as an MCP server for use\ninside [claude.ai](https://claude.ai). You log meals from photos or text in a\nnormal Claude chat; this server counts them, tracks weight, and renders an\ninteractive dashboard (weight graph + recently eaten) right in the conversation.\n\nSingle-user, self-hosted, by design. See [SPEC.md](./SPEC.md) for the rationale.\n\n## How it works\n\n- MCP server (Streamable HTTP) exposes tools, a prompt, and an MCP Apps\n  dashboard UI to claude.ai.\n- In-process OAuth gate: claude.ai drives the full OAuth 2.1 + PKCE +\n  Dynamic Client Registration flow, but the only human step is entering a single\n  shared password (configured in `.env`). There are no user accounts.\n- SQLite stores weights and food logs — one file under `data/`.\n\n## Tools\n\n| Tool | What it does |\n| --- | --- |\n| `log_food` | Record an eaten item (kcal, protein, …), numbered per day; re-logging a meal number overwrites it (edits). |\n| `delete_food` | Remove one of today's meals by its number. |\n| `record_weight` | Store a body-weight measurement. |\n| `lookup_nutrition` | Query public nutrition databases (Open Food Facts, optional USDA). |\n| `daily_progress` | Today's intake vs. your goal. |\n| `set_goals` | Change the daily calorie/protein targets and floor/ceiling mode. |\n| `show_dashboard` | Renders the dashboard inline as an MCP Apps panel (weight graph + recent meals + today's progress). |\n\n## Configure\n\nCopy `.env.example` to `.env` and set at least `WEIGHT_MCP_PASSWORD` and\n`WEIGHT_MCP_PUBLIC_BASE_URL`. Nutrition sources default to Open Food Facts,\nfiltered to Germany; set `WEIGHT_MCP_*` to change region or enable USDA.\n\nGoals are not env config — set them from chat with `set_goals` (they persist in\nthe database). Two modes: `floor` (eat *at least* the target — the default, for\nunder-eaters) and `ceiling` (stay under — for weight loss). Until you set your\nown, the default is 2600 kcal / 150 g protein, floor.\n\n## Run\n\nLocal (dev):\n\n```bash\nuv sync\ncp .env.example .env   # then edit\nuv run weight-mcp\n```\n\nDocker (local build):\n\n```bash\ndocker compose up --build\n```\n\nFor a real deployment you need public HTTPS (claude.ai connects from Anthropic's\ncloud, not your device). Copy `docker-compose.template.yml`, put the server\nbehind a TLS reverse proxy, and set `WEIGHT_MCP_PUBLIC_BASE_URL` to that origin.\n\n## Add to claude.ai\n\nCustomize → Connectors → \"Add custom connector\" (on Team/Enterprise:\nOrganization settings → Connectors → Add → Custom → Web), paste your server's\nbase URL (`https://\u003cyour-host\u003e` — the MCP endpoint and OAuth live at the origin\nroot, so there is no path to append). claude.ai opens the OAuth page; enter your\npassword. Done — start a chat and tell Claude what you ate.\n\n## Develop\n\n```bash\nuv run ruff check .\nuv run mypy\nuv run pytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandertvis%2Fweight-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommandertvis%2Fweight-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommandertvis%2Fweight-mcp/lists"}