nutrition-mcp
Click on "Install 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., "@nutrition-mcpLog my lunch: chicken salad with olive oil, 520 calories"
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.
Nutrition MCP
A remote MCP server for personal nutrition tracking — log meals with calories, macros, fiber and total sugar, log water and body weight, review nutrition history, and import an existing food diary from another app, all through conversation. Alcohol tracking is opt-in and off by default.
Help me pay for the servers on Patreon
Quick Start
The current runtime is a single-user, no-auth Bun server backed by local
PostgreSQL. It exposes the MCP protocol at POST /mcp; there is no
Supabase, OAuth, email/password, or account-registration step.
bun install
cp .env.example .env
# Ensure PostgreSQL is running and DATABASE_URL points at the database to use.
bun run startThen configure an MCP client with http://localhost:8080/mcp. The hosted URL
https://nutrition-mcp.com/mcp is a deployment-specific endpoint, not a
different authentication flow.
Switching from another tracker? See the nutrition-app alternatives — how it compares to MyFitnessPal, Cronometer, Lose It!, MacroFactor, Yazio, and Lifesum. Bring your history with you: say "import my meals" and an importer opens in the chat, where you pick the CSV you exported from your old app, map its columns, and check what will be added before anything is saved. Exports from MyFitnessPal, Cronometer, Lose It! and MacroFactor are recognised automatically; any other CSV works by mapping its columns yourself. In clients that can't show in-chat panels, paste the export instead and the AI imports it for you. If your export has an alcohol column and you want it kept, turn alcohol tracking on before importing — the importer skips that column while tracking is off, and re-importing the same file later won't backfill it.
Related MCP server: nutrition-mcp
Demo

Read the story behind it: How I Replaced MyFitnessPal and Other Apps with a Single MCP Server
Tech Stack
Bun — runtime and package manager
Hono — HTTP framework
MCP SDK — Model Context Protocol over Streamable HTTP
PostgreSQL — local database, configured with
DATABASE_URLNo authentication — this runtime is single-user and exposes
/mcpdirectly
MCP Tools
Tool | Description |
| Log a meal with description, type, calories, macros, fiber, total sugar, alcohol, notes — from text or a photo of your plate |
| Open the in-chat CSV importer: pick an export from another app, map its columns, preview, confirm |
| Write up to 50 imported rows per call — each row validated, duplicates skipped so a re-send is safe |
| Look up a packaged product's label nutrition by barcode via Open Food Facts (read from a photo or typed) |
| Get all meals logged today |
| Get meals for a specific date (YYYY-MM-DD) |
| Get meals between two dates (inclusive) |
| Search past meals by keyword, grouped into recurring variations (counts, last logged, typical macros) |
| Daily nutrition totals + goal progress for a date range |
| Update any fields of an existing meal |
| Delete a meal by ID |
| Set daily calorie, macro, fiber and water targets to reach, sugar and alcohol limits to stay under, plus an optional target weight |
| Get the current daily targets and limits |
| Get intake vs. targets and limits for a given day (default: today), plus latest weight vs. target |
| Log a hydration entry in milliliters |
| Get today's water intake total and entries |
| Get water intake for a specific date |
| Delete a water log entry by ID |
| Log a body-weight measurement in kg or lb (converted and stored server-side) |
| Get today's weight entries |
| Get weight entries for a specific date |
| Get weight entries between two dates (inclusive), grouped by day |
| Weight trend: latest, overall change, 7/14/30-day moving averages, min/max, and goal progress |
| Update an existing weight entry |
| Delete a weight entry by ID |
| Set the preferred weight unit ( |
| Get the preferred weight unit |
| 7/14/30-day averages, std dev, streaks, day-of-week, best/worst day |
| Pre-aggregated behavioural patterns (breakfast effect, late dinner, weekend vs weekday, outliers) |
| Export all meals as a CSV and return a 60-minute download link |
| Set the user's IANA timezone (e.g. |
| Get the user's configured timezone |
| Enable or disable the in-chat visual widgets (dashboards, rings, charts); enabled by default |
| Get whether the in-chat visual widgets are enabled |
| Turn alcohol tracking on or off (off by default) and choose US standard drinks or UK units; turning it off hides alcohol rather than deleting it |
| Get whether alcohol tracking is on and which standard drink it's displayed in |
| Permanently delete account and all associated data |
Food-tracking storage and scope
Food tracking uses an append-only meal_events aggregate: each correction creates a
new version and advances the root pointer; historical versions and evidence remain
readable. The legacy meal tables are reset destructively by migration 002 when it
is applied, so take an export before upgrading. Event media bytes live under
MEDIA_ROOT; PostgreSQL stores only the generated event/version/content-hash key
and metadata. DATABASE_URL_TEST points integration tests at an isolated PostgreSQL
database (the local default is postgres://localhost:5432/nutrition_mcp_test).
The sync journal records explicit MyFitnessPal add authorization as pending only. This slice intentionally makes no real MFP calls and ships no automatic backup scheduler or cloud backup service; backup manifests are a contract for an operator-run backup, not proof that backups ran.
Food-import calls accept at most 50 rows. Each row is limited to 20,000 kcal, 5,000 g for ordinary macros, and 500 g of alcohol; split larger files into chunks while keeping all rows for a calendar date together. The importer is idempotent, but it is not an MFP writer or a cloud backup system.
URI | Description |
| Rolling 7-day digest (averages vs targets, best/roughest day) for proactive pulls |
Self-hosting
This section describes the current local PostgreSQL/Bun runtime. Older Supabase, OAuth, and email/password deployment notes are obsolete and must not be used for this checkout.
1. PostgreSQL and migrations
Create the database named by DATABASE_URL, then apply the migrations in order:
psql "$DATABASE_URL" -v ON_ERROR_STOP=1 -f db/migrations/001_initial_schema.sql
psql "$DATABASE_URL" -v ON_ERROR_STOP=1 -f db/migrations/002_food_tracking.sqlMigration 002_food_tracking.sql is destructive: it deletes the legacy
meals rows and drops the legacy meals table before creating the append-only
food-tracking schema. Export any data you need before applying it. Migration
002 is safe to rerun after a complete or interrupted run, but it is not a
backfill and there is no rollback for the legacy meal reset.
2. Environment variables
Variable | Description |
| PostgreSQL connection string for the runtime database (default example: |
| Isolated PostgreSQL database used by integration tests (default example: |
| Local directory for event media bytes (default example: |
| Open Food Facts User-Agent for barcode lookups, in the form |
| Server port (default: |
Making it yours: The public site includes the maintainer's personal bits — Google Analytics, Patreon/GitHub/contact links, and the
nutrition-mcp.comdomain. Runbun run depersonalizeto strip them all in one pass (analytics + CSP, the Support/Contact sections, social links, and the domain → ayour-domain.complaceholder). Usebun run depersonalize --dryto preview without writing. Afterwards, swap in your ownpublic/og.png,favicon.ico, andapple-touch-icon.png, and replace the domain placeholder with your real domain.
Agent-driven meal capture
The complete boundary, lifecycle, provenance, migration, rollback, and retry contract is documented in docs/food-tracking-agent-driven.md.
The append-only meal-event path is also exposed as a transport-neutral, durable capture flow for an agent host. Hermes supplies raw message/evidence/media metadata, clarification answers, prepared drafts, and provider result bundles; this server does not receive Telegram updates, download media, run STT/OCR/vision, or call external MCP servers.
Use start_meal_capture, append_meal_capture_message, answer_meal_capture, and save_meal_capture_draft for restart-safe multi-turn storage. confirm_meal_capture is the explicit authorization gate: only the user's unambiguous add command (including добавь) commits one prepared capture to one meal_event; MyFitnessPal authorization remains a pending journal row, never a claim of successful sync. validate_calculation_bundle accepts and validates Hermes-supplied nutrition-local, own, and myfitnesspal result metadata. Canonical nutrition is recomputed by the existing consensus-10pct-v1 policy; missing, failed, and unavailable values are not treated as zero.
Migration order for a new or test database is 001_initial_schema.sql, 002_food_tracking.sql, then 003_meal_captures.sql.
bun install
cp .env.example .env # set DATABASE_URL and any local overrides
bun run dev # starts with hot reload on http://localhost:8080Run the actual MCP server with bun run start (or bun run src/index.ts).
GET /health returns ok; MCP clients must use POST /mcp.
For the full test suite, point integration tests at a disposable database:
DATABASE_URL_TEST=postgres://localhost:5432/nutrition_mcp_test bun test
bun run typecheck
bun run format:checkConnect to Claude.ai
Start the server locally with
bun run start.Add a custom connector named Nutrition Tracker.
Use
http://localhost:8080/mcpas the MCP URL.Connect; no sign-in or registration is expected.
API Endpoints
Endpoint | Description |
| Health check |
| Stateless MCP endpoint (no auth) |
| Server icon |
The old OAuth discovery, registration, authorize, approve, and token paths are not part of this runtime.
Deploy
The project includes a Dockerfile for container-based deployment. The
container still requires a reachable PostgreSQL DATABASE_URL; it does not
provide Supabase or OAuth services.
Push your repo to a hosting provider (e.g. DigitalOcean App Platform)
Set the runtime environment variables listed above, including
DATABASE_URLThe app auto-detects the Dockerfile and deploys on port
8080Point your domain to the deployed URL
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceA remote MCP server for personal nutrition tracking that enables logging meals, tracking macros, and reviewing nutrition history through conversation.Last updated18634MIT
- Alicense-qualityDmaintenanceMCP server for USDA nutrition data lookup, meal logging, and daily macro tracking.Last updated186MIT
- Alicense-qualityBmaintenanceA filesystem-based MCP server that turns any MCP-capable AI agent into a conversational calorie and protein tracker with natural-language estimates, confidence-aware logging, daily/weekly progress, food-history search, and export, working offline with local fallback data.Last updated186MIT
- Flicense-qualityBmaintenanceMCP server for tracking nutrition meals and workouts, integrating with claude.ai to manage food logs, macros, exercise catalogs, and generate daily/weekly summaries.Last updated
Related MCP Connectors
Personal nutrition tracking — log meals, track macros, review history, import from another app.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
GibsonAI MCP server: manage your databases with natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RootMePLS/nutrition-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server