FatSecret MCP Server

FatSecret MCP Server

Enables AI assistants to search foods and recipes, track diet, manage weight, and log exercise using the FatSecret Platform API.

Category
Visit Server

README

FatSecret MCP Server <img src="https://cdn.prod.website-files.com/6854cb4b7a1b8e39612d89cf/685543fddca41e9e9ce5ae5f_fatsecret_logo-op.png" alt="FatSecret Logo" height="28" />

[!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

Tool Description
๐Ÿ” Setup & Auth
check_auth_status Check if credentials and profile auth are configured. Call this first.
setup_credentials Save FatSecret API credentials to persistent config
start_auth Start OAuth 1.0 authorization โ€” returns URL for user to visit
complete_auth Complete OAuth with verifier PIN from authorization page
๐Ÿ” Food Search (public)
search_foods Search the food database
get_food Get detailed nutrition info for a food
find_food_by_barcode Find food by GTIN-13 barcode
autocomplete_foods Get search autocomplete suggestions
๐Ÿณ Recipes (public)
search_recipes Search recipes with filters
get_recipe Get recipe details with ingredients and directions
๐Ÿ“š Reference (public)
get_food_categories Get food categories
get_food_sub_categories Get food sub categories
get_brands Get food brands
get_recipe_types Get recipe types
๐Ÿ“ Food Diary (profile auth)
get_food_entries Get food diary entries for a date
get_food_entries_month Get monthly nutrition summary (calories & macros per day)
create_food_entry Add a food diary entry
edit_food_entry Edit a food diary entry
delete_food_entry Delete a food diary entry
copy_food_entries Copy entries from one date to another
copy_saved_meal_entries Copy a saved meal to a date
โญ Favorites (profile auth)
get_favorite_foods Get favorite foods
delete_favorite_food Remove food from favorites
get_most_eaten_foods Get most eaten foods
get_recently_eaten_foods Get recently eaten foods
get_favorite_recipes Get favorite recipes
add_favorite_recipe Add recipe to favorites
delete_favorite_recipe Remove recipe from favorites
๐Ÿฝ๏ธ Saved Meals (profile auth)
get_saved_meals Get saved meals
create_saved_meal Create a saved meal
edit_saved_meal Edit a saved meal
delete_saved_meal Delete a saved meal
get_saved_meal_items Get items in a saved meal
add_saved_meal_item Add food to a saved meal
edit_saved_meal_item Edit saved meal item
delete_saved_meal_item Remove item from saved meal
โš–๏ธ Weight (profile auth)
update_weight Record weight for a date
get_weight_month Get weight history for a month
๐Ÿƒโ€โ™‚๏ธ Exercise (profile auth)
get_exercises Get exercise types
edit_exercise_entries Shift exercise time between activities
get_exercise_entries_month Get exercise data for a month
save_exercise_template Save exercise template for weekdays
๐Ÿ‘ค Profile (profile auth)
get_profile Get user profile info
create_food Create a custom food (Premier)

<sub>API reference: FatSecret Postman Collection</sub>

๐Ÿงช 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured