FatSecret MCP Server
Connects an MCP client to FatSecret for nutrition search and personal diet/health tracking.
Configure API credentials and complete OAuth authentication for profile access.
Search foods, get detailed nutrition, find foods by barcode, and autocomplete food searches.
Search recipes and retrieve recipe details, ingredients, directions, and nutrition.
Browse reference data such as food categories, brands, and recipe types.
Manage food diary entries: view, create, edit, delete, and copy entries or saved meals.
Manage favorite foods/recipes and view most-eaten or recently eaten foods.
Create and manage saved meals and their food items.
Record weight and view monthly weight history.
View exercise types, manage exercise entries, and save exercise templates.
View profile info and create custom foods with Premier access.
Allows installation and use of the FatSecret MCP server via npx.
Provides tools for searching foods, tracking diet, managing recipes, and monitoring weight through the FatSecret Platform API.
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., "@FatSecret MCP Server Search for high protein foods under 200 calories"
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.
FatSecret MCP Server
This isnot an official MCP server by FatSecret. It uses the FatSecret Platform API which requires a free developer account.
An MCP (Model Context Protocol) server that connects Claude/Cursor to the FatSecret Platform API. Search foods, track your diet, manage recipes, and monitor weight directly from your AI assistant.
Available on NPM: npx fatsecret-mcp | Claude Desktop Extension: fatsecret-mcp.mcpb
โจ Features
๐ Authentication โ Interactive credential setup and OAuth authorization
๐ Food Search โ Search FatSecret's extensive food database with detailed nutrition data
๐ท Barcode Lookup โ Find foods by GTIN-13 barcode
๐ณ Recipe Search โ Browse and filter recipes by calories, macros, and prep time
๐ Food Diary โ Add, edit, copy, and delete food diary entries
๐ฝ๏ธ Saved Meals โ Create and manage reusable meal templates
โ๏ธ Weight Tracking โ Record and view weight history
๐โโ๏ธ Exercise Tracking โ View exercises and manage activity entries
โญ Favorites โ Manage favorite foods and recipes
Related MCP server: fatsecret-mcp-server
๐ Quick Start
Add to your MCP client configuration:
{
"mcpServers": {
"fatsecret": {
"command": "npx",
"args": ["-y", "fatsecret-mcp"]
}
}
}That's it! On first use, the AI will guide you through setup:
check_auth_statusโ detects missing credentials and tells you what to dosetup_credentialsโ you provide your API keys (saved to~/.fatsecret-mcp/config.json)start_authโcomplete_authโ authorize your FatSecret account for diary/weight tools
Alternatively, you can pass credentials as environment variables:
{
"mcpServers": {
"fatsecret": {
"command": "npx",
"args": ["-y", "fatsecret-mcp"],
"env": {
"FATSECRET_CLIENT_ID": "your_client_id",
"FATSECRET_CLIENT_SECRET": "your_client_secret",
"FATSECRET_CONSUMER_SECRET": "your_consumer_secret"
}
}
}
}๐ Where to Get Credentials
Create a free account at platform.fatsecret.com
Navigate to My Account โ API Keys
You'll see three values:
Client ID (used for both OAuth 2.0 and OAuth 1.0)
Client Secret (OAuth 2.0 - for public food/recipe search)
Consumer Secret (OAuth 1.0 - for user profile/diary access)
๐ Step-by-step guide: Getting Started with FatSecret API
๐ Premier Keys
If your FatSecret application has Premier access (e.g. branded food data), the server requests the basic premier OAuth 2.0 scope by default so Premier-only data is included in search results. Free keys aren't entitled to the premier scope โ when FatSecret rejects it with invalid_scope, the server automatically retries with the basic scope, so nothing extra is needed for non-Premier keys.
To force a specific scope (e.g. skip the premier attempt, or request a different scope your key supports), set:
FATSECRET_OAUTH2_SCOPE=basicClaude Desktop (Extension)
Download and open fatsecret-mcp.mcpb with Claude Desktop. You'll be prompted to enter your FatSecret credentials โ secrets are stored securely in the OS keychain.
If one-click install fails or the extension doesn't start, it may be a Claude Desktop bug (mcpb#281). Workaround: download fatsecret-mcp.zip, extract it, and use Settings โ Extensions โ Advanced settings โ Install Unpacked Extension. Or use the npx config above.
See Building Desktop Extensions with MCPB for more details.
Claude Desktop (Manual)
~/Library/Application Support/Claude/claude_desktop_config.json
Claude Code (CLI)
claude mcp add fatsecret -- npx -y fatsecret-mcpOr with env vars:
claude mcp add fatsecret \
-e FATSECRET_CLIENT_ID=your_client_id \
-e FATSECRET_CLIENT_SECRET=your_client_secret \
-e FATSECRET_CONSUMER_SECRET=your_consumer_secret \
-- npx -y fatsecret-mcpVerify with claude mcp list.
Cursor
Settings UI โ
Settings โ MCP โ + Add new MCP server, then fill in the command, args, and envProject config โ add JSON to
.cursor/mcp.jsonin your project rootGlobal config โ add JSON to
~/.cursor/mcp.json
๐ ๏ธ Available Tools
Tool | Description |
๐ Setup & Auth | |
| Check if credentials and profile auth are configured. Call this first. |
| Save FatSecret API credentials to persistent config |
| Start OAuth 1.0 authorization โ returns URL for user to visit |
| Complete OAuth with verifier PIN from authorization page |
๐ Food Search (public) | |
| Search the food database |
| Get detailed nutrition info for a food |
| Find food by GTIN-13 barcode |
| Get search autocomplete suggestions |
๐ณ Recipes (public) | |
| Search recipes with filters |
| Get recipe details with ingredients and directions |
๐ Reference (public) | |
| Get food categories |
| Get food sub categories |
| Get food brands |
| Get recipe types |
๐ Food Diary (profile auth) | |
| Get food diary entries for a date |
| Get monthly nutrition summary (calories & macros per day) |
| Add a food diary entry |
| Edit a food diary entry |
| Delete a food diary entry |
| Copy entries from one date to another |
| Copy a saved meal to a date |
โญ Favorites (profile auth) | |
| Get favorite foods |
| Remove food from favorites |
| Get most eaten foods |
| Get recently eaten foods |
| Get favorite recipes |
| Add recipe to favorites |
| Remove recipe from favorites |
๐ฝ๏ธ Saved Meals (profile auth) | |
| Get saved meals |
| Create a saved meal |
| Edit a saved meal |
| Delete a saved meal |
| Get items in a saved meal |
| Add food to a saved meal |
| Edit saved meal item |
| Remove item from saved meal |
โ๏ธ Weight (profile auth) | |
| Record weight for a date |
| Get weight history for a month |
๐โโ๏ธ Exercise (profile auth) | |
| Get exercise types |
| Shift exercise time between activities |
| Get exercise data for a month |
| Save exercise template for weekdays |
๐ค Profile (profile auth) | |
| Get user profile info |
| Create a custom food (Premier) |
API reference: FatSecret Postman Collection
๐งช Test Connection
npx fatsecret-mcpOr with env vars:
FATSECRET_CLIENT_ID='...' FATSECRET_CLIENT_SECRET='...' FATSECRET_CONSUMER_SECRET='...' npx fatsecret-mcp๐ Requirements
Node.js 18+
FatSecret Platform API account (platform.fatsecret.com)
MCP-compatible client (Claude Desktop, Cursor, etc.)
๐ง Development
Clone the repository
npm installCopy
.env.exampleto.envand fill in your credentialsnpm run devto run in development mode
Debugging with MCP Inspector:
FATSECRET_CLIENT_ID=X FATSECRET_CLIENT_SECRET=X FATSECRET_CONSUMER_SECRET=X npx -y @modelcontextprotocol/inspector npx <local-path>/fatsecret-mcp๐ License
MIT License - see LICENSE file for details.
Available Tools
44 toolsadd_favorite_recipeBIdempotent
Add a recipe to the user's favorites. Requires profile auth (check_auth_status first).
Inputs: recipe_id (required).
add_saved_meal_itemB
Add a food item to a saved meal. Requires profile auth (check_auth_status first).
Inputs: food_id (required), serving_id (required), saved_meal_id (required), number_of_units (required), +1 more.
autocomplete_foodsCRead-onlyIdempotent
Get autocomplete suggestions for a partial food search expression. Premier exclusive.
Inputs: expression (required), region, language, max_results.
check_auth_statusARead-onlyIdempotent
Check if API credentials and profile authentication are configured. Call this first to understand what setup is needed.
Inputs: no named parameters.
complete_authA
Complete the OAuth 1.0 flow with the verifier code from the authorization page.
Inputs: verifier (required).
copy_food_entriesA
Copy food entries from one date to another, optionally filtered by meal. Requires profile auth (check_auth_status first).
Inputs: to_date (required), from_date (required), meal.
copy_saved_meal_entriesA
Copy entries from a saved meal to a meal on a specific date. Requires profile auth (check_auth_status first).
Inputs: meal (required), saved_meal_id (required), date.
create_foodA
Create a custom food with nutrition info. Premier exclusive. Requires profile auth (check_auth_status first).
Inputs: fat (required), protein (required), calories (required), food_name (required), +21 more.
create_food_entryA
Add a food diary entry. Requires food_id, serving_id, and meal type. Requires profile auth (check_auth_status first).
Inputs: meal (required), food_id (required), serving_id (required), food_entry_name (required), +2 more.
create_saved_mealB
Create a new saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_name (required), meals, saved_meal_description.
delete_favorite_foodCDestructiveIdempotent
Remove a food from the user's favorites. Requires profile auth (check_auth_status first).
Inputs: food_id (required), serving_id, number_of_units.
delete_favorite_recipeADestructiveIdempotent
Remove a recipe from the user's favorites. Requires profile auth (check_auth_status first).
Inputs: recipe_id (required).
delete_food_entryBDestructiveIdempotent
Delete a food diary entry by ID. Requires profile auth (check_auth_status first).
Inputs: food_entry_id (required).
delete_saved_mealADestructiveIdempotent
Delete a saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_id (required).
delete_saved_meal_itemADestructiveIdempotent
Remove a food item from a saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_item_id (required).
edit_exercise_entriesA
Shift exercise time between activities for a date. Moves minutes from one exercise to another. Requires profile auth (check_auth_status first).
Inputs: minutes (required), shift_to_id (required), shift_from_id (required), date, +3 more.
edit_food_entryAIdempotent
Edit an existing food diary entry. Cannot change the date. Requires profile auth (check_auth_status first).
Inputs: food_entry_id (required), meal, serving_id, food_entry_name, +1 more.
edit_saved_mealAIdempotent
Edit a saved meal name, description, or associated meals. Requires profile auth (check_auth_status first).
Inputs: saved_meal_id (required), meals, saved_meal_name, saved_meal_description.
edit_saved_meal_itemAIdempotent
Edit a food item in a saved meal (name or units). Cannot change serving_id. Requires profile auth (check_auth_status first).
Inputs: saved_meal_item_id (required), number_of_units, saved_meal_item_name.
find_food_by_barcodeARead-onlyIdempotent
Find food by barcode (GTIN-13). UPC-A, EAN-13 and EAN-8 supported. Premier exclusive.
Inputs: barcode (required), region, language, include_food_images, +3 more.
get_brandsBRead-onlyIdempotent
Get the list of food brands, optionally filtered by starting letter and type. Premier exclusive.
Inputs: region, language, brand_type, starts_with.
get_exercise_entries_monthARead-onlyIdempotent
Get daily calories expended from exercise for a month. Requires profile auth (check_auth_status first).
Inputs: date.
get_exercisesARead-onlyIdempotent
Get the full list of supported exercise types and their IDs. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_favorite_foodsARead-onlyIdempotent
Get the user's favorite foods. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_favorite_recipesARead-onlyIdempotent
Get the user's favorite recipes. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_foodARead-onlyIdempotent
Get detailed nutritional information for a specific food by ID. Returns servings, calories, macros, and micronutrients.
Inputs: food_id (required), region, language, page_number, +4 more.
get_food_categoriesCRead-onlyIdempotent
Get the full list of food categories. Premier exclusive.
Inputs: region, language.
get_food_entriesARead-onlyIdempotent
Get food diary entries for a date or a specific entry by ID. Requires profile auth (check_auth_status first).
Inputs: date, food_entry_id.
get_food_entries_monthARead-onlyIdempotent
Get daily nutrition summary for a month. Returns calories and macros per day. Requires profile auth (check_auth_status first).
Inputs: date.
get_food_sub_categoriesARead-onlyIdempotent
Get food sub categories for a given food category. Premier exclusive.
Inputs: food_category_id (required), region, language.
get_most_eaten_foodsARead-onlyIdempotent
Get the user's most eaten foods, optionally filtered by meal. Requires profile auth (check_auth_status first).
Inputs: meal.
get_profileARead-onlyIdempotent
Get profile status information for the authenticated user. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_recently_eaten_foodsARead-onlyIdempotent
Get the user's recently eaten foods, optionally filtered by meal. Requires profile auth (check_auth_status first).
Inputs: meal.
get_recipeARead-onlyIdempotent
Get detailed recipe information by ID including ingredients, directions, and nutrition.
Inputs: recipe_id (required), max_results, page_number.
get_recipe_typesARead-onlyIdempotent
Get the full list of supported recipe type names.
Inputs: no named parameters.
get_saved_meal_itemsARead-onlyIdempotent
Get all food items in a saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_id (required).
get_saved_mealsARead-onlyIdempotent
Get the user's saved meals, optionally filtered by meal type. Requires profile auth (check_auth_status first).
Inputs: meal.
get_weight_monthARead-onlyIdempotent
Get the user's weight entries for a month. Requires profile auth (check_auth_status first).
Inputs: date.
save_exercise_templateAIdempotent
Save the current day's exercise entries as a template for specified days of the week. Requires profile auth (check_auth_status first).
Inputs: days (required), date.
search_foodsBRead-onlyIdempotent
Search the FatSecret food database. Returns food names, descriptions, and basic nutrition info. On the Basic plan only search_expression, page_number and max_results (max 50) are used.
Inputs: search_expression (required), region, language, food_type, +6 more.
search_recipesBRead-onlyIdempotent
Search recipes with optional filters for calories, macros, prep time, and recipe types.
Inputs: sort_by, calories.to, max_results, page_number, +13 more.
setup_credentialsAIdempotent
Configure FatSecret API credentials. Get them at https://platform.fatsecret.com/ โ My Account โ API Keys. Saves to persistent config file.
Inputs: client_id (required), client_secret (required), consumer_secret (required).
start_authARead-only
Start the OAuth 1.0 authorization flow for profile access. Returns an authorization URL the user must visit. Requires API credentials (setup_credentials first).
Inputs: no named parameters.
update_weightAIdempotent
Record the user's weight for a date. First weigh-in requires goal_weight_kg and current_height_cm. Requires profile auth (check_auth_status first).
Inputs: current_weight_kg (required), date, comment, height_type, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 44 tools
Tools are mostly scoped to a single resource+action, and the food-lookup cluster (search_foods, autocomplete_foods, find_food_by_barcode, get_food) is clearly differentiated. Minor overlap remains in the exercise group (get_exercises, edit_exercise_entries, get_exercise_entries_month, save_exercise_template) where the boundaries between viewing types, viewing totals, and templating are less crisp, and the four auth tools need the 'first/next' sequencing cues to avoid confusion.
Nearly everything follows a predictable verb_noun snake_case pattern (get_*, create_*, edit_*, delete_*, add_*, copy_*, search_*). The only deviations are the auth verbs (check_/setup_/start_/complete_auth) and save_exercise_template vs create_saved_meal using different verbs for essentially the same 'make new' action.
44 tools is well past the heavy threshold, even for a broad API like FatSecret. The set spans eight sub-domains (auth, food lookup, diary, saved meals, recipes, favorites, exercise, weight), but the surface is large enough that an agent must navigate clusters to find the right operation rather than act directly.
There are real dead ends: exercise entries can be edited and summarized monthly but no tool creates an exercise entry, yet save_exercise_template presumes entries exist; favorites are asymmetric (get/delete_favorite_food but no add_favorite_food, while recipes have full add/get/delete); and custom foods can be created but never edited or deleted. These gaps will cause agent failures on otherwise core logging workflows.
Maintenance
Related MCP Connectors
Food nutrition lookup via natural language, barcode, and image. Database of 1,000,000+ foods.
Your Calori account in any AI assistant: nutrition targets, food logging, meal orders and deliveries
Nutrition data for AI agents and LLMs, powered by Edamamโs database of 1,000,000 foods, including 680,000+ with UPC codes. Lookup via natural language and barcode at low cost and low latency. Highly accurate, deterministic data covering macro and micronutrients, allergens, and lifestyle diet tags.
Free food diary for ChatGPT: log meals by chat, track calories, macros and 54 nutrients.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with real-time access to nutrition data from USDA FoodData Central and FatSecret, enabling accurate answers with citations for nutrition queries.-
- AlicenseNot gradedqualityDmaintenanceEnables searching and retrieving nutrition data, recipes, and managing food diary entries through the FatSecret API.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and write MyFitnessPal data, including food diary, exercises, body measurements, nutrition goals, and water intake.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read and log MyFitnessPal nutrition data, including tracking calories, macros, searching foods, and adding meals through natural conversation.7MIT