Skip to main content
MCP server CX Codex

MyFitnessPal — Claude Code MCP server: setup

Connects an AI coding client to your MyFitnessPal diary for food logging, product lookup, and nutrition analysis.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env MFP_COOKIE=<MFP_COOKIE> --env MFP_USERNAME=<MFP_USERNAME> --transport stdio myfitnesspal -- uvx mfp-mcp
Open on GitHub

What MyFitnessPal does

This MCP server lets Claude Code work with a MyFitnessPal diary through chat. It can add, edit, and remove diary entries, find foods with macro data, inspect daily meals, follow weight trends, and export nutrition history.

The process runs with uvx mfp-mcp and authenticates through a browser session cookie. You need uv and MFP_COOKIE before connecting it; the client configuration also uses MFP_USERNAME. Optional session renewal relies on a headless browser profile and Playwright. MyFitnessPal has no public API, so the server depends on private web endpoints and can stop working when the site changes.

What it helps with

  • log meals into a MyFitnessPal diary
  • find foods together with macro values
  • review what was eaten on a given day
  • track weight and nutrition trends
  • export diary history for analysis

Example prompts for the agent

  • Log a banana as a snack in MyFitnessPal.
  • Show what I ate yesterday and group the entries by meal.
  • Chart my weight for this month.

How to install MyFitnessPal

Platform CLI

claude mcp add --env MFP_COOKIE=<MFP_COOKIE> --env MFP_USERNAME=<MFP_USERNAME> --transport stdio myfitnesspal -- uvx mfp-mcp

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mfp-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about MyFitnessPal

How do I install MyFitnessPal in Claude Code?

Run claude mcp add mfp-mcp -e MFP_COOKIE=<MFP_COOKIE> -- uvx mfp-mcp. The MyFitnessPal session cookie is passed through MFP_COOKIE.

What does MyFitnessPal do?

It gives an AI client access to a MyFitnessPal diary for food search, diary edits, meal review, and nutrition history analysis.

What is required to authenticate MyFitnessPal?

The server signs in with a cookie from an active MyFitnessPal browser session. When that session expires, refresh the cookie; automatic renewal uses the Playwright setup.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor