home / mcp / myfitnesspal mcp server
A simple MCP Server to Pull data from MyFitnessPal
Configuration
View docs{
"mcpServers": {
"ai-mcp-garage-mcp-myfitnesspal": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/mfp-mcp",
"python",
"main.py"
],
"env": {
"MFP_COOKIES": "COOKIE1=value1; COOKIE2=value2"
}
}
}
}You run a FastMCP server that retrieves your MyFitnessPal nutrition data through the Model Context Protocol, allowing you to query daily summaries, meal details, workouts, and nutrient insights from your MCP client with a lightweight local or remote setup.
This server exposes your MyFitnessPal data to an MCP client. Start it locally to access daily nutrition summaries, meal-by-meal breakdowns, exercise tracking, macro and micronutrient analysis, water intake, and date-range trends from your preferred MCP client. Use the standard MCP client workflow to connect to this server and begin querying data.
To begin, ensure you have a running Python environment and the uv package manager installed. Start the server via the MCP configuration you point your client at, then issue requests from your MCP client to retrieve nutrition data, meals, workouts, and trends. The server handles authentication via a browser cookie or environment variable workflow described in the setup steps.
Prerequisites: Python 3.12+ and the uv package manager, plus an active MyFitnessPal session in your browser.
Install dependencies for local development and prepare your environment.
1) Install uv sync and related dependencies.
2) Log into MyFitnessPal in your browser (Chrome, Firefox, Safari, or Edge) to establish a session used by the server.
3) Run a quick test to ensure the server starts correctly and can reach MyFitnessPal data.
Configuration for MCP clients is provided as a ready-to-use JSON example. You place the MCP server entry in your MCP client configuration to connect to the local or remote server.
{
"mcpServers": {
"myfitnesspal": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/mfp-mcp", "python", "main.py"]
}
}
}If you are deploying in an environment without a browser, export cookies from a browser on a separate machine or use the environment variable approach described in the setup flow. Cookies are used to authenticate MyFitnessPal data and expire after about 30 days, at which point you should re-export.
Provides daily calories, macros, and water intake summaries for a given date range.
Returns detailed breakdown of meals, including ingredients and macro/micronutrient content.
Tracks cardio and strength workouts associated with the user’s daily activity.
Analyzes macro and micronutrient data to show trends and distributions over time.
Monitors daily water consumption against user targets.
Generates trend analysis over a selected date range to reveal patterns in nutrition and activity.