A simple MCP Server to Pull data from MyFitnessPal
https://github.com/linares222/mcp-myfitnesspal.git
A FastMCP server that retrieves your MyFitnessPal nutrition data through the Model Context Protocol.
uv syncuv run python test_client.pyFor environments without a browser:
uv run python export_cookies.py
.env file - no browser needed!Add to your MCP client config (e.g., .cursor/mcp.json):
{
"mcpServers": {
"myfitnesspal": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/mfp-mcp", "python", "main.py"]
}
}
}
Uses the python-myfitnesspal library (GitHub version) which:
Browser-based (default):
MFP_COOKIES environment variable with exported cookiesexport_cookies.py utility to extract cookies beforehand:uv run python export_cookies.py
mfp-mcp/
โโโ docs/ # All documentation
โโโ myfitnesspal/ # External library (GitHub)
โโโ main.py # FastMCP server
โโโ api_client.py # Client wrapper
โโโ utils.py # Helper functions
โโโ test_client.py # Test script
โโโ pyproject.toml # Dependencies
For personal use and educational purposes. Respect MyFitnessPal's Terms of Service.