weight-mcp
A personal calorie and protein counter MCP server for use inside claude.ai, enabling users to log meals from photos or text, track weight, and view an interactive dashboard.
README
weight-mcp
A personal calorie & protein counter delivered as an MCP server for use inside claude.ai. You log meals from photos or text in a normal Claude chat; this server counts them, tracks weight, and renders an interactive dashboard (weight graph + recently eaten) right in the conversation.
Single-user, self-hosted, by design. See SPEC.md for the rationale.
How it works
- MCP server (Streamable HTTP) exposes tools, a prompt, and an MCP Apps dashboard UI to claude.ai.
- In-process OAuth gate: claude.ai drives the full OAuth 2.1 + PKCE +
Dynamic Client Registration flow, but the only human step is entering a single
shared password (configured in
.env). There are no user accounts. - SQLite stores weights and food logs — one file under
data/.
Tools
| Tool | What it does |
|---|---|
log_food |
Record one eaten item (kcal, protein, …). |
record_weight |
Store a body-weight measurement. |
lookup_nutrition |
Query public nutrition databases (Open Food Facts, optional USDA). |
daily_progress |
Today's intake vs. your goal. |
set_goals |
Change the daily calorie/protein targets and floor/ceiling mode. |
show_dashboard |
Returns a link to your dashboard (weight graph + recent meals + today's progress) and renders it inline where the client supports MCP Apps UI. |
Configure
Copy .env.example to .env and set at least WEIGHT_MCP_PASSWORD and
WEIGHT_MCP_PUBLIC_BASE_URL. Nutrition sources default to Open Food Facts,
filtered to Germany; set WEIGHT_MCP_* to change region or enable USDA.
Goals are not env config — set them from chat with set_goals (they persist in
the database). Two modes: floor (eat at least the target — the default, for
under-eaters) and ceiling (stay under — for weight loss). Until you set your
own, the default is 2600 kcal / 150 g protein, floor.
Run
Local (dev):
uv sync
cp .env.example .env # then edit
uv run weight-mcp
Docker (local build):
docker compose up --build
For a real deployment you need public HTTPS (claude.ai connects from Anthropic's
cloud, not your device). Copy docker-compose.template.yml, put the server
behind a TLS reverse proxy, and set WEIGHT_MCP_PUBLIC_BASE_URL to that origin.
Add to claude.ai
Settings → Connectors → add a custom connector, paste your server's base URL
(https://<your-host> — the MCP endpoint and OAuth live at the origin root, so
there is no path to append). claude.ai opens the OAuth page; enter your password.
Done — start a chat and tell Claude what you ate.
Develop
uv run ruff check .
uv run mypy
uv run pytest
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.