Skip to main content
Glama
delize

MyFitnessPal MCP Server

by delize

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoBind address for HTTP mode (default 127.0.0.1, 0.0.0.0 in Docker)127.0.0.1
MCP_PORTNoPort for HTTP mode (default 8000)8000
MCP_TRANSPORTNoTransport: stdio or streamable-http (default stdio, streamable-http in Docker)stdio
MCP_RESOURCE_URLNoExact public URL clients use (e.g. https://mfp.example.com); required with passcode
MFP_COOKIES_FILENoPath to JSON cookies file in format {"cookies": {name: value}} or plain {name: value}
MCP_ALLOWED_HOSTSNoComma-separated allowed Host headers for reverse proxy (optional, enables DNS-rebinding protection)
MCP_OAUTH_PASSCODENoShared passcode for OAuth login page (omit for unauthenticated LAN-only use)
MFP_FIREFOX_PROFILE_DIRNoPath to Firefox profile directory containing cookies.sqlite with a logged-in MFP session (default /profile in Docker)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mfp_get_diaryA

Get the food diary for a specific date including all meals and their nutritional information.

Returns meals (Breakfast, Lunch, Dinner, Snacks) with each food entry's name, quantity, and complete nutrition breakdown (calories, protein, carbs, fat, etc.). Also includes daily totals and goals.

Args: params: GetDiaryInput containing: - date (str, optional): Date in YYYY-MM-DD format, defaults to today - response_format (str): 'markdown' or 'json'

Returns: str: Formatted diary data with meals, entries, nutrition, and goals

mfp_search_foodA

Search the MyFitnessPal food database for food items.

Returns a list of matching foods with their name, brand, serving size, calories, and MFP ID (which can be used with mfp_get_food_details).

Args: params: SearchFoodInput containing: - query (str): Search query (e.g., 'chicken breast') - limit (int): Maximum results to return (default 10) - response_format (str): 'markdown' or 'json'

Returns: str: List of matching food items with basic nutrition info

mfp_get_food_detailsA

Get detailed nutritional information for a specific food item by its MFP ID.

Returns complete nutrition breakdown including calories, macros (protein, carbs, fat), fiber, sugar, sodium, cholesterol, vitamins, minerals, and available serving sizes.

Args: params: GetFoodDetailsInput containing: - mfp_id (str): MyFitnessPal food item ID from search results - response_format (str): 'markdown' or 'json'

Returns: str: Complete nutritional information for the food item

mfp_get_recent_foodsA

Get recently used foods from MyFitnessPal.

Uses the legacy diary-add AJAX endpoint that still works when newer account pages like /food/mine redirect away from authenticated sessions.

Args: params: GetFoodCollectionInput containing: - limit (int, optional): Max results (default 10, max 100) - response_format (str): 'markdown' or 'json'

Returns: str: List of recently used foods

mfp_get_frequent_foodsB

Get most-used foods from MyFitnessPal.

This is backed by the legacy load_most_used endpoint exposed by the add-to-diary page.

Args: params: GetFoodCollectionInput containing: - limit (int, optional): Max results (default 10, max 100) - response_format (str): 'markdown' or 'json'

Returns: str: List of most-used foods

mfp_get_my_foodsA

Get foods created or saved by the authenticated user.

This uses the legacy load_my_foods endpoint from the add-to-diary page, which remains accessible even when the modern My Foods page redirects away from authenticated sessions.

Args: params: GetFoodCollectionInput containing: - limit (int, optional): Max results (default 100, max 100) - response_format (str): 'markdown' or 'json'

Returns: str: List of foods created or saved by the account

mfp_get_measurementsA

Get body measurements (weight, body fat, etc.) over a date range.

Returns historical measurement data with dates and values. Useful for tracking weight loss progress and body composition changes.

Args: params: GetMeasurementsInput containing: - measurement (str): Type of measurement (default 'Weight') - start_date (str, optional): Start date, defaults to 30 days ago - end_date (str, optional): End date, defaults to today - response_format (str): 'markdown' or 'json'

Returns: str: Measurement history with dates and values

mfp_set_measurementA

Log a new body measurement (weight, body fat, etc.) for today.

Records the measurement value in MyFitnessPal for tracking progress.

Args: params: SetMeasurementInput containing: - measurement (str): Type of measurement (default 'Weight') - value (float): Measurement value (e.g., 185.5)

Returns: str: Confirmation message with the logged value

mfp_get_exercisesA

Get logged exercises for a specific date.

Returns both cardiovascular and strength training exercises with their details (duration, calories burned, sets, reps, weight, etc.).

Args: params: GetExercisesInput containing: - date (str, optional): Date in YYYY-MM-DD format, defaults to today - response_format (str): 'markdown' or 'json'

Returns: str: List of exercises with details and calories burned

mfp_get_goalsA

Get the user's daily nutrition goals (calories, protein, carbs, fat, etc.).

Returns the configured daily targets for all tracked nutrients.

Args: params: GetGoalsInput containing: - date (str, optional): Date in YYYY-MM-DD format, defaults to today - response_format (str): 'markdown' or 'json'

Returns: str: Daily nutrition goals and targets

mfp_set_goalsA

Update daily nutrition goals (calories, protein, carbs, fat).

Sets new daily targets for the specified nutrients. Only updates the values that are provided; others remain unchanged.

Args: params: SetGoalsInput containing: - calories (int, optional): Daily calorie goal - protein (int, optional): Daily protein goal in grams - carbohydrates (int, optional): Daily carb goal in grams - fat (int, optional): Daily fat goal in grams

Returns: str: Confirmation message with updated goals

mfp_get_waterA

Get water intake for a specific date.

Returns the number of cups/glasses of water logged for the day.

Args: params: GetWaterInput containing: - date (str, optional): Date in YYYY-MM-DD format, defaults to today

Returns: str: Water intake amount for the specified date

mfp_add_food_to_diaryA

Add a food item to your MyFitnessPal food diary for a specific date and meal.

This tool adds a food entry to your diary. You can search for foods using mfp_search_food to find the food ID (mfp_id) needed for this tool.

Args: params: AddFoodToDiaryInput containing: - mfp_id (str): MyFitnessPal food item ID (from mfp_search_food) - meal (str): Meal name - 'Breakfast', 'Lunch', 'Dinner', or 'Snacks' (default: 'Breakfast') - date (str, optional): Date in YYYY-MM-DD format, defaults to today - quantity (float): Number of default servings for this food (default: 1.0)

Returns: str: Confirmation message with details of the added food entry

mfp_create_foodA

Create a new custom food in the MyFitnessPal database (via the v2 API).

Use this when a food is not already in MyFitnessPal (mfp_search_food returns nothing suitable) and you want it available to log. All nutrition values are entered PER ONE serving_size (e.g. serving_size='125 g' with the numbers for a 125 g portion).

On success the new food's id is returned as mfp_id; pass it to mfp_add_food_to_diary to log the food (it may take a short moment to also surface in mfp_search_food). Calling this repeatedly creates duplicate foods.

IMPORTANT: share_public=True submits the food to MyFitnessPal's shared public database and is IRREVERSIBLE -- public foods can no longer be edited or deleted. Leave it False (default) to create a private food you can later delete.

Args: params: CreateFoodInput containing: - description (str): Food name (required) - brand (str, optional): Brand/manufacturer - calories, fat, carbs, protein (float): Core macros per serving (required) - saturated_fat, polyunsaturated_fat, monounsaturated_fat, trans_fat, fiber, sugar, sodium, potassium, cholesterol, vitamin_a, vitamin_c, calcium, iron (float, optional): Additional nutrients per serving - serving_size (str): Serving-size label, e.g. '1 Serving', '125 g' (default '1 Serving') - servings_per_container (float): Servings per container (default 1.0) - share_public (bool): Submit to the public database; irreversible (default False)

Returns: str: JSON confirmation including the new food's mfp_id

mfp_update_food_entryA

Update an existing MyFitnessPal diary entry.

Supports changing the meal, quantity, serving size, and date for an entry previously returned by mfp_get_diary (use response_format='json' to get the entry_id). MyFitnessPal can rewrite an entry during edit and return a replacement row, so the response includes current_entry_id and entry_id_changed to keep callers tracking the right diary row.

Args: params: UpdateFoodEntryInput containing: - entry_id (str): Diary entry ID from mfp_get_diary JSON output - date (str, optional): Date in YYYY-MM-DD format, defaults to today - meal (str, optional): New meal name - quantity (float, optional): New number of servings - unit (str, optional): New serving-size label - weight_id (str, optional): Raw MFP serving-size option ID

Returns: str: Confirmation with the current entry id and whether it changed

mfp_delete_food_entryA

Delete an existing MyFitnessPal diary entry.

Deletes a diary entry identified by the entry_id returned by mfp_get_diary (use response_format='json' to get the entry_id).

Args: params: DeleteFoodEntryInput containing: - entry_id (str): Diary entry ID from mfp_get_diary JSON output - date (str, optional): Date in YYYY-MM-DD format, defaults to today

Returns: str: Confirmation message with the deleted entry's name and meal

mfp_set_waterA

Log water intake for a specific date.

Sets the number of cups of water consumed for the day. MyFitnessPal uses cups as the unit (1 cup = ~237ml).

Args: params: SetWaterInput containing: - cups (float): Number of cups of water (e.g., 2.5 for 2.5 cups) - date (str, optional): Date in YYYY-MM-DD format, defaults to today

Returns: str: Confirmation message with the logged water amount

mfp_get_reportA

Get a nutrition report over a date range.

Returns daily values for the specified nutrient/metric over the date range. Useful for analyzing trends and patterns in nutrition intake.

Args: params: GetReportInput containing: - report_name (str): Report type (e.g., 'Net Calories', 'Protein') - start_date (str, optional): Start date, defaults to 7 days ago - end_date (str, optional): End date, defaults to today - response_format (str): 'markdown' or 'json'

Returns: str: Daily values and summary statistics for the report period

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/delize/myfitness-mcp'

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