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.
Latest Blog Posts
- 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