Nutrition MCP

平台与服务

by akutishevsky

通过对话记录餐食、追踪 macros,并查看历史饮食记录,适合个人营养管理与长期跟踪。

什么是 Nutrition MCP

通过对话记录餐食、追踪 macros,并查看历史饮食记录,适合个人营养管理与长期跟踪。

README

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

Quick Start

Already hosted and ready to use — just connect it to your MCP client:

code
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 — how it compares to MyFitnessPal, Cronometer, Lose It!, MacroFactor, Yazio, and Lifesum.

Demo

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

ToolDescription
log_mealLog a meal with description, type, calories, macros, notes — from text or a photo of your plate
lookup_barcodeLook up a packaged product's verified macros by barcode via Open Food Facts (read from a photo or typed)
get_meals_todayGet all meals logged today
get_meals_by_dateGet meals for a specific date (YYYY-MM-DD)
get_meals_by_date_rangeGet meals between two dates (inclusive)
search_mealsSearch past meals by keyword, grouped into recurring variations (counts, last logged, typical macros)
get_nutrition_summaryDaily nutrition totals + goal progress for a date range
update_mealUpdate any fields of an existing meal
delete_mealDelete a meal by ID
set_nutrition_goalsSet daily calorie, macro, and water targets, plus an optional target weight
get_nutrition_goalsGet the current daily targets
get_goal_progressGet intake vs. targets for a given day (default: today), plus latest weight vs. target
log_waterLog a hydration entry in milliliters
get_water_todayGet today's water intake total and entries
get_water_by_dateGet water intake for a specific date
delete_waterDelete a water log entry by ID
log_weightLog a body-weight measurement in kg or lb (converted and stored server-side)
get_weight_todayGet today's weight entries
get_weight_by_dateGet weight entries for a specific date
get_weight_by_date_rangeGet weight entries between two dates (inclusive), grouped by day
get_weight_trendsWeight trend: latest, overall change, 7/14/30-day moving averages, min/max, and goal progress
update_weightUpdate an existing weight entry
delete_weightDelete a weight entry by ID
set_weight_unitSet the preferred weight unit (kg or lb; null to clear)
get_weight_unitGet the preferred weight unit
get_trends7/14/30-day averages, std dev, streaks, day-of-week, best/worst day
get_meal_patternsPre-aggregated behavioural patterns (breakfast effect, late dinner, weekend vs weekday, outliers)
export_mealsExport all meals as a CSV and return a 60-minute download link
set_timezoneSet the user's IANA timezone (e.g. America/Los_Angeles)
get_timezoneGet the user's configured timezone
set_widget_displayEnable or disable the in-chat visual widgets (dashboards, rings, charts); enabled by default
get_widget_displayGet whether the in-chat visual widgets are enabled
delete_accountPermanently delete account and all associated data

MCP Resources

URIDescription
nutrition://weekly-summaryRolling 7-day digest (averages vs targets, best/roughest day) for proactive pulls

Self-hosting

1. Supabase setup

  1. Create a Supabase project.

  2. Enable Email Auth (Authentication → Providers → Email) and disable email confirmation.

  3. Apply the schema. The full schema lives in supabase/migrations/. With the Supabase CLI:

    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

VariableDescription
SUPABASE_URLYour Supabase project URL
SUPABASE_SECRET_KEYSupabase service role key (bypasses RLS)
OAUTH_CLIENT_IDRandom string for OAuth client identification
OAUTH_CLIENT_SECRETRandom 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_AGENTOpen Food Facts User-Agent for barcode lookups, in the form AppName (email)
PORTServer 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 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 and click Customize
  2. Click Connectors, then the + button
  3. Click Add custom connector
  4. Fill in:
    • Name: Nutrition Tracker
    • Remote MCP Server URL: https://nutrition-mcp.com/mcp
  5. Click Connect — sign in or register when prompted
  6. 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

EndpointDescription
GET /healthHealth check
GET /.well-known/oauth-authorization-serverOAuth metadata discovery
POST /registerDynamic client registration
GET /authorizeOAuth authorization (shows login page)
POST /approveLogin/register handler
POST /tokenToken exchange
GET /favicon.icoServer icon
ALL /mcpMCP endpoint (authenticated)

Deploy

The project includes a Dockerfile for container-based deployment.

  1. Push your repo to a hosting provider (e.g. DigitalOcean App Platform)
  2. Set the environment variables listed above
  3. The app auto-detects the Dockerfile and deploys on port 8080
  4. Point your domain to the deployed URL

License

MIT

常见问题

Nutrition MCP 是什么?

通过对话记录餐食、追踪 macros,并查看历史饮食记录,适合个人营养管理与长期跟踪。

相关 Skills

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描164.6k

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描164.6k

接口测试套件

by alirezarezvani

Universal
热门

扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。

帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。

平台与服务
未扫描23.3k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
89.0k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
79.5k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
71.5k

评论