MyFitnessPal MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MyFitnessPal MCP What did I log for lunch yesterday?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MyFitnessPal MCP
A Model Context Protocol server that lets Claude (or any MCP client) read and write your MyFitnessPal account — food diary, custom foods, saved meals, recipes, exercise, measurements, water, and nutrition goals.
MyFitnessPal has no public API, so this drives the same private endpoints its own web and mobile apps use, authenticated with your existing browser session (no password stored). 33 tools, covering the full create/read/update/delete surface — not just logging.
Credit where it's due. This builds on @AdamWalt/myfitnesspal-mcp-python (MIT), whose browser-cookie + macOS-Keychain authentication is the foundation everything here stands on. This project keeps that foundation, fixes a couple of its stated limitations (MyFitnessPal does support editing foods in place), and adds a large set of new capabilities. Thank you, Adam.
What you can do
Area | Capabilities | Tools |
Food diary | read a day, add, edit an entry, remove, bulk-log across many days |
|
Foods | search, details, create custom, edit in place, delete, list your own |
|
Saved meals | list, create from foods, log to the diary, delete |
|
Recipes | create a multi-ingredient recipe with computed per-portion nutrition |
|
Exercise | read, search the database, log, delete a day's entries |
|
Goals | read, set the 4 macros, or set deep per-nutrient goals |
|
Diary settings | choose tracked nutrients (e.g. show Fiber), rename meal slots |
|
Measurements | read weight/body history, log a measurement |
|
Water | read, set |
|
Fasting | log, update, delete a fasting window |
|
Reports | nutrition trends over a date range |
|
Bold items are additions over the original project.
Stability tiers
Each write tool is labelled in its docstring:
[stable]— rides MyFitnessPal's structured JSON APIs (food editing, nutrient goals, diary settings, diary entries). These have consistent request/response shapes.[legacy]— uses MyFitnessPal's older server-rendered flows (saved-meal "Remember a Meal", exercise search-and-add). These work today but are more likely to change if MyFitnessPal retires its classic site.
Related MCP server: fitatu-wrapper
Install
Requires Python 3.10–3.12 (an upstream dependency, lxml, has no wheels for 3.13+ yet).
git clone https://github.com/thesaaspreneur/myfitnesspal-mcp
cd myfitnesspal-mcp
python3.12 -m venv .venv && source .venv/bin/activate
pip install -e .Authentication
There is no password to configure. Log in to MyFitnessPal in any Chromium-based browser — Chrome, Arc, Edge, Brave, Vivaldi, Opera, or Dia — and the server discovers your session automatically on macOS via each browser's Keychain "Safe Storage" entry. On first use, macOS shows a one-time prompt ("… wants to use your keychain"); click Always Allow. Sessions are cached to ~/.mfp_mcp/cookies.json and last ~30 days.
Safari is not supported — macOS blocks other apps from reading Safari's cookies. Use a Chromium browser.
Use with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"myfitnesspal": {
"command": "/absolute/path/to/myfitnesspal-mcp/.venv/bin/python",
"args": ["-m", "mfp_mcp.server"]
}
}
}Restart Claude Desktop, then try: "What did I log for lunch yesterday?" or "Create a recipe called Overnight Oats from 80g oats, 200g milk, and 15g honey, 2 portions."
Design
src/mfp_mcp/
├── server.py # MCP tool definitions (auth, base tools, and the extended tools)
└── capabilities.py # the extended capability logic, reverse-engineered from MFP's
# web + legacy apps and verified with live create/edit/delete cyclescapabilities.py is a plain Python module you can import and call directly, independent of MCP.
A note on the unofficial API
MyFitnessPal does not publish an API, and this tool uses private endpoints intended for their own clients. It's meant for managing your own account — the same actions you could take by hand in the app. Automating a third-party service may be contrary to its Terms of Service; use it thoughtfully, at your own risk, and don't hammer their servers. No credentials leave your machine.
Contributing
Issues and PRs welcome. The food-in-place-edit fix here is also being offered back upstream to the original project.
License
MIT — see LICENSE. Original work © Adam; extended capabilities © thesaaspreneur.
Available Tools
33 toolsmfp_add_food_to_diaryB
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 servings (default: 1.0)
- unit (str, optional): Unit/serving size (e.g., '1 cup', '100g')
Returns:
str: Confirmation message with details of the added food entry
Inputs: params (required). Returns: result
mfp_bulk_logA
Log the same foods to many days at once. [stable]
Inputs: params (required). Returns: result
mfp_create_custom_foodA
Create a private custom food in the user's MyFitnessPal account.
Fills the full nutrition panel MFP supports (macros, fats breakdown,
cholesterol, sodium, potassium, fiber, sugars, and the four %DV micros).
Uses the cookie-authenticated web endpoint, so no browser needs to be
running. Returns the new food's id, which mfp_add_food_to_diary accepts.
CARBS ARE NET (with the default country_code="NL"): pass net carbs in
`carbs`; MFP stores net_carbs as given and reports total = carbs + fiber.
Never pre-add fiber. Verified: carbs=42/fiber=8 stores 50/42 under "NL" but
42/34 with country_code omitted, so the field is load-bearing, not cosmetic.
To correct an existing food, prefer mfp_edit_food (edits in place via PATCH);
creating a corrected copy and deleting the old one also works.
Args:
params: CreateCustomFoodInput (description, brand_name, serving_amount,
serving_unit, calories + optional nutrients, public, response_format)
Returns:
str: The created food's id, description and HTTP status
Inputs: params (required). Returns: result
mfp_create_mealA
Create a reusable saved Meal from existing foods. [legacy]
Stages the foods in the diary, saves them as a named meal via MFP's
"Remember a Meal" flow, then clears the scaffolding. Returns the meal_id.
Inputs: params (required). Returns: result
mfp_create_recipeA
Create a multi-ingredient recipe as a custom food with summed, per-portion nutrition. [stable] Returns the recipe food id (log/edit it like any food).
Inputs: params (required). Returns: result
mfp_delete_custom_foodADestructiveIdempotent
Delete one of the user's custom foods by id.
Destructive and not recoverable. A food actively referenced by a logged
diary entry may be refused by MyFitnessPal.
Args:
params: DeleteCustomFoodInput (food_id)
Returns:
str: Confirmation with the HTTP status
Inputs: params (required). Returns: result
mfp_delete_exercisesADestructiveIdempotent
Delete all exercise entries logged on a date. [legacy]
Inputs: params (required). Returns: result
mfp_delete_fastADestructiveIdempotent
Delete a fasting entry by id.
Destructive and not recoverable. The `id` must come from a prior
`mfp_log_fast` call or be captured from the MFP app — the MCP cannot
list existing fasts because MFP exposes no read endpoint.
Args:
params: DeleteFastInput (id, response_format)
Returns:
str: Confirmation with the deleted id and HTTP status
Inputs: params (required). Returns: result
mfp_delete_mealADestructiveIdempotent
Delete a saved Meal by id. [stable]
Inputs: params (required). Returns: result
mfp_edit_foodAIdempotent
Edit a custom food IN PLACE. [stable]
MFP does support editing (via PATCH) despite older clients claiming
otherwise; the food id is preserved. Only the fields you pass are changed.
Inputs: params (required). Returns: result
mfp_get_diaryARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_exercisesARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_food_detailsARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_goalsARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_measurementsARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_reportARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_waterARead-onlyIdempotent
Get water intake for a specific date, in millilitres.
MyFitnessPal's `/food/water` endpoint returns the amount in a field
literally named `milliliters` (see python-myfitnesspal's `_get_water`),
so this value is always ml regardless of what unit the account's UI is
configured to display.
Args:
params: GetWaterInput containing:
- date (str, optional): Date in YYYY-MM-DD format, defaults to today
Returns:
str: JSON with `date` and `water_ml`
Inputs: params (required). Returns: result
mfp_list_mealsARead-onlyIdempotent
List your saved Meals with their foods and ids. [stable]
Inputs: params (required). Returns: result
mfp_list_own_foodsARead-onlyIdempotent
List the user's own custom foods, newest first.
Private custom foods do not reliably surface in mfp_search_food, so this is
the way to find the id of something previously created.
Args:
params: ListOwnFoodsInput (search, limit, response_format)
Returns:
str: Matching custom foods with id, description, brand and calories
Inputs: params (required). Returns: result
mfp_log_exerciseA
Log a cardio/strength exercise to the diary. [legacy]
Calories are required by MFP; when omitted they are computed the way MFP's
own client does (METs x body-weight x hours).
Inputs: params (required). Returns: result
mfp_log_fastA
Log a completed intermittent fasting window in MyFitnessPal.
Creates a new entry with the given start and end times. If `id` is
omitted, a fresh uppercase UUIDv4 is generated (matches how the iOS
app self-assigns ids). The returned `id` is what `mfp_update_fast` and
`mfp_delete_fast` accept — save it if you plan to modify the entry
later.
Args:
params: LogFastInput (fast_started, fast_ended, id?, response_format)
Returns:
str: The created entry with id, timestamps, created_at, and status
Inputs: params (required). Returns: result
mfp_log_mealB
Log all of a meal's foods to a diary day in one call. [stable]
Inputs: params (required). Returns: result
mfp_remove_food_from_diaryADestructive
Remove (delete) one or more food entries from your diary.
Two modes:
1. By entry_id (precise): delete exactly the entry whose id matches -
this is the UUID `mfp_add_food_to_diary` returned when you logged it.
Use this when you already know the ID.
2. By name_contains (fuzzy): list the day's entries, find ones whose
name contains the given substring (case-insensitive), optionally
restricted to a meal, and delete up to max_matches of them.
Args:
params: RemoveFoodFromDiaryInput with one of:
- entry_id: the entry's UUID, as returned by
mfp_add_food_to_diary (NOT a food_entry_id from the diary page)
- name_contains: substring match against entry names
- meal: restrict matching to one meal
- max_matches: safety cap for fuzzy matches (default 1)
- date: date to operate on (default today)
Returns:
JSON describing each entry that was removed.
Inputs: params (required). Returns: result
mfp_rename_mealsAIdempotent
Rename the diary meal slots (Breakfast/Lunch/Dinner/Snacks -> your own). [stable]
Inputs: params (required). Returns: result
mfp_search_exercisesARead-onlyIdempotent
Search MFP's exercise database; returns (exercise_id, name) for logging. [legacy]
Inputs: params (required). Returns: result
mfp_search_foodARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_set_goalsAIdempotent
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
Inputs: params (required). Returns: result
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
Inputs: params (required). Returns: result
mfp_set_nutrient_goalsAIdempotent
Set daily goals for ANY nutrient across every weekday (not just the 4 macros). [stable]
Note: MFP recomputes the fiber goal from calories, so a custom fiber value
is not honoured here; use mfp_set_tracked_nutrients to surface fiber in the diary.
Inputs: params (required). Returns: result
mfp_set_tracked_nutrientsBIdempotent
Choose the up-to-6 nutrients shown in the diary (e.g. swap Sugar for Fiber). [stable]
Inputs: params (required). Returns: result
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
Inputs: params (required). Returns: result
mfp_update_fastAIdempotent
Update an existing fasting entry's start and end times.
MFP's PATCH is a full replacement of the two time fields — both must be
supplied even if only one is changing.
The MCP cannot list fasts (MFP exposes no read endpoint); the `id` must
come from a prior `mfp_log_fast` call or be captured from the MFP app.
Args:
params: UpdateFastInput (id, fast_started, fast_ended, response_format)
Returns:
str: The updated entry (id, timestamps, status)
Inputs: params (required). Returns: result
refresh_browser_cookiesA
Extract and save session cookies from your web browser.
Use this tool when authentication fails and you need to refresh your
MyFitnessPal session. You must be logged into myfitnesspal.com in the
target browser.
Args:
browser: Source to extract cookies from. Options:
- 'auto' (default): scan every installed Chromium-based
browser on macOS (Arc, Chrome, Edge, Brave, Vivaldi,
Opera, ...) and use the first one with a valid session.
- 'arc', 'chrome', 'chromium', 'edge', 'brave', 'vivaldi',
'opera': force a specific Chromium browser (macOS).
- 'firefox': use browser_cookie3 (Firefox is not Chromium).
Returns:
Success message or error description.
Inputs: browser. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 33 tools
Most tools target distinct resources (diary, foods, meals, exercises, water, measurements, goals, fasting), and descriptions are detailed enough to prevent confusion. A few near-boundary pairs exist—mfp_set_goals vs mfp_set_nutrient_goals and mfp_create_meal vs mfp_create_recipe vs mfp_create_custom_food—but their descriptions clarify the differences.
The overwhelming majority follow the mfp_verb_noun pattern with clear verbs like get, set, create, delete, log, and search. Minor deviations include refresh_browser_cookies (no mfp_ prefix) and bulkier constructions like mfp_add_food_to_diary / mfp_remove_food_from_diary and the slightly odd mfp_bulk_log, but the overall pattern remains predictable.
At 33 tools, this server exceeds the 25+ threshold that indicates a bloated surface, even for a broad fitness-tracking domain. The toolset covers many features, but the count is heavy and includes legacy-tagged tools, settings tweaks, and maintenance operations that could likely be consolidated.
The server offers unusually deep coverage: diary CRUD, custom food CRUD, meals, recipes, exercises, water, measurements, goals, and fasting. Minor gaps exist—diary entries can be added/removed but not updated in place, and fasting entries cannot be listed—but agents can work around these in most workflows.
Related MCP Connectors
MyFitnessPal MCP server for ChatGPT, Claude and any AI agent: get diary day, search foods, log food, quick add calories, log water, log weight, log exercise and get nutrition goals in your own MyFitnessPal account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to MyFitnessPal yourself; Cotlet does not store your password and you need no MyFitnessPal API key. About the official MyFitnessPal API: MyFitnessPal has a private API and its API site says "We are not accepting requests for API access at this time" (checked 5 Nov 2026). There are no self-serve keys. Setup and FAQ: https://cotlet.dev/integrations/myfitnesspal-api-mcp-server
Cronometer MCP server for ChatGPT, Claude and any AI agent: get diary day, log food, get nutrition summary, get targets, list biometrics, log biometric, create custom food and add note in your own Cronometer account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Cronometer yourself; Cotlet does not store your password and you need no Cronometer API key. About the official Cronometer API: Cronometer has no public API (checked 5 Nov 2026). Its Pro FAQ names Everfit, Kalix and Practice Better as platforms with API access and sends Enterprise teams to sales. Setup and FAQ: https://cotlet.dev/integrations/cronometer-api-mcp-server
Fitatu MCP server for ChatGPT, Claude and any AI agent: get diary, search food, log food, log quick entry, copy day, log measurement and get nutrition summary in your own Fitatu account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Fitatu yourself; Cotlet does not store your password and you need no Fitatu API key. About the official Fitatu API: Fitatu has no public API: its site and help center list no developer docs and no official MCP server (checked 13 Oct 2026). The only data paths are two-way sync with Google Health Connect and Apple Health on the phone, and links that bring workouts in from Strava, Garmin Connect and Polar Flow. Setup and FAQ: https://cotlet.dev/integrations/fitatu-api-mcp-server
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables retrieval and analysis of MyFitnessPal nutrition data including daily summaries, meal breakdowns, exercise tracking, and macro/micronutrient analysis. Uses browser cookie authentication to access your personal MyFitnessPal account data through natural language queries.6-
- AlicenseCqualityDmaintenanceEnables programmatic access to Fitatu nutrition tracking via MCP tools for login, food search, product lookup, daily nutrition read, and adding entries.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and write MyFitnessPal data, including food diary, exercises, body measurements, nutrition goals, and water intake.MIT
- AlicenseAqualityBmaintenanceEnables Claude to manage MyFitnessPal food diaries, nutrition goals, exercises, body measurements, and water intake via a remote MCP server using session cookie authentication.194MIT