io.github.fliptheweb/fatsecret-mcp

平台与服务

by fliptheweb

面向 FatSecret API 的非官方 MCP 服务器,支持食物搜索、营养分析、日记、食谱与体重追踪。

什么是 io.github.fliptheweb/fatsecret-mcp

面向 FatSecret API 的非官方 MCP 服务器,支持食物搜索、营养分析、日记、食谱与体重追踪。

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:

json
{
  "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_authcomplete_auth — authorize your FatSecret account for diary/weight tools

Alternatively, you can pass credentials as environment variables:

json
{
  "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)

bash
claude mcp add fatsecret -- npx -y fatsecret-mcp

Or with env vars:

bash
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 UISettings → 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)

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

🧪 Test Connection

bash
npx fatsecret-mcp

Or with env vars:

bash
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:

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

常见问题

io.github.fliptheweb/fatsecret-mcp 是什么?

面向 FatSecret API 的非官方 MCP 服务器,支持食物搜索、营养分析、日记、食谱与体重追踪。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论