MyFitnessPal MCP is a free, open-source MCP server that connects MyFitnessPal
to Claude, Cursor, VS Code, or any MCP client. Log meals by talking, search
the food database with macros, track trends, and export your nutrition history, all against your real MyFitnessPal diary.
Published on PyPI as mfp-mcp and in the
official MCP Registry
as io.github.Mason-Levyy/mfp-mcp.
Unofficial. MyFitnessPal has no public API; this reverse-engineers the
web app's own endpoints. It can break whenever MFP changes their site. Use at
your own risk, with your own account.
Why this one?
MyFitnessPal moved behind Cloudflare + NextAuth, which broke the
username/password login that most existing integrations rely on. This server:
- Authenticates with your browser session cookie over a real Chrome TLS
fingerprint (curl_cffi), which
passes Cloudflare
- Auto-refreshes the session (optional): a headless browser profile rotates
the token when it expires, and failed calls retry automatically
- Writes, not just reads: log, modify, and delete real diary entries
- Search-then-log: get candidates with macros, then log the exact item
Quickstart
-
Connect your account (one-time; prompts you to paste a cookie — see
Authentication):
uvx mfp-mcp auth
-
Add the server to your client. The install buttons at the top do this in
one click for Cursor and VS Code.
Claude Code
claude mcp add myfitnesspal -- uvx mfp-mcp
Or install it as a plugin:
/plugin install myfitnesspal-mcp --marketplace Mason-Levyy/myfitnesspal-mcp
Claude Desktop (claude_desktop_config.json), Cursor
(~/.cursor/mcp.json), Windsurf (~/.codeium/windsurf/mcp_config.json),
and Cline (cline_mcp_settings.json) all take the same entry:
{
"mcpServers": {
"myfitnesspal": {
"command": "uvx",
"args": ["mfp-mcp"]
}
}
}