mfp-mcp-vercel
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., "@mfp-mcp-vercel what did I log for breakfast today?"
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.
mfp-mcp-vercel
MyFitnessPal connector for Claude, running on Vercel. A thin wrapper around delize/myfitness-mcp (installed as a pinned dependency) that makes it work serverless:
Stateless OAuth (
stateless_oauth.py): client ids, auth codes and tokens are HMAC-signed payloads, so the connector stays authorized across restarts and redeploys.Stateless MCP transport (
app.py): fresh server task per request, JSON responses.Cookies from env: MyFitnessPal session cookies come from
MFP_COOKIES.
Environment variables
Variable | Required | Notes |
| yes | Passcode you type once when connecting Claude. Changing it revokes all tokens. |
| yes | Raw |
| no | Public base URL. Defaults to |
| no | Time zone for "today" in the diary. Default |
| no | Access token lifetime in seconds. Default 30 days. |
Env var changes need a redeploy to take effect.
Related MCP server: mfp-mcp
Connect Claude
Settings, Connectors, Add custom connector, URL https://<project>.vercel.app/mcp.
Leave client id/secret empty and enter the passcode on the login page.
Refreshing cookies
MyFitnessPal sessions expire (about 30 days). When tools start returning auth
errors: log into myfitnesspal.com, copy the Cookie request header again,
update MFP_COOKIES, redeploy.
Updating upstream
Bump the commit hash of myfitnesspal-mcp-service in pyproject.toml. app.py
overrides MCP SDK internals, so keep mcp pinned and retest when bumping it.
Available Tools
18 toolsmfp_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
Inputs: params (required). Returns: result
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
Inputs: params (required). Returns: result
mfp_delete_food_entryADestructive
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
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_frequent_foodsBRead-onlyIdempotent
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
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_my_foodsARead-onlyIdempotent
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
Inputs: params (required). Returns: result
mfp_get_recent_foodsARead-onlyIdempotent
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
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.
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
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_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_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
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools map to a distinct resource+action, making selection straightforward. The main risk is the cluster of food-collection readers (mfp_get_recent_foods, mfp_get_frequent_foods, mfp_get_my_foods) which share an identical input shape and are easy to confuse, though descriptions clarify the difference.
Every tool follows a strict mfp_verb_noun pattern (get_diary, set_goals, add_food_to_diary, delete_food_entry, etc.), including the mfp_ prefix throughout. Verb choice is consistent (get/set/add/create/update/delete/search) and predictable.
18 tools is on the high side but justified by a broad personal-tracking domain spanning diary, food database, measurements, goals, water, exercises, and reports. Each tool maps to a real operation, though the food-collection trio could be collapsed to reduce surface slightly.
Diary CRUD (get/add/update/delete) is fully covered and goals, water, and measurements have read+write pairs. Notable gaps remain: exercises are read-only (no logging tool) and there is no delete/update tool for created custom foods, despite mfp_create_food mentioning they 'can later delete'.
Maintenance
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Calorie tracker app for ChatGPT and Claude: read meals, macros, weight and log meals from chat.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Pace is a remote MCP server that exposes wearable and fitness data to Claude via the Model Context Protocol. It connects to Garmin, Oura, Whoop, Polar, Fitbit and 20+ devices and provides 15 tools for querying sleep, activity, recovery, and training data. Hosted on Google Cloud Run, OAuth 2.1 authentication, Streamable HTTP transport. Instructions: First you need to create an account at: https://pacetraining.co and connect your wearables. After that you can connect the remote Server via Custom Connector in Claude and OAuth 2.1 Flow startet.
Related MCP Servers
- 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
- AlicenseAqualityAmaintenanceConnect MyFitnessPal to Claude or any MCP client. Log meals, search food database with macros, track trends, and export nutrition history against your real MyFitnessPal diary.18620 PyPI31MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude.ai to read your MacroFactor nutrition data and log food back into MacroFactor.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to access your MyFitnessPal diary—foods, portions, meal and daily nutrition totals, water, exercise, steps, and weight—through a custom connector on web, desktop, and mobile.9 npmMIT