MyFitnessPal MCP Server
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., "@MyFitnessPal MCP Serverquick add 300 calories to dinner"
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.
MyFitnessPal MCP Server
An MCP server that lets AI assistants read and log your MyFitnessPal nutrition data. Track calories, macros, search foods, and add meals — all through natural conversation.
Tools
Tool | Description |
| Get food diary entries for a specific date |
| Get calories and macros summary for a date |
| Get your daily calorie and macro targets |
| Quick-add calories (and optionally macros) to a meal |
| Search the MFP food database |
| Get nutrition info and serving sizes for a food item |
| Log a food item to your diary |
Related MCP server: MyFitnessPal MCP Server
Setup
1. Get your session cookie
MyFitnessPal doesn't have a public API, so this server authenticates using your browser's session cookie.
Log into MyFitnessPal in your browser
Open DevTools (
F12orCmd+Option+I)Go to Application → Cookies →
www.myfitnesspal.comCopy the full cookie string (or use the helper script below)
Or use the helper script:
npm run export-cookies2. Configure environment
cp env.example .envFill in your values:
MFP_SESSION_COOKIE=your_session_cookie_value_here
MFP_USERNAME=your_username3. Build
npm install
npm run buildUsage
Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"myfitnesspal": {
"type": "stdio",
"command": "node",
"args": ["/path/to/myfitnesspal-mcp/dist/index.js"]
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"myfitnesspal": {
"type": "stdio",
"command": "node",
"args": ["/path/to/myfitnesspal-mcp/dist/index.js"]
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"myfitnesspal": {
"type": "stdio",
"command": "node",
"args": ["/path/to/myfitnesspal-mcp/dist/index.js"]
}
}
}Replace /path/to/myfitnesspal-mcp with the actual path to this repo.
Remote Deployment (Cloudflare Workers)
The worker/ directory contains a Cloudflare Workers deployment for using this as a remote MCP server.
cd worker
npm install
npx wrangler login
npx wrangler deploy
npx wrangler secret put MFP_SESSION_COOKIE # paste your cookie when promptedThen connect from Claude Desktop:
{
"mcpServers": {
"myfitnesspal": {
"command": "npx",
"args": ["mcp-remote", "https://myfitnesspal-mcp.<your-subdomain>.workers.dev/mcp"]
}
}
}Session Expiration
MFP session cookies expire roughly every 30 days. If you get auth errors, grab a fresh cookie from your browser and update your .env (or run npx wrangler secret put MFP_SESSION_COOKIE for the worker).
License
MIT
Disclaimer
Unofficial integration for personal use. Please respect MyFitnessPal's Terms of Service.
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 Servers
- FlicenseBqualityCmaintenanceEnables retrieval and analysis of MyFitnessPal nutrition data including daily summaries, meal breakdowns, exercise tracking, and macro/micronutrient analysis. Uses browser cookie authentication to access your personal MyFitnessPal account data through natural language queries.Last updated6
- Alicense-qualityDmaintenanceEnables AI assistants to read and write MyFitnessPal data, including food diary, exercises, body measurements, nutrition goals, and water intake.Last updatedMIT
- Flicense-qualityFmaintenanceEnables AI assistants to search recipes, compose nutritionally balanced meals, optimize weekly meal plans based on macro targets for family members, and generate consolidated grocery lists from a personal recipe database.Last updated
- Alicense-qualityCmaintenanceEnables AI assistants to interact with MyFitnessPal data including food diary, exercises, body measurements, nutrition goals, and water intake through natural language.Last updated38MIT
Related MCP Connectors
Personal nutrition tracking — log meals, track macros, review history, import from another app.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Connect your Oura Ring account securely in minutes. Enable authorized access to your sleep, activi…
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/ansonyuu/myfitnesspal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server