Nutrition MCP
Provides persistent data storage and user authentication for nutrition tracking, using Supabase's PostgreSQL database
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, 450 cal"
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, total sugar and caffeine, 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
Table of Contents
Related MCP server: nutrition-mcp
Quick Start
Already hosted and ready to use — just connect it to your MCP client:
https://nutrition-mcp.com/mcpOn Claude.ai: Customize → Connectors → + → Add custom connector → paste the URL → Connect (see Connect to Claude.ai below for the full walkthrough)
On first connect you'll be asked to register with an email and password. Your data persists across reconnections.
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.
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
Supabase — PostgreSQL database + user authentication
OAuth 2.0 — authentication for Claude.ai connectors
MCP Tools
Tool | Description |
| Log a meal with description, type, calories, macros, fiber, total sugar, alcohol, caffeine (mg), 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/alcohol/caffeine 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 ( |
| 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 every table — meals, water, weight, goals, profile — as one ZIP of CSVs plus a README, and return a 60-minute download link |
| Get timezone (+ local date/time), widget language, weight unit, widget display and alcohol tracking in one call |
| Set the user's IANA timezone (e.g. |
| Set the UI language for in-chat widgets (dashboards, charts) — not the language the AI replies in |
| Get the current date and time in the user's timezone, plus the UTC instant — for hosts with no clock in context |
| Enable or disable the in-chat visual widgets (dashboards, rings, charts); enabled by default |
| 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 |
| Permanently delete account and all associated data |
MCP Resources
URI | Description |
| Rolling 7-day digest (averages vs targets, best/roughest day) for proactive pulls |
Self-hosting
0. Get the code
git clone https://github.com/akutishevsky/nutrition-mcp.git
cd nutrition-mcp
bun install
cp .env.example .env # fill in real values as you go through the steps belowRequires Bun 1.x (matches the Dockerfile's oven/bun:1 base image; no exact minor version is pinned).
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 gen:allto produce the public pages, thenbun run depersonalizeto strip the personal bits 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. This script only touchespublic/*.htmlandsrc/index.ts— it doesn't touch this README, so if you're publishing your own fork, also edit or remove the Patreon line near the top of this file and the Medium link in Demo.
1. Supabase setup
Create a Supabase project.
Enable Email Auth (Authentication → Providers → Email) and disable email confirmation.
Apply the schema. The full schema lives in
supabase/migrations/. With the Supabase CLI:supabase link --project-ref <your-project-ref> supabase db pushThis creates every table, index, RLS policy, and foreign key the app needs. No local Postgres is involved — migrations run against your hosted project.
Copy the service role key from Project Settings → API and use it as
SUPABASE_SECRET_KEY.
2. Environment variables
Variable | Description |
| Your Supabase project URL |
| Supabase service role key (bypasses RLS) |
| Random string for OAuth client identification |
| Random string for OAuth client authentication |
| (optional) Comma-separated list of extra browser origins allowed to call |
| (optional) Google OAuth client ID for "Sign in with Google" |
| (optional) Google OAuth client secret |
| Open Food Facts User-Agent for barcode lookups, in the form |
| (optional) Patreon OAuth client ID, for showing recent posts on the landing page's Support section |
| (optional) Patreon OAuth client secret |
| (optional) Patreon campaign ID to fetch posts from |
| (optional) Creator's Access Token from Patreon's client management page — one-time bootstrap seed, see below |
| (optional) Creator's Refresh Token from the same page — one-time bootstrap seed, see below |
| Server port (default: |
Generate OAuth credentials:
bun run generate-oauth-credsor manually:
openssl rand -hex 16 # use as OAUTH_CLIENT_ID
openssl rand -hex 32 # use as OAUTH_CLIENT_SECRETPatreon posts, one-time setup:
PATREON_ACCESS_TOKEN/PATREON_REFRESH_TOKENare only ever read once, at server boot, to seed thepatreon_tokenstable if it's still empty — the server refreshes and stores its own pair from then on, so leaving these two set permanently is safe (every later boot is a no-op). You never need to touch the database by hand.
3. Google sign-in (optional)
Email/password works out of the box. To also offer "Continue with Google",
follow docs/google-auth-setup.md to create a
Google OAuth client, enable the Google provider in Supabase, and set
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET. This adds the GET /authorize/google
and GET /auth/google/callback routes — see API Endpoints.
Development
bun install
cp .env.example .env # fill in your credentials — see Self-hosting above for what to put here
bun run dev # regenerates public/ pages, then starts with hot reload on http://localhost:8080The generated pages under public/ (index, tools, privacy, terms, login, /alternatives, locale mirrors, sitemap.xml) are build artifacts, not tracked in git — they're regenerated on every Docker build, in CI, and once at each bun run dev start. --watch only restarts the src/index.ts process on save, so it does not rerun generation — after editing src/copy/, src/routes.ts, or scripts/site-partials.ts, run bun run gen:all yourself to pick up the change.
Testing and quality
bun test # run the test suite
bun run format # format with Prettier (4-space indentation)
bun run format:check # verify the tree is prettier-clean
bun run typecheck # typecheck src/CI runs format:check and typecheck on every PR; typecheck is scoped to src/, so a type error in a test file or under scripts/ won't be caught by it.
For in-chat widget development (public/widgets/), bun run harness starts a local host simulator so you can test widgets without a real MCP client.
Connect to Claude.ai
Open Claude.ai and click Customize
Click Connectors, then the + button
Click Add custom connector
Fill in:
Name: Nutrition Tracker
Remote MCP Server URL:
https://nutrition-mcp.com/mcp
Click Connect — sign in or register when prompted
After signing in, Claude can use your nutrition tools. If you reconnect later, sign in with the same email and password to keep your data.
API Endpoints
Endpoint | Description |
| Health check |
| OAuth metadata discovery (root + |
| OAuth protected-resource metadata discovery (root + |
| Dynamic client registration |
| OAuth authorization (shows login page) |
| Redirects to Google's OAuth consent screen ("Continue with Google") |
| Google OAuth callback — exchanges the code, completes sign-in |
| Login/register handler |
| Token exchange |
| Server icon |
| MCP endpoint (authenticated) |
Deploy
The project includes a Dockerfile for container-based deployment.
Push your repo to a hosting provider (e.g. DigitalOcean App Platform)
Set the environment variables listed above
The 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 Connectors
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
MCP server exposing supplements database used by iNutriPlan.com
Unlock the power of food transparency with our Open Food Facts MCP server. Easily look up any food
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
Related MCP Servers
- AlicenseBqualityDmaintenanceA MCP server that tracks daily calorie intake through natural language interaction, providing meal recording, daily summary, weekly report generation, and food search functions.42Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for USDA nutrition data lookup, meal logging, and daily macro tracking.20MIT
- AlicenseNot gradedqualityBmaintenanceA remote MCP server for personal nutrition tracking that lets you log meals, track macros, water, and body weight, and review your nutrition history through conversation.20MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for personal nutrition tracking, enabling users to log meals with calories and macros, water intake, body weight, set goals, and import food diaries from other apps through natural language.20MIT
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/akutishevsky/nutrition-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server