← Back to directory
M

MyFitnessPal MCP Server

Community
Let AI assistants read and write your MyFitnessPal diary and health data
Category
Other #142 of 230
Stars
★ 68 Popular
Transport
stdio (local process)
Runtime
Python 3.10+ · Node.js 18+ · Docker
Credentials
API key / credential required
License
MIT
Last commit
Tools
20
51FMRS · D

A broad, locally hosted MyFitnessPal MCP server with 20 tools covering diary reads and writes, food search, custom-food management, body measurements, exercises, nutrition goals, water and fasting writes plus nutrition reports, with Chromium browser auto-discovery for authentication. It is not an official project: MyFitnessPal has no public API, reads are scraped, and writes rely on undocumented internal endpoints that can change at any time; the README also states plainly that legacy form login mostly fails after MFP's move to NextAuth, so browser-session cookies are the reliable path. Suitable for individuals who accept those constraints; not suitable where official support or policy certainty is required, or where storing session cookies locally is unacceptable.

Strongest · Documentation 14/20 Weakest · Security and permissions 8/20

Reliability
9/20
Security and permissions
8/20
Maintenance
10/20
Documentation
14/20
Setup experience
10/20
Why each score
Reliability 9/20
The README declares 20 tools but describes behavior only through tables and an API reference; no source such as server.py is provided, so declared behavior cannot be checked against implementation, and there are no CI workflows or committed tests. Static calibration therefore caps reliability at 12. The auth path is fragile by the author's own account: MFP moved to NextAuth so the form-POST credential flow almost always fails and credentials only work while cached cookies survive. Writes depend on an undocumented v2 JSON API that the author says already changed once, breaking food logging with a 404. Dependencies require Python 3.10–3.12 because lxml has no wheels for 3.13+. Score 9: the happy path is plausible, but there is no execution evidence, little described error handling or regression coverage, and known brittleness on key write paths.
Security and permissions 8/20
No malware, covert exfiltration, or credential theft is visible, so no red line applies, but scoping and confirmation are incomplete. Write tools (mfp_add_food_to_diary, mfp_set_goals, mfp_set_measurement, mfp_set_water, mfp_delete_custom_food, mfp_remove_food_from_diary, fasting writes) carry no documented user-confirmation requirement, and destructive deletes are merely labeled irreversible rather than gated behind explicit confirmation. Credential handling has positives: optional Fernet encryption with MFP_SECRET_KEY held in the environment or OS keychain, and cookie files at 0700/0600. However browser-cookie extraction requires reading macOS keychain Safe Storage entries, a broad permission, and the legacy plaintext MFP_PASSWORD configuration is still documented with examples, putting the account password on disk in cleartext. Risks are visible but insufficiently contained, hence 8.
Maintenance 10/20
MIT license is present and the repository is not archived, with 53 stars and 7 open issues indicating real usage. But there is no evidence of releases, versioning policy, CHANGELOG, CI, or dependency-update process; the README states functionality depends on reverse-engineered private MFP endpoints that the author says already changed once, concentrating maintenance risk on a single undocumented interface, and no security-response channel is described. Anchoring at '10 = active but governance/versioning gaps', the score is 10.
Documentation 14/20
Documentation is the strongest dimension here: installation (venv, pip version requirements), four authentication methods with priority order and failure explanations, Claude Desktop config examples for macOS and Windows, a Docker mount example, full tool parameter tables, a carbs/country_code semantics table for custom foods, the write-only fasting design with the 405 explanation, and thorough troubleshooting (keychain dialog, Python version, missing module). It also discloses limits: no public MFP API, writes against undocumented endpoints, possible breakage. Deductions: some described paths diverge from the stated repo layout (src/mfp_mcp vs. module mfp_mcp), example clone URLs still use placeholder YOUR_USERNAME inconsistent with the real repository, no verifiable real run output is included, and the README itself is untrusted evidence with no external confirmation. Score 14.
Setup experience 10/20
Clear source-install steps, Claude Desktop configuration examples with absolute paths for macOS and Windows, and a Docker example are provided, and the mainstream auth path (log in via any Chromium browser, cookies auto-discovered) is convenient on macOS. Still largely manual and fragile: you must create a venv, pin Python 3.10–3.12 (3.13+ fails on lxml), need pip 21.3+, hand-edit JSON config, and restart the client; the encrypted option additionally needs Node.js 18+, npm install, and a keychain CLI. Platform support is uneven since auto-discovery is macOS-only. No CI or tests substantiate reproducibility; capped at 15 by static calibration, the score is 10.

Static review · not runListed 2026-09-10

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkChanges third-party account data

Best for

  • Individuals who want to view and organize MyFitnessPal food, exercise and weight records in natural language
  • macOS Claude Desktop users who are comfortable authenticating with browser cookies
  • People automating entries (e.g. inferring fasts from a sleep window plus first-meal timestamp) or correcting logs programmatically
  • Technical users who accept a scraping-based approach and know the interface can break

Not for

  • Production use requiring official support or a stable public API
  • Users unwilling to keep session cookies or account credentials on their machine
  • Environments on Python 3.13+ or where lxml cannot be built
  • MCP clients other than Claude Desktop (only a Claude Desktop config example is documented)
  • Anyone who needs to read fasting history — MFP exposes no read endpoint for it

Required permissions

  • Read and modify your MyFitnessPal account data (diary, goals, measurements, water, fasting)
  • Write to ~/.mfp_mcp/cookies.json (mode 0600; equivalent to a password with full account access)
  • On macOS, read each browser's '<Browser> Safe Storage' keychain entry to decrypt its cookie database
  • Read browser cookies (Chromium-based or Firefox) or credentials from the MFP_USERNAME / MFP_PASSWORD environment variables
  • Optionally read MFP_SECRET_KEY from the environment or OS keychain to decrypt credentials

Risks and side effects

  • The server can modify your diary, goals, measurements and water — mistaken calls change real data
  • Session cookies grant full account access and are stored locally in ~/.mfp_mcp/cookies.json; leaking that file is leaking the account
  • Storing plain credentials in the client config puts your MyFitnessPal password in plaintext on disk, readable by anything running as your user
  • Reads and writes depend on MFP's undocumented interfaces, which can change without notice (the author notes it already happened once)
  • Scraping and internal API use may conflict with MyFitnessPal's terms of service
  • If MFP_SECRET_KEY is stored alongside the encrypted values in the same config file, the encryption provides little protection

Setup

Before you start

Runtime:Python 3.10+ · Node.js 18+ · Docker

MFP_USERNAME optionalsecret Your MyFitnessPal email; optional legacy credential auth (largely deprecated), can be plain or Fernet-encrypted.
MFP_PASSWORD optionalsecret Your MyFitnessPal password; optional legacy credential auth, best stored Fernet-encrypted.
MFP_SECRET_KEY optionalsecret Fernet key used to decrypt encrypted credentials; keep it in a shell env or the OS keychain (service mfp-mcp), not in the config file.
  1. Make sure Python 3.10–3.12 is installed (3.13+ is unsupported because lxml has no wheels for it).
  2. Clone the repository and enter it: git clone https://github.com/YOUR_USERNAME/myfitnesspal-mcp-python.git && cd myfitnesspal-mcp-python.
  3. Create a virtual environment: python3 -m venv venv, then activate it (macOS/Linux: source venv/bin/activate; Windows: .\venv\Scripts\activate).
  4. Upgrade pip: pip install --upgrade pip.
  5. Install in editable mode: pip install -e .
  6. Verify it starts: python -m mfp_mcp.server (it communicates over stdio; press Ctrl+C to stop).
  7. Edit the Claude Desktop config file (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json) and add the mcpServers entry with an absolute path to the venv Python and args ["-m", "mfp_mcp.server"].
  8. Fully quit and restart Claude Desktop; a hammer icon indicates the tools are loaded.
  9. For authentication, log into myfitnesspal.com in any Chromium-based browser (recommended on macOS) or Firefox; you can alternatively set MFP_USERNAME / MFP_PASSWORD in the env block (legacy form login largely fails against MFP's NextAuth backend).
claude_desktop_config.json
{
  "mcpServers": {
    "myfitnesspal": {
      "command": "/Users/yourname/myfitnesspal-mcp-python/venv/bin/python",
      "args": ["-m", "mfp_mcp.server"]
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "myfitnesspal": {
      "command": "/Users/yourname/myfitnesspal-mcp-python/venv/bin/python",
      "args": [
        "-m",
        "mfp_mcp.server"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add myfitnesspal -- /Users/yourname/myfitnesspal-mcp-python/venv/bin/python -m mfp_mcp.server

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After completely restarting Claude Desktop, a hammer icon should appear; ask "Show my MyFitnessPal diary for today" — returned diary data proves the connection works.

Troubleshooting

  1. 'python: command not found' or wrong version: check with python3 --version (needs 3.10–3.12); on macOS run brew install [email protected] and recreate the venv
  2. 'pip install -e .' fails with 'setup.py not found': run pip install --upgrade pip first
  3. Authentication failures: log into myfitnesspal.com in a Chromium browser, or call refresh_browser_cookies with browser set to arc, chrome, edge, brave, firefox or auto
  4. First macOS run shows a keychain prompt: click 'Always Allow'; if Claude Desktop spawns the server in the background the prompt is easy to miss, so bring it to the foreground and retry
  5. 'No module named mfp_mcp': make sure you use the venv Python, reinstall with pip install -e ., and use absolute paths in the config
  6. Tools not appearing in Claude Desktop: validate the JSON, use absolute paths, fully restart Claude Desktop, and check the log directories
  7. Authentication succeeds but responses are empty: confirm you have entries for that date and use YYYY-MM-DD format
  8. Food logging suddenly breaks: MFP changed its internal endpoints (the old /food/diary/{user}/add now returns 404), which is the most likely cause

Things to try

Once connected, you can ask your AI assistant things like:

  • Show me what I ate today
  • Log a grilled chicken breast, 6 oz, for lunch
  • Log my weight as 232.5 pounds
  • Show my calorie intake over the past week

Tools 20

mfp_get_diary read-only
Get food diary entries for any date
mfp_search_food read-only
Search the MyFitnessPal food database
mfp_get_food_details read-only
Get detailed nutrition info for a food item
mfp_add_food_to_diary writes
Add a food item to your diary for a specific meal and date
mfp_remove_food_from_diary destructive
Remove a logged entry from your diary
mfp_create_custom_food writes
Create a private custom food with a full nutrition panel
mfp_list_own_foods read-only
List your own custom foods (private ones do not appear in search)
mfp_delete_custom_food destructive
Delete one of your custom foods
Show 12 more tools
mfp_get_measurements read-only
Get weight/body measurement history
mfp_set_measurement writes
Log a new weight or body measurement
mfp_get_exercises read-only
Get logged exercises (cardio & strength)
mfp_get_goals read-only
Get daily nutrition goals
mfp_set_goals writes
Update daily nutrition goals
mfp_get_water read-only
Get water intake for a date
mfp_set_water writes
Log water intake for a date
mfp_log_fast writes
Log a completed intermittent fasting window (start + end)
mfp_update_fast writes
Update the start/end times of an existing fasting entry
mfp_delete_fast destructive
Delete a fasting entry by id
mfp_get_report read-only
Get nutrition reports over a date range
refresh_browser_cookies writes
Extract and save session cookies from browser

Use cases

Read today's or any date's food diary and see what was eaten yesterday
Search food in MyFitnessPal and pull nutrition details with an AI assistant
Add food to Breakfast, Lunch, Dinner or Snacks
Review weight history and monthly trend, and log a new weight
Compare daily nutrition goals against actual intake and check protein progress
Review logged exercises for today or yesterday
Generate nutrition reports over a week or a month
Update daily calorie, protein, carbohydrate and fat goals
Query and log daily water intake in cups
Log, update or delete intermittent fasting entries
Create private custom foods for repeat logging

Supported clients

Claude Desktop

Listed from the project's documentation, not tested by this site.

Overview

A locally hosted Model Context Protocol server that lets AI assistants such as Claude interact with your MyFitnessPal data: food diary, exercises, body measurements, nutrition goals, water intake and intermittent fasting. MyFitnessPal has no public API: reads are scraped from the website via python-myfitnesspal, diary writes go through MFP's internal v2 JSON API (the same one its web client uses, authenticated with your existing session token), and custom-food writes use a different family of cookie-authenticated web endpoints. The server runs locally over stdio; data is only transmitted between your machine and myfitnesspal.com.

Similar servers

BioMCP 75 · B

One binary. One grammar. Evidence from the biomedical sources you already trust.

★ 659 · Tools 11 Compare with this →

Source revision 4d71a5607b0f Data synced 2026-10-19 Read the FMRS scoring method