{
  "markdown": "# FatSecret MCP Server <img src=\"https://cdn.prod.website-files.com/6854cb4b7a1b8e39612d89cf/685543fddca41e9e9ce5ae5f_fatsecret_logo-op.png\" alt=\"FatSecret Logo\" height=\"28\" />\n\n> [!IMPORTANT]\n> This is **not an official MCP server** by FatSecret.\n> It uses the [FatSecret Platform API](https://platform.fatsecret.com/) which requires a free developer account.\n\nAn MCP (Model Context Protocol) server that connects Claude/Cursor to the [FatSecret Platform API](https://platform.fatsecret.com/). Search foods, track your diet, manage recipes, and monitor weight directly from your AI assistant.\n\n**Available on NPM**: `npx fatsecret-mcp` | **Claude Desktop Extension**: [fatsecret-mcp.mcpb](https://github.com/fliptheweb/fatsecret-mcp/releases/latest/download/fatsecret-mcp.mcpb)\n\n## ✨ Features\n\n- 🔐 **Authentication** — Interactive credential setup and OAuth authorization\n- 🔍 **Food Search** — Search FatSecret's extensive food database with detailed nutrition data\n- 📷 **Barcode Lookup** — Find foods by GTIN-13 barcode\n- 🍳 **Recipe Search** — Browse and filter recipes by calories, macros, and prep time\n- 📝 **Food Diary** — Add, edit, copy, and delete food diary entries\n- 🍽️ **Saved Meals** — Create and manage reusable meal templates\n- ⚖️ **Weight Tracking** — Record and view weight history\n- 🏃‍♂️ **Exercise Tracking** — View exercises and manage activity entries\n- ⭐ **Favorites** — Manage favorite foods and recipes\n\n## 🚀 Quick Start\n\nAdd to your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"fatsecret\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"fatsecret-mcp\"]\n    }\n  }\n}\n```\n\nThat's it! On first use, the AI will guide you through setup:\n\n1. **`check_auth_status`** — detects missing credentials and tells you what to do\n2. **`setup_credentials`** — you provide your API keys (saved to `~/.fatsecret-mcp/config.json`)\n3. **`start_auth`** → **`complete_auth`** — authorize your FatSecret account for diary/weight tools\n\nAlternatively, you can pass credentials as environment variables:\n\n```json\n{\n  \"mcpServers\": {\n    \"fatsecret\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"fatsecret-mcp\"],\n      \"env\": {\n        \"FATSECRET_CLIENT_ID\": \"your_client_id\",\n        \"FATSECRET_CLIENT_SECRET\": \"your_client_secret\",\n        \"FATSECRET_CONSUMER_SECRET\": \"your_consumer_secret\"\n      }\n    }\n  }\n}\n```\n\n### 🔑 Where to Get Credentials\n\n1. Create a free account at [platform.fatsecret.com](https://platform.fatsecret.com/)\n2. Navigate to **My Account → API Keys**\n3. You'll see three values:\n   - **Client ID** (used for both OAuth 2.0 and OAuth 1.0)\n   - **Client Secret** (OAuth 2.0 - for public food/recipe search)\n   - **Consumer Secret** (OAuth 1.0 - for user profile/diary access)\n\n📖 Step-by-step guide: [Getting Started with FatSecret API](https://github.com/fatsecret-group/postman-fatsecret-apis)\n\n### Claude Desktop (Extension)\n\nDownload and open [fatsecret-mcp.mcpb](https://github.com/fliptheweb/fatsecret-mcp/releases/latest/download/fatsecret-mcp.mcpb) with Claude Desktop. You'll be prompted to enter your FatSecret credentials — secrets are stored securely in the OS keychain.\n\nSee [Building Desktop Extensions with MCPB](https://support.claude.com/en/articles/12922929-building-desktop-extensions-with-mcpb) for more details.\n\n### Claude Desktop (Manual)\n\n`~/Library/Application Support/Claude/claude_desktop_config.json`\n\n### Claude Code (CLI)\n\n```bash\nclaude mcp add fatsecret -- npx -y fatsecret-mcp\n```\n\nOr with env vars:\n\n```bash\nclaude mcp add fatsecret \\\n  -e FATSECRET_CLIENT_ID=your_client_id \\\n  -e FATSECRET_CLIENT_SECRET=your_client_secret \\\n  -e FATSECRET_CONSUMER_SECRET=your_consumer_secret \\\n  -- npx -y fatsecret-mcp\n```\n\nVerify with `claude mcp list`.\n\n### Cursor\n\n- **Settings UI** — `Settings → MCP → + Add new MCP server`, then fill in the command, args, and env\n- **Project config** — add JSON to `.cursor/mcp.json` in your project root\n- **Global config** — add JSON to `~/.cursor/mcp.json`\n\n## 🛠️ Available Tools\n\n| Tool | Description |\n|------|-------------|\n| **🔐 Setup & Auth** | |\n| `check_auth_status` | Check if credentials and profile auth are configured. **Call this first.** |\n| `setup_credentials` | Save FatSecret API credentials to persistent config |\n| `start_auth` | Start OAuth 1.0 authorization — returns URL for user to visit |\n| `complete_auth` | Complete OAuth with verifier PIN from authorization page |\n| | |\n| **🔍 Food Search** *(public)* | |\n| `search_foods` | Search the food database |\n| `get_food` | Get detailed nutrition info for a food |\n| `find_food_by_barcode` | Find food by GTIN-13 barcode |\n| `autocomplete_foods` | Get search autocomplete suggestions |\n| | |\n| **🍳 Recipes** *(public)* | |\n| `search_recipes` | Search recipes with filters |\n| `get_recipe` | Get recipe details with ingredients and directions |\n| | |\n| **📚 Reference** *(public)* | |\n| `get_food_categories` | Get food categories |\n| `get_food_sub_categories` | Get food sub categories |\n| `get_brands` | Get food brands |\n| `get_recipe_types` | Get recipe types |\n| | |\n| **📝 Food Diary** *(profile auth)* | |\n| `get_food_entries` | Get food diary entries for a date |\n| `get_food_entries_month` | Get monthly nutrition summary (calories & macros per day) |\n| `create_food_entry` | Add a food diary entry |\n| `edit_food_entry` | Edit a food diary entry |\n| `delete_food_entry` | Delete a food diary entry |\n| `copy_food_entries` | Copy entries from one date to another |\n| `copy_saved_meal_entries` | Copy a saved meal to a date |\n| | |\n| **⭐ Favorites** *(profile auth)* | |\n| `get_favorite_foods` | Get favorite foods |\n| `delete_favorite_food` | Remove food from favorites |\n| `get_most_eaten_foods` | Get most eaten foods |\n| `get_recently_eaten_foods` | Get recently eaten foods |\n| `get_favorite_recipes` | Get favorite recipes |\n| `add_favorite_recipe` | Add recipe to favorites |\n| `delete_favorite_recipe` | Remove recipe from favorites |\n| | |\n| **🍽️ Saved Meals** *(profile auth)* | |\n| `get_saved_meals` | Get saved meals |\n| `create_saved_meal` | Create a saved meal |\n| `edit_saved_meal` | Edit a saved meal |\n| `delete_saved_meal` | Delete a saved meal |\n| `get_saved_meal_items` | Get items in a saved meal |\n| `add_saved_meal_item` | Add food to a saved meal |\n| `edit_saved_meal_item` | Edit saved meal item |\n| `delete_saved_meal_item` | Remove item from saved meal |\n| | |\n| **⚖️ Weight** *(profile auth)* | |\n| `update_weight` | Record weight for a date |\n| `get_weight_month` | Get weight history for a month |\n| | |\n| **🏃‍♂️ Exercise** *(profile auth)* | |\n| `get_exercises` | Get exercise types |\n| `edit_exercise_entries` | Shift exercise time between activities |\n| `get_exercise_entries_month` | Get exercise data for a month |\n| `save_exercise_template` | Save exercise template for weekdays |\n| | |\n| **👤 Profile** *(profile auth)* | |\n| `get_profile` | Get user profile info |\n| `create_food` | Create a custom food (Premier) |\n\n<sub>API reference: [FatSecret Postman Collection](https://www.postman.com/fatsecret/fatsecret-public-apis/)</sub>\n\n## 🧪 Test Connection\n\n```bash\nnpx fatsecret-mcp\n```\n\nOr with env vars:\n\n```bash\nFATSECRET_CLIENT_ID='...' FATSECRET_CLIENT_SECRET='...' FATSECRET_CONSUMER_SECRET='...' npx fatsecret-mcp\n```\n\n## 📋 Requirements\n\n- Node.js 18+\n- FatSecret Platform API account ([platform.fatsecret.com](https://platform.fatsecret.com/))\n- MCP-compatible client (Claude Desktop, Cursor, etc.)\n\n## 🔧 Development\n\n1. Clone the repository\n2. `npm install`\n3. Copy `.env.example` to `.env` and fill in your credentials\n4. `npm run dev` to run in development mode\n\nDebugging with MCP Inspector:\n\n```bash\nFATSECRET_CLIENT_ID=X FATSECRET_CLIENT_SECRET=X FATSECRET_CONSUMER_SECRET=X npx -y @modelcontextprotocol/inspector npx <local-path>/fatsecret-mcp\n```\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n",
  "bytes": 7870,
  "sha": "6e896e9769d2e276bfafec950bfbdf017fe760b11bd189ac06a02a6566020845",
  "repo_slug": "fliptheweb/fatsecret-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_fliptheweb_fatsecret_mcp_18c2653f/readme"
}