MyFitnessPal MCP

v0.5.0
io.github.Mason-Levyy/mfp-mcp Checked 16 hours ago Published 28 days ago

Log MyFitnessPal by talking to your AI: search foods with macros, log meals, weight, water and more.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

fitness_get_day Get day summary

Nutrition summary, diary entries, the MyFitnessPal daily note, and the local feel note for a day. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
date

fitness_search_food Search foods

Search MyFitnessPal's food database and return candidate matches. Each candidate has name, brand, calories, macros, serving, and the food_id + weight_id to pass to fitness_log_food to log exactly that item.

ParameterTypeDescription
query *string
limitinteger
with_macrosboolean

fitness_draft_food Draft food entry

Draft a food entry: numbered options to choose from before logging. Each option lists every serving size with its calories/protein/carbs/fat for the whole entry (serving × quantity) and a suggested_serving. The min_/max_ targets (grams; calories in kcal) also apply to the whole entry: options that fit come first, near misses follow, flagged fits_targets=false. A food you've confirmed before for this query is pinned to the top. The order is fixed once drafted. Log a choice with fitness_log_food(draft_id=..., option=N, serving=M); call this again with different…

ParameterTypeDescription
query *string
date
limitinteger
max_calories
max_carbs
max_fat
max_protein
mealstring
min_calories
min_carbs
min_fat
min_protein
quantitynumber

fitness_log_food Log food

Log a food to the real MyFitnessPal diary. Preferred: pick from a fitness_draft_food draft with draft_id + option (+ serving, default the option's suggested_serving). meal, quantity, and date default to the draft's. pin=True remembers the choice so logging the same query later reuses this food and serving. With only `query`: logs a pinned food, or the single exact-name match; otherwise nothing is logged and a draft is returned (needs_choice=true) to pick from. With food_id + weight_id (from fitness_search_food): logs exactly that item, `query` being its displa…

ParameterTypeDescription
date
draft_id
food_id
meal
option
pinboolean
quantity
query
serving
weight_id

fitness_list_food_pins List remembered foods

List remembered food choices (query → food and serving) that fitness_log_food reuses. Stored locally only.

fitness_clear_food_pin Forget remembered food

Forget a remembered food choice for `query`, or every choice with clear_all=True, so the next log of that query drafts options again.

ParameterTypeDescription
clear_allboolean
query

fitness_delete_food Delete food entry

Remove a food from the MyFitnessPal diary by name match. query: text matched against logged entry names (e.g. "banana"). If this matches nothing, the error lists what's actually logged that day/meal — use that to retry with a better query. If it matches more than one entry (and none is an exact name match), the error lists the candidates; narrow `query` to pick one. Identical duplicates (same name, including its quantity, in the same meal) are interchangeable, so one of them is removed; call again to remove another. meal: optional breakfast|lunch|dinner|snack…

ParameterTypeDescription
query *string
date
meal

fitness_modify_food Replace food entry

Replace a MyFitnessPal diary entry: deletes the match, then adds a food. query: the existing entry to replace (name match) within `meal`. If this matches nothing, the error lists what's actually logged that day/meal — use that to retry with a better query. If it matches more than one entry (and none is an exact name match), the error lists the candidates; narrow `query` to pick one. Of several identical duplicates, one is replaced. new_query: the food to add instead; omit to re-add `query` (e.g. to change quantity). The replacement is chosen like fitness_log_food…

ParameterTypeDescription
query *string
date
draft_id
mealstring
new_query
option
quantity
serving

fitness_log_weight Log weight

Log a weight measurement to MyFitnessPal. weight: in your MyFitnessPal account's display unit (kg or lbs). Logging twice for the same date updates that day's measurement. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
weight *number
date

fitness_log_water Log water

Log water to the real MyFitnessPal water tracker. amount: quantity to add to the day's total. unit: cup | fl_oz | ml | l (common spellings like "cups", "oz", "fl oz", "milliliters", "litres" are accepted). replace: set the day's total to `amount` instead of adding — use it to correct a mislogged total (amount=0 clears the day). Returns previous_ml; to undo a mistake, call again with amount=previous_ml, unit="ml", replace=True. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
amount *number
date
replaceboolean
unitstring

fitness_get_exercise Get exercise diary

Read the MyFitnessPal exercise diary (cardio + strength) for a day. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
date

fitness_get_exercise_entries List exercise entries

List a day's cardio and strength exercise-diary entries. Each entry has its section, name, and that section's columns (cardio: minutes, calories_burned; strength: sets, reps_set, weight_set). entry_id is informational only — fitness_delete_exercise deletes by name match. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
date

fitness_delete_exercise Delete exercise entry

Remove exercise-diary entries by name match (case-insensitive). query: text matched against logged exercise names. By default deletes exactly one entry, like fitness_delete_food: an exact name match wins; otherwise several matches raise an error listing the candidates, and no match raises an error listing what's actually logged. Of several identical rows (same name and columns), one is removed. all_matches: delete every entry whose name contains `query` — for cleaning up syncs that log one workout as several same-named rows (e.g. Garmin's "Aerobics, general")…

ParameterTypeDescription
query *string
all_matchesboolean
date

fitness_get_note Get daily note

Read the MyFitnessPal daily diary note (the free-text 'Notes' box at the bottom of the day) straight from your account. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
date

fitness_log_note Write daily note

Write the MyFitnessPal daily diary note (the free-text 'Notes' box at the bottom of the day). This is your real MFP note, synced to your account — distinct from the local-only fitness_log_feel. text: the note body. append: add to the existing note on a new line instead of replacing it. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
text *string
appendboolean
date

fitness_log_feel Save feel note

Save a 'how I feel today' note. Stored locally only — never sent to MyFitnessPal. rating: optional 1-5. date: YYYY-MM-DD (default: today).

ParameterTypeDescription
date
note
rating

fitness_bulk_export Export date range

Export a whole date range at once for analysis: per-day nutrition totals, food entries with macros, the MyFitnessPal daily note, and local feel notes. Read-only. start/end: YYYY-MM-DD (default: last 30 days ending today). sync_first: gap-fill from MyFitnessPal before exporting. Off by default so large historical exports stay fast on cached data.

ParameterTypeDescription
end
start
sync_firstboolean