Skip to content
MCP server

MyFitnessPal MCP

Log meals, weight and water in MyFitnessPal by talking to your AI assistant

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.5.0
Listing updated
2 days ago

About MyFitnessPal MCP

MyFitnessPal MCP is an open-source MCP server for health and science. It runs locally on your machine and is started by your AI client.

This unofficial server talks to MyFitnessPal's web endpoints, since the service has no public API, and lets an assistant search foods with macros and write real diary entries. Because MyFitnessPal sits behind Cloudflare and NextAuth, it signs in with your browser session cookie over a Chrome-like TLS fingerprint instead of a username and password. Sessions last 30 days from last renewal, and an optional headless browser profile can refresh an expired session and retry the call.

Food logging is draft-then-confirm: a draft tool returns numbered options with every serving size, filtered by calorie or macro targets, and a log tool then writes the chosen item, so the diary does not depend on search order. Other tools read totals and remaining macros for a day, edit or delete entries, mark a day complete, log weight and water, read exercise, and export a date range or trends.

The README warns it can break whenever MyFitnessPal changes its site. It is free and open source, published on PyPI as mfp-mcp, and needs uv.

Install

Run in a terminal

claude mcp add mfp-mcp --env MFP_COOKIE='<MFP_COOKIE>' -- uvx mfp-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mfp-mcp": {
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "<MFP_COOKIE>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mfp-mcp": {
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "<MFP_COOKIE>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "mfp-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "<MFP_COOKIE>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mfp-mcp": {
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "<MFP_COOKIE>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mfp-mcp": {
      "command": "uvx",
      "args": [
        "mfp-mcp"
      ],
      "env": {
        "MFP_COOKIE": "<MFP_COOKIE>"
      }
    }
  }
}

Configuration

  • MFP_COOKIEMyFitnessPal session cookie (optional; 'mfp-mcp auth' is the guided alternative)
  • MFP_USERNAMEMyFitnessPal username; only needed if MFP's profile lookup fails for your account

Tools this server provides (19)

Taken from the project documentation; the running server may differ.

fitness_get_day
Totals, goals, entries and notes for a day.
fitness_search_food
Candidate foods with macros and servings.
fitness_draft_food
Numbered options with servings, filtered by targets.
fitness_log_food
Log a chosen food to the diary.
fitness_list_food_pins
List remembered food choices.
fitness_clear_food_pin
Forget remembered choices.
fitness_delete_food
Remove a diary entry.
fitness_modify_food
Replace an entry or change its quantity.
fitness_complete_day
Check, mark or reopen a completed day.
fitness_log_weight
Log a weight.
fitness_log_water
Add or set water intake.
fitness_get_exercise
Read the exercise diary.
fitness_get_exercise_entries
List cardio and strength entries.
fitness_delete_exercise
Remove an exercise entry.
fitness_get_note
Read the daily diary note.
fitness_log_note
Write the daily diary note.
fitness_log_feel
Save a local how-I-feel note.
fitness_get_trends
One metric over a date range.
fitness_bulk_export
Export a whole date range.

What it does

Draft then log
Choose from numbered food options before anything is written.
Macro-aware search
Filter candidates by calorie and macro targets.
Weight and water logging
Add water in several units and record weight.
Diary editing
Modify, replace or delete entries.
Trends and export
Report a metric over a range or export whole dates.
Session auto-refresh
Optional headless profile renews expired sessions.

Good for

  • Say what you ate and have it logged
  • Find a high-protein snack under a calorie limit
  • Chart weight over a month
  • Export a week of nutrition data

Pricing

Open source

MyFitnessPal MCP FAQ

Is it official?

No. The README says MyFitnessPal has no public API and this reverse-engineers its web endpoints.

How does login work?

You paste your __Secure-next-auth.session-token cookie via mfp-mcp auth.

Can it write to my diary?

Yes, it can log, modify and delete entries.

What does it cost?

Free and open source.

Is MyFitnessPal MCP free?

Yes. MyFitnessPal MCP is open source, so you can use and self-host it for free.

How do I add MyFitnessPal MCP to Claude Code?

Run this command in your terminal: claude mcp add mfp-mcp --env MFP_COOKIE='<MFP_COOKIE>' -- uvx mfp-mcp

What are the best alternatives to MyFitnessPal MCP?

The closest alternatives to MyFitnessPal MCP are Tooluniverse, Oya Browser, Later Stages, MedXpert 标准检索连接器 and MedXpert 全球法规连接器 (reg-connector).

Alternatives to MyFitnessPal MCP

  1. Tooluniverse

    MCP server

    MCP server giving AI agents access to thousands of scientific research tools

    Runs locally
    • Open source
    • 1.8K GitHub stars
    • Health and science
  2. Oya Browser

    MCP server

    HIPAA-oriented agentic browser with replayable playbooks, reachable over MCP

    • 32 tools
    • Remote
    • Freemium
    • 349 GitHub stars
    • Browser automation
  3. Later Stages

    MCP server

    California senior living and care provider records from state licensing and Medicare

    • 6 tools
    • Remote
    • Free
    • Health and science
  4. Read-only local index of medical-device standards with official links, no standard text

    Runs locally
    • 4 tools
    • Free
    • Legal and government
  5. Splyt

    MCP server

    Let Claude or ChatGPT read your Splyt workouts, records, plan, habits and sleep

    • Remote
    • Free
    • Health and science