Back to Directory/Developer Tools

io.github.fliptheweb/fatsecret-mcp

MCP server for FatSecret API - food search, nutrition, diary, recipes, weight tracking (unofficial)

Developer ToolsTypeScriptv0.0.8

FatSecret MCP Server FatSecret Logo

[!IMPORTANT] This is not 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

πŸš€ 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:

  1. check_auth_status β€” detects missing credentials and tells you what to do
  2. setup_credentials β€” you provide your API keys (saved to ~/.fatsecret-mcp/config.json)
  3. 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

  1. Create a free account at platform.fatsecret.com
  2. Navigate to My Account β†’ API Keys
  3. 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

Claude 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.

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-mcp

Or 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-mcp

Verify with claude mcp list.

Cursor

  • Settings UI β€” Settings β†’ MCP β†’ + Add new MCP server, then fill in the command, args, and env
  • Project config β€” add JSON to .cursor/mcp.json in your project root
  • Global config β€” add JSON to ~/.cursor/mcp.json

πŸ› οΈ Available Tools

ToolDescription
πŸ” Setup & Auth
check_auth_statusCheck if credentials and profile auth are configured. Call this first.
setup_credentialsSave FatSecret API credentials to persistent config
start_authStart OAuth 1.0 authorization β€” returns URL for user to visit
complete_authComplete OAuth with verifier PIN from authorization page
πŸ” Food Search (public)
search_foodsSearch the food database
get_foodGet detailed nutrition info for a food
find_food_by_barcodeFind food by GTIN-13 barcode
autocomplete_foodsGet search autocomplete suggestions
🍳 Recipes (public)
search_recipesSearch recipes with filters
get_recipeGet recipe details with ingredients and directions
πŸ“š Reference (public)
get_food_categoriesGet food categories
get_food_sub_categoriesGet food sub categories
get_brandsGet food brands
get_recipe_typesGet recipe types
πŸ“ Food Diary (profile auth)
get_food_entriesGet food diary entries for a date
get_food_entries_monthGet monthly nutrition summary (calories & macros per day)
create_food_entryAdd a food diary entry
edit_food_entryEdit a food diary entry
delete_food_entryDelete a food diary entry
copy_food_entriesCopy entries from one date to another
copy_saved_meal_entriesCopy a saved meal to a date
⭐ Favorites (profile auth)
get_favorite_foodsGet favorite foods
delete_favorite_foodRemove food from favorites
get_most_eaten_foodsGet most eaten foods
get_recently_eaten_foodsGet recently eaten foods
get_favorite_recipesGet favorite recipes
add_favorite_recipeAdd recipe to favorites
delete_favorite_recipeRemove recipe from favorites
🍽️ Saved Meals (profile auth)
get_saved_mealsGet saved meals
create_saved_mealCreate a saved meal
edit_saved_mealEdit a saved meal
delete_saved_mealDelete a saved meal
get_saved_meal_itemsGet items in a saved meal
add_saved_meal_itemAdd food to a saved meal
edit_saved_meal_itemEdit saved meal item
delete_saved_meal_itemRemove item from saved meal
βš–οΈ Weight (profile auth)
update_weightRecord weight for a date
get_weight_monthGet weight history for a month
πŸƒβ€β™‚οΈ Exercise (profile auth)
get_exercisesGet exercise types
edit_exercise_entriesShift exercise time between activities
get_exercise_entries_monthGet exercise data for a month
save_exercise_templateSave exercise template for weekdays
πŸ‘€ Profile (profile auth)
get_profileGet user profile info
create_foodCreate a custom food (Premier)

API reference: FatSecret Postman Collection

πŸ§ͺ Test Connection

npx fatsecret-mcp

Or 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

  1. Clone the repository
  2. npm install
  3. Copy .env.example to .env and fill in your credentials
  4. npm run dev to 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.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y fatsecret-mcp

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-fliptheweb-fatsecret-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "fatsecret-mcp"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

fatsecret-mcpnpm

Compatible MCP Clients

io.github.fliptheweb/fatsecret-mcp works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More