MyFitnessPal MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Bind address for HTTP mode (default 127.0.0.1, 0.0.0.0 in Docker) | 127.0.0.1 |
| MCP_PORT | No | Port for HTTP mode (default 8000) | 8000 |
| MCP_TRANSPORT | No | Transport: stdio or streamable-http (default stdio, streamable-http in Docker) | stdio |
| MCP_RESOURCE_URL | No | Exact public URL clients use (e.g. https://mfp.example.com); required with passcode | |
| MFP_COOKIES_FILE | No | Path to JSON cookies file in format {"cookies": {name: value}} or plain {name: value} | |
| MCP_ALLOWED_HOSTS | No | Comma-separated allowed Host headers for reverse proxy (optional, enables DNS-rebinding protection) | |
| MCP_OAUTH_PASSCODE | No | Shared passcode for OAuth login page (omit for unauthenticated LAN-only use) | |
| MFP_FIREFOX_PROFILE_DIR | No | Path 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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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 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 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 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 On success the new food's id is returned as 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 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 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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