FatSecret MCP Server
Enables AI assistants to search foods and recipes, track diet, manage weight, and log exercise using the FatSecret Platform API.
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:
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
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.jsonin 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
- Clone the repository
npm install- Copy
.env.exampleto.envand fill in your credentials npm 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。