A remote MCP server for personal nutrition tracking — log meals, track macros, and review nutrition history through conversation.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
git clone https://github.com/akutishevsky/nutrition-mcpMCP Servers overview
# Nutrition MCP
A remote MCP server for personal nutrition tracking — log meals, track macros, log water and body weight, and review nutrition history through conversation.
[Help me pay for the servers on Patreon][patreon]
[patreon]: https://patreon.com/akutishevskyi?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink
## Quick Start
Already hosted and ready to use — just connect it to your MCP client:
```
https://nutrition-mcp.com/mcp
```
**On Claude.ai:** Customize → Connectors → + → Add custom connector → paste the URL → Connect
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](https://nutrition-mcp.com/alternatives) — how it compares to [MyFitnessPal](https://nutrition-mcp.com/myfitnesspal-mcp), [Cronometer](https://nutrition-mcp.com/cronometer-mcp), [Lose It!](https://nutrition-mcp.com/lose-it-mcp), [MacroFactor](https://nutrition-mcp.com/macrofactor-mcp), [Yazio](https://nutrition-mcp.com/yazio-mcp), and [Lifesum](https://nutrition-mcp.com/lifesum-mcp).
## Demo
[](https://youtube.com/shorts/Y1EHbfimQ70)
Read the story behind it: [How I Replaced MyFitnessPal and Other Apps with a Single MCP Server](https://medium.com/@akutishevsky/how-i-replaced-myfitnesspal-and-other-apps-with-a-single-mcp-server-56ca5ec7d673)
## 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_meal` | Log a meal with description, type, calories, macros, notes — from text or a photo of your plate |
| `lookup_barcode` | Look up a packaged product's verified macros by barcode via Open Food Facts (read from a photo or typed) |
| `get_meals_today` | Get all meals logged today |
| `get_meals_by_date` | Get meals for a specific date (YYYY-MM-DD) |
| `get_meals_by_date_range` | Get meals between two dates (inclusive) |
| `search_meals` | Search past meals by keyword, grouped into recurring variations (counts, last logged, typical macros) |
| `get_nutrition_summary` | Daily nutrition totals + goal progress for a date range |
| `update_meal` | Update any fields of an existing meal |
| `delete_meal` | Delete a meal by ID |
| `set_nutrition_goals` | Set daily calorie, macro, and water targets, plus an optional target weight |
| `get_nutrition_goals` | Get the current daily targets |
| `get_goal_progress` | Get intake vs. targets for a given day (default: today), plus latest weight vs. target |
| `log_water` | Log a hydration entry in milliliters |
| `get_water_today` | Get today's water intake total and entries |
| `get_water_by_date` | Get water intake for a specific date |
| `delete_water` | Delete a water log entry by ID |
| `log_weight` | Log a body-weight measurement in kg or lb (converted and stored server-side) |
| `get_weight_today` | Get today's weight entries |
| `get_weight_by_date` | Get weight entries for a specific date |
| `get_weight_by_date_range` | Get weight entries between two dates (inclusive), grouped by day |
| `get_weight_trends` | Weight trend: latest, overall change, 7/14/30-day moving averages, min/max, and goal progress |
| `update_weight` | Update an existing weight entry |
| `delete_weight` | Delete a weight entry by ID |
| `set_weight_unit` | Set the preferred weight unit (`kg` or `lb`; null to clear) |
| `get_weight_unit` | Get the preferred weight unit |
| `get_trends` | 7/14/30-day averages, std dev, streaks, day-of-week, best/worst day |
| `get_meal_patterns` | Pre-aggregated behavioural patterns (breakfast effect, late dinner, weekend vs weekday, outliers) |
| `export_meals` | Export all meals as a CSV and return a 60-minute download link |
| `set_timezone` | Set the user's IANA timezone (e.g. `America/Los_Angeles`) |
| `get_timezone` | Get the user's configured timezone |
| `set_widget_display` | Enable or disable the in-chat visual widgets (dashboards, rings, charts); enabled by default |
| `get_widget_display` | Get whether the in-chat visual widgets are enabled |
| `delete_account` | Permanently delete account and all associated data |
## MCP Resources
| URI | Description |
| ---------------------------- | --------------------------------------------------------------------------------- |
| `nutrition://weekly-summary` | Rolling 7-day digest (averages vs targets, best/roughest day) for proactive pulls |
## Self-hosting
### 1. Supabase setup
1. Create a [Supabase](https://supabase.com) project.
2. Enable **Email Auth** (Authentication → Providers → Email) and disable email confirmation.
3. Apply the schema. The full schema lives in [`supabase/migrations/`](supabase/migrations/). With the [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started):
```bash
supabase link --project-ref <your-project-ref>
supabase db push
```
This creates every table, index, RLS policy, and foreign key the app needs. No local Postgres is involved — migrations run against your hosted project.
4. Copy the **service role key** from Project Settings → API and use it as `SUPABASE_SECRET_KEY`.
### 2. Environment variables
| Variable | Description |
| ---------------------- | ----------------------------------------------------------------------------- |
| `SUPABASE_URL` | Your Supabase project URL |
| `SUPABASE_SECRET_KEY` | Supabase service role key (bypasses RLS) |
| `OAUTH_CLIENT_ID` | Random string for OAuth client identification |
| `OAUTH_CLIENT_SECRET` | Random string for OAuth client authentication |
| `GOOGLE_CLIENT_ID` | _(optional)_ Google OAuth client ID for "Sign in with Google" |
| `GOOGLE_CLIENT_SECRET` | _(optional)_ Google OAuth client secret |
| `OFF_USER_AGENT` | Open Food Facts User-Agent for barcode lookups, in the form `AppName (email)` |
| `PORT` | Server port (default: `8080`) |
> **Making it yours:** The public site includes the maintainer's personal bits — Google Analytics, Patreon/GitHub/contact links, and the `nutrition-mcp.com` domain. Run `bun run depersonalize` to strip them all in one pass (analytics + CSP, the Support/Contact sections, social links, and the domain → a `your-domain.com` placeholder). Use `bun run depersonalize --dry` to preview without writing. Afterwards, swap in your own `public/og.png`, `favicon.ico`, and `apple-touch-icon.png`, and replace the domain placeholder with your real domain.
Generate OAuth credentials:
```bash
openssl rand -hex 16 # use as OAUTH_CLIENT_ID
openssl rand -hex 32 # use as OAUTH_CLIENT_SECRET
```
### 3. Google sign-in (optional)
Email/password works out of the box. To also offer **"Continue with Google"**,
follow [`docs/google-auth-setup.md`](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`.
## Development
```bash
bun install
cp .env.example .env # fill in your credentials
bun run dev # starts with hot reload on http://localhost:8080
```
## Connect to Claude.ai
1. Open [Claude.ai](httWhat people ask about nutrition-mcp
What is akutishevsky/nutrition-mcp?
+
akutishevsky/nutrition-mcp is mcp servers for the Claude AI ecosystem. A remote MCP server for personal nutrition tracking — log meals, track macros, and review nutrition history through conversation. It has 27 GitHub stars and was last updated today.
How do I install nutrition-mcp?
+
You can install nutrition-mcp by cloning the repository (https://github.com/akutishevsky/nutrition-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is akutishevsky/nutrition-mcp safe to use?
+
Our security agent has analyzed akutishevsky/nutrition-mcp and assigned a Trust Score of 87/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.
Who maintains akutishevsky/nutrition-mcp?
+
akutishevsky/nutrition-mcp is maintained by akutishevsky. The last recorded GitHub activity is from today, with 5 open issues.
Are there alternatives to nutrition-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy nutrition-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/akutishevsky-nutrition-mcp)<a href="https://claudewave.com/repo/akutishevsky-nutrition-mcp"><img src="https://claudewave.com/api/badge/akutishevsky-nutrition-mcp" alt="Featured on ClaudeWave: akutishevsky/nutrition-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!