Skip to main content
Glama

MyFitnessPal MCP Server

A FastMCP server that retrieves your MyFitnessPal nutrition data through the Model Context Protocol.

Quick Start

Local Development

  1. Prerequisites: Python 3.12+, uv, MyFitnessPal account

  2. Install dependencies: uv sync

  3. Log into MyFitnessPal in your browser (Chrome, Firefox, Safari, or Edge)

  4. Test the server: uv run python test_client.py

Deployment (Server/Docker)

For environments without a browser:

  1. Export cookies from your local browser:

    uv run python export_cookies.py
  2. Deploy with the generated .env file - no browser needed!

See Deployment Guide for Docker, systemd, and cloud deployment options.

Related MCP server: fitatu-wrapper

Features

  • Daily nutrition summary (calories, macros, water)

  • Detailed meal-by-meal breakdown

  • Exercise tracking (cardio + strength)

  • Macro & micronutrient analysis

  • Water intake monitoring

  • Date range summaries with trends

Configuration

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"]
    }
  }
}

Documentation

How It Works

Uses the python-myfitnesspal library (GitHub version) which:

  • Extracts cookies from your browser automatically

  • Scrapes MyFitnessPal website for data

  • No credentials stored in files

  • Works with Chrome, Firefox, Safari, and Edge

Browser-based (default):

  • Automatically extracts cookies from your local browser

  • Works out of the box if you're logged into MyFitnessPal

Environment variable (for Docker/servers):

  • Set MFP_COOKIES environment variable with exported cookies

  • Use export_cookies.py utility to extract cookies beforehand:

    uv run python export_cookies.py
  • Perfect for environments without browser access (Docker containers, remote servers, etc.)

  • Cookies expire after ~30 days, re-export when needed

Project Structure

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

Requirements

  • Python 3.12+

  • uv package manager

  • Active MyFitnessPal session in browser

  • fastmcp 2.12+

  • lxml, browser-cookie3, measurement

License

For personal use and educational purposes. Respect MyFitnessPal's Terms of Service.

Credits

Available Tools

6 tools
get_daily_exerciseA

Get exercise activities: cardio (duration, calories) and strength (sets, reps, weight).

Args: date: Date in YYYY-MM-DD format (defaults to today)

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNo

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description should disclose more. Only mentions default date behavior; lacks details on read-only nature, error handling, or what happens with no data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences plus args are concise, but could front-load purpose more prominently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter, description explains return types partially. Lacks output schema but sufficient for basic use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (date), and description adds format (YYYY-MM-DD) and default behavior (today), compensating for 0% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the verb 'Get' and the resource 'exercise activities', specifies types (cardio, strength) with details, and distinguishes from sibling tools like get_daily_macros.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternative guidance, but the purpose is clear enough that usage is implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_daily_macrosB

Get comprehensive macro and micronutrient breakdown with all tracked nutrients.

Args: date: Date in YYYY-MM-DD format (defaults to today)

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNo

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the tool returns nutrient breakdown but does not mention read-only nature, authentication needs, or any side effects. For a get endpoint, basic safety traits should be implied but not stated, which limits transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no fluff. First sentence defines purpose, second describes parameter. Information is front-loaded and compact, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 optional param, no output schema) and sibling set, the description covers core purpose and parameter but omits return format or examples. While not critically incomplete, it could mention typical nutrients returned to set expectations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds meaning for the single 'date' parameter: specifies format (YYYY-MM-DD) and default (today). This goes beyond the schema's type-only definition, providing necessary semantic detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets 'comprehensive macro and micronutrient breakdown with all tracked nutrients.' This distinguishes it from siblings like 'get_daily_summary' by specifying nutrient-level detail, but could more explicitly contrast with similar tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like get_daily_summary or get_daily_meals. The agent is left to infer from the description, with no explicit 'when to use' or 'when not to use' instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_daily_mealsA

Get detailed meal-by-meal breakdown with all foods, servings, and calories.

Args: date: Date in YYYY-MM-DD format (defaults to today)

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNo

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It only states what the tool returns, without disclosing behavioral traits like idempotency, rate limits, authentication needs, or side effects. This is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: one sentence for purpose and one for arguments. No wasted words, front-loaded with the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and no output schema, the description adequately explains the return (meal-by-meal breakdown with foods, servings, calories) and the date parameter. It could benefit from more detail on output structure, but overall is complete for typical usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for the date parameter. The description adds the required format 'YYYY-MM-DD' and clarifies that it defaults to today. This provides meaningful context beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'daily meals', specifying a meal-by-meal breakdown with foods, servings, and calories. It differentiates from siblings like get_daily_summary or get_daily_macros by emphasizing granularity, but does not explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving detailed meal data, but provides no explicit guidance on when to use this tool vs. alternatives (e.g., get_daily_summary). No exclusions or context for when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_daily_summaryA

Get daily nutrition overview: calories consumed/remaining, macro breakdown, water, and goals.

Args: date: Date in YYYY-MM-DD format (defaults to today)

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNo

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the default date behavior but does not disclose any other behavioral traits like idempotency, authentication requirements, or side effects. It is a read operation, but without annotations, the description offers minimal transparency beyond the obvious.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences plus a parameter block, with no redundant information. It front-loads the purpose and immediately follows with parameter details. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and no output schema, the description covers the key return elements (calories, macros, water, goals) and parameter format. It lacks examples or structure of the output, but is sufficient for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides format ('YYYY-MM-DD'), default behavior ('defaults to today'), and type (date). This adds meaningful value beyond the schema's type definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool provides a daily nutrition overview including calories, macros, water, and goals. It uses specific verbs ('Get') and resource ('daily nutrition overview'), and distinguishes from siblings like get_daily_macros and get_water_intake by implying a combined view.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lists what the tool returns but provides no guidance on when to use it over siblings (e.g., get_daily_macros for detailed macros, get_date_range_summary for multiple days). No when-not-to-use or alternative suggestions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_date_range_summaryA

Get aggregate nutrition data over a date range with trends and insights.

Args: start_date: Start date in YYYY-MM-DD format end_date: End date in YYYY-MM-DD format

ParametersJSON Schema
NameRequiredDescriptionDefault
start_dateYes
end_dateYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It states the tool aggregates data, implying a read-only operation, but does not explicitly disclose side effects, idempotency, or any constraints. Behavioral traits are insufficiently covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core purpose, followed by parameter details. Every sentence adds value, though the args list could be integrated into a more structured format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's purpose (aggregation and trends) and absence of an output schema, the description is vague. It does not specify what metrics, trends, or insights are returned, leaving the agent with an incomplete understanding of the tool's output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only provides types and requiredness. The description adds format constraints (YYYY-MM-DD) for both parameters, which is valuable and goes beyond the schema. This compensates for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool aggregates nutrition data over a date range, including trends and insights. This specific verb-resource combination distinguishes it from daily siblings like get_daily_summary or get_daily_macros.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for date-range queries versus daily tools, but it does not explicitly state when to use or avoid this tool, nor does it mention alternatives. Guidance is only implicit via context with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_water_intakeA

Get water consumption for a specific day.

Args: date: Date in YYYY-MM-DD format (defaults to today)

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNo

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states it 'gets' data with a date parameter, lacking details on side effects, authentication, rate limits, or return format. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise, two sentences. The first sentence immediately states the tool's purpose, and the second explains the parameter. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one optional parameter, and the description covers purpose and parameter details. However, without an output schema, more information about the return value (e.g., units, structure) would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% coverage, but the description adds meaning by specifying the date format (YYYY-MM-DD) and default behavior (defaults to today). This compensates well for the lack of parameter description in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool gets water consumption for a specific day, which distinguishes it from sibling tools that deal with exercise, macros, meals, and summaries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives. The description implies usage for retrieving daily water intake, but does not mention conditions or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation5/5

Each tool targets a distinct data aspect: exercise, macros, meals, summary, date range summary, and water. There is no overlap; even the summary tool is clearly a high-level overview.

Naming Consistency5/5

All tool names follow the consistent pattern 'get_daily_<aspect>' or 'get_date_range_summary' and 'get_water_intake', all using snake_case.

Tool Count5/5

With 6 tools, the server is well-scoped for a read-only fitness data retrieval API. The count is appropriate for the domain.

Completeness4/5

The tool surface covers all typical daily data retrieval needs (exercise, macros, meals, water, summary, and date range). Missing write operations or weight tracking, but these may be out of scope.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/linares222/mcp-myfitnesspal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server