FatSecret MCP Server
FatSecret MCP Server
[!IMPORTANT] これは FatSecret 公式の MCP サーバーではありません。 FatSecret Platform API を使用しており、無料の開発者アカウントが必要です。
Claude/Cursor を FatSecret Platform API に接続する MCP(Model Context Protocol)サーバーです。AI アシスタントから直接、食品検索、食事管理、レシピ管理、体重記録が行えます。
NPM で利用可能: npx fatsecret-mcp | Claude Desktop 拡張機能: fatsecret-mcp.mcpb
✨ 機能
🔐 認証 — インタラクティブな認証情報設定と OAuth 認可
🔍 食品検索 — 詳細な栄養データを含む FatSecret の広範な食品データベースを検索
📷 バーコード検索 — GTIN-13 バーコードで食品を検索
🍳 レシピ検索 — カロリー、栄養素、調理時間でレシピを閲覧・フィルタリング
📝 食事日記 — 食事日記エントリーの追加、編集、コピー、削除
🍽️ 保存済み食事 — 再利用可能な食事テンプレートの作成と管理
⚖️ 体重記録 — 体重の記録と履歴の表示
🏃♂️ 運動記録 — 運動の表示とアクティビティエントリーの管理
⭐ お気に入り — お気に入りの食品とレシピの管理
Related MCP server: fatsecret-mcp-server
🚀 クイックスタート
MCP クライアント設定に追加:
{
"mcpServers": {
"fatsecret": {
"command": "npx",
"args": ["-y", "fatsecret-mcp"]
}
}
}初回使用時は、AI がセットアップをガイドします:
check_auth_status— 認証情報の不足を検出し、必要な手順を案内setup_credentials— API キーを提供(~/.fatsecret-mcp/config.jsonに保存)start_auth→complete_auth— 食事日記/体重ツール用に FatSecret アカウントを認可
または、環境変数として認証情報を渡すことも可能:
{
"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"
}
}
}
}🔑 認証情報の取得方法
platform.fatsecret.com で無料アカウントを作成
マイアカウント → API キー に移動
以下の3つの値が表示されます:
クライアント ID(OAuth 2.0 と OAuth 1.0 の両方で使用)
クライアントシークレット(OAuth 2.0 - 公開食品/レシピ検索用)
コンシューマーシークレット(OAuth 1.0 - ユーザープロフィール/食事日記アクセス用)
📖 ステップバイステップガイド: FatSecret API 入門
Claude Desktop(拡張機能)
fatsecret-mcp.mcpb をダウンロードして Claude Desktop で開きます。FatSecret の認証情報の入力を求められます — シークレットは OS キーチェーンに安全に保存されます。
詳細は MCPB によるデスクトップ拡張機能の構築 を参照してください。
Claude Desktop(手動設定)
~/Library/Application Support/Claude/claude_desktop_config.json
Claude Code(CLI)
claude mcp add fatsecret -- npx -y fatsecret-mcpまたは環境変数を使用:
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-mcpclaude mcp list で確認できます。
Cursor
設定 UI —
設定 → MCP → + 新しい MCP サーバーを追加でコマンド、引数、環境変数を入力プロジェクト設定 — プロジェクトルートの
.cursor/mcp.jsonに JSON を追加グローバル設定 —
~/.cursor/mcp.jsonに JSON を追加
🛠️ 利用可能なツール
ツール | 説明 |
🔐 セットアップと認証 | |
| 認証情報とプロフィール認証の設定状況を確認します。最初に呼び出してください。 |
| FatSecret API 認証情報を永続設定に保存 |
| OAuth 1.0 認可を開始 — ユーザーがアクセスする URL を返す |
| 認可ページの確認コードで OAuth を完了 |
🔍 食品検索 (公開) | |
| 食品データベースを検索 |
| 食品の詳細な栄養情報を取得 |
| GTIN-13 バーコードで食品を検索 |
| 検索のオートコンプリート候補を取得 |
🍳 レシピ (公開) | |
| フィルター付きでレシピを検索 |
| 材料と手順を含むレシピ詳細を取得 |
📚 リファレンス (公開) | |
| 食品カテゴリを取得 |
| 食品サブカテゴリを取得 |
| 食品ブランドを取得 |
| レシピタイプを取得 |
📝 食事日記 (プロフィール認証) | |
| 指定日の食事日記エントリーを取得 |
| 月間栄養サマリーを取得(1日あたりのカロリーと栄養素) |
| 食事日記エントリーを追加 |
| 食事日記エントリーを編集 |
| 食事日記エントリーを削除 |
| エントリーを別の日にコピー |
| 保存済み食事を指定日にコピー |
⭐ お気に入り (プロフィール認証) | |
| お気に入りの食品を取得 |
| お気に入りから食品を削除 |
| 最もよく食べる食品を取得 |
| 最近食べた食品を取得 |
| お気に入りのレシピを取得 |
| レシピをお気に入りに追加 |
| お気に入りからレシピを削除 |
🍽️ 保存済み食事 (プロフィール認証) | |
| 保存済み食事を取得 |
| 保存済み食事を作成 |
| 保存済み食事を編集 |
| 保存済み食事を削除 |
| 保存済み食事のアイテムを取得 |
| 保存済み食事に食品を追加 |
| 保存済み食事アイテムを編集 |
| 保存済み食事からアイテムを削除 |
⚖️ 体重 (プロフィール認証) | |
| 指定日の体重を記録 |
| 月間の体重履歴を取得 |
🏃♂️ 運動 (プロフィール認証) | |
| 運動タイプを取得 |
| アクティビティ間で運動時間を移動 |
| 月間の運動データを取得 |
| 曜日ごとの運動テンプレートを保存 |
👤 プロフィール (プロフィール認証) | |
| ユーザープロフィール情報を取得 |
| カスタム食品を作成(Premier) |
API リファレンス: FatSecret Postman コレクション
🧪 接続テスト
npx fatsecret-mcpまたは環境変数を使用:
FATSECRET_CLIENT_ID='...' FATSECRET_CLIENT_SECRET='...' FATSECRET_CONSUMER_SECRET='...' npx fatsecret-mcp📋 必要条件
Node.js 18+
FatSecret Platform API アカウント(platform.fatsecret.com)
MCP 互換クライアント(Claude Desktop、Cursor など)
🔧 開発
リポジトリをクローン
npm install.env.exampleを.envにコピーし、認証情報を入力npm run devで開発モードで実行
MCP Inspector でのデバッグ:
FATSECRET_CLIENT_ID=X FATSECRET_CLIENT_SECRET=X FATSECRET_CONSUMER_SECRET=X npx -y @modelcontextprotocol/inspector npx <local-path>/fatsecret-mcp📄 ライセンス
MIT ライセンス - 詳細は LICENSE ファイルを参照してください。
Available Tools
44 toolsadd_favorite_recipeBIdempotent
Add a recipe to the user's favorites. Requires profile auth (check_auth_status first).
Inputs: recipe_id (required).
add_saved_meal_itemB
Add a food item to a saved meal. Requires profile auth (check_auth_status first).
Inputs: food_id (required), serving_id (required), saved_meal_id (required), number_of_units (required), +1 more.
autocomplete_foodsCRead-onlyIdempotent
Get autocomplete suggestions for a partial food search expression. Premier exclusive.
Inputs: expression (required), region, language, max_results.
check_auth_statusARead-onlyIdempotent
Check if API credentials and profile authentication are configured. Call this first to understand what setup is needed.
Inputs: no named parameters.
complete_authA
Complete the OAuth 1.0 flow with the verifier code from the authorization page.
Inputs: verifier (required).
copy_food_entriesA
Copy food entries from one date to another, optionally filtered by meal. Requires profile auth (check_auth_status first).
Inputs: to_date (required), from_date (required), meal.
copy_saved_meal_entriesA
Copy entries from a saved meal to a meal on a specific date. Requires profile auth (check_auth_status first).
Inputs: meal (required), saved_meal_id (required), date.
create_foodA
Create a custom food with nutrition info. Premier exclusive. Requires profile auth (check_auth_status first).
Inputs: fat (required), protein (required), calories (required), food_name (required), +21 more.
create_food_entryA
Add a food diary entry. Requires food_id, serving_id, and meal type. Requires profile auth (check_auth_status first).
Inputs: meal (required), food_id (required), serving_id (required), food_entry_name (required), +2 more.
create_saved_mealB
Create a new saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_name (required), meals, saved_meal_description.
delete_favorite_foodCDestructiveIdempotent
Remove a food from the user's favorites. Requires profile auth (check_auth_status first).
Inputs: food_id (required), serving_id, number_of_units.
delete_favorite_recipeADestructiveIdempotent
Remove a recipe from the user's favorites. Requires profile auth (check_auth_status first).
Inputs: recipe_id (required).
delete_food_entryBDestructiveIdempotent
Delete a food diary entry by ID. Requires profile auth (check_auth_status first).
Inputs: food_entry_id (required).
delete_saved_mealADestructiveIdempotent
Delete a saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_id (required).
delete_saved_meal_itemADestructiveIdempotent
Remove a food item from a saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_item_id (required).
edit_exercise_entriesA
Shift exercise time between activities for a date. Moves minutes from one exercise to another. Requires profile auth (check_auth_status first).
Inputs: minutes (required), shift_to_id (required), shift_from_id (required), date, +3 more.
edit_food_entryAIdempotent
Edit an existing food diary entry. Cannot change the date. Requires profile auth (check_auth_status first).
Inputs: food_entry_id (required), meal, serving_id, food_entry_name, +1 more.
edit_saved_mealAIdempotent
Edit a saved meal name, description, or associated meals. Requires profile auth (check_auth_status first).
Inputs: saved_meal_id (required), meals, saved_meal_name, saved_meal_description.
edit_saved_meal_itemAIdempotent
Edit a food item in a saved meal (name or units). Cannot change serving_id. Requires profile auth (check_auth_status first).
Inputs: saved_meal_item_id (required), number_of_units, saved_meal_item_name.
find_food_by_barcodeARead-onlyIdempotent
Find food by barcode (GTIN-13). UPC-A, EAN-13 and EAN-8 supported. Premier exclusive.
Inputs: barcode (required), region, language, include_food_images, +3 more.
get_brandsBRead-onlyIdempotent
Get the list of food brands, optionally filtered by starting letter and type. Premier exclusive.
Inputs: region, language, brand_type, starts_with.
get_exercise_entries_monthARead-onlyIdempotent
Get daily calories expended from exercise for a month. Requires profile auth (check_auth_status first).
Inputs: date.
get_exercisesARead-onlyIdempotent
Get the full list of supported exercise types and their IDs. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_favorite_foodsARead-onlyIdempotent
Get the user's favorite foods. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_favorite_recipesARead-onlyIdempotent
Get the user's favorite recipes. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_foodARead-onlyIdempotent
Get detailed nutritional information for a specific food by ID. Returns servings, calories, macros, and micronutrients.
Inputs: food_id (required), region, language, page_number, +4 more.
get_food_categoriesCRead-onlyIdempotent
Get the full list of food categories. Premier exclusive.
Inputs: region, language.
get_food_entriesARead-onlyIdempotent
Get food diary entries for a date or a specific entry by ID. Requires profile auth (check_auth_status first).
Inputs: date, food_entry_id.
get_food_entries_monthARead-onlyIdempotent
Get daily nutrition summary for a month. Returns calories and macros per day. Requires profile auth (check_auth_status first).
Inputs: date.
get_food_sub_categoriesARead-onlyIdempotent
Get food sub categories for a given food category. Premier exclusive.
Inputs: food_category_id (required), region, language.
get_most_eaten_foodsARead-onlyIdempotent
Get the user's most eaten foods, optionally filtered by meal. Requires profile auth (check_auth_status first).
Inputs: meal.
get_profileARead-onlyIdempotent
Get profile status information for the authenticated user. Requires profile auth (check_auth_status first).
Inputs: no named parameters.
get_recently_eaten_foodsARead-onlyIdempotent
Get the user's recently eaten foods, optionally filtered by meal. Requires profile auth (check_auth_status first).
Inputs: meal.
get_recipeARead-onlyIdempotent
Get detailed recipe information by ID including ingredients, directions, and nutrition.
Inputs: recipe_id (required), max_results, page_number.
get_recipe_typesARead-onlyIdempotent
Get the full list of supported recipe type names.
Inputs: no named parameters.
get_saved_meal_itemsARead-onlyIdempotent
Get all food items in a saved meal. Requires profile auth (check_auth_status first).
Inputs: saved_meal_id (required).
get_saved_mealsARead-onlyIdempotent
Get the user's saved meals, optionally filtered by meal type. Requires profile auth (check_auth_status first).
Inputs: meal.
get_weight_monthARead-onlyIdempotent
Get the user's weight entries for a month. Requires profile auth (check_auth_status first).
Inputs: date.
save_exercise_templateAIdempotent
Save the current day's exercise entries as a template for specified days of the week. Requires profile auth (check_auth_status first).
Inputs: days (required), date.
search_foodsBRead-onlyIdempotent
Search the FatSecret food database. Returns food names, descriptions, and basic nutrition info. On the Basic plan only search_expression, page_number and max_results (max 50) are used.
Inputs: search_expression (required), region, language, food_type, +6 more.
search_recipesBRead-onlyIdempotent
Search recipes with optional filters for calories, macros, prep time, and recipe types.
Inputs: sort_by, calories.to, max_results, page_number, +13 more.
setup_credentialsAIdempotent
Configure FatSecret API credentials. Get them at https://platform.fatsecret.com/ → My Account → API Keys. Saves to persistent config file.
Inputs: client_id (required), client_secret (required), consumer_secret (required).
start_authARead-only
Start the OAuth 1.0 authorization flow for profile access. Returns an authorization URL the user must visit. Requires API credentials (setup_credentials first).
Inputs: no named parameters.
update_weightAIdempotent
Record the user's weight for a date. First weigh-in requires goal_weight_kg and current_height_cm. Requires profile auth (check_auth_status first).
Inputs: current_weight_kg (required), date, comment, height_type, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Tools are mostly scoped to a single resource+action, and the food-lookup cluster (search_foods, autocomplete_foods, find_food_by_barcode, get_food) is clearly differentiated. Minor overlap remains in the exercise group (get_exercises, edit_exercise_entries, get_exercise_entries_month, save_exercise_template) where the boundaries between viewing types, viewing totals, and templating are less crisp, and the four auth tools need the 'first/next' sequencing cues to avoid confusion.
Nearly everything follows a predictable verb_noun snake_case pattern (get_*, create_*, edit_*, delete_*, add_*, copy_*, search_*). The only deviations are the auth verbs (check_/setup_/start_/complete_auth) and save_exercise_template vs create_saved_meal using different verbs for essentially the same 'make new' action.
44 tools is well past the heavy threshold, even for a broad API like FatSecret. The set spans eight sub-domains (auth, food lookup, diary, saved meals, recipes, favorites, exercise, weight), but the surface is large enough that an agent must navigate clusters to find the right operation rather than act directly.
There are real dead ends: exercise entries can be edited and summarized monthly but no tool creates an exercise entry, yet save_exercise_template presumes entries exist; favorites are asymmetric (get/delete_favorite_food but no add_favorite_food, while recipes have full add/get/delete); and custom foods can be created but never edited or deleted. These gaps will cause agent failures on otherwise core logging workflows.
Maintenance
Related MCP Connectors
Food nutrition lookup via natural language, barcode, and image. Database of 1,000,000+ foods.
Your Calori account in any AI assistant: nutrition targets, food logging, meal orders and deliveries
Nutrition data for AI agents and LLMs, powered by Edamam’s database of 1,000,000 foods, including 680,000+ with UPC codes. Lookup via natural language and barcode at low cost and low latency. Highly accurate, deterministic data covering macro and micronutrients, allergens, and lifestyle diet tags.
Free food diary for ChatGPT: log meals by chat, track calories, macros and 54 nutrients.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides AI assistants with real-time access to nutrition data from USDA FoodData Central and FatSecret, enabling accurate answers with citations for nutrition queries.-
- AlicenseNot gradedqualityDmaintenanceEnables searching and retrieving nutrition data, recipes, and managing food diary entries through the FatSecret API.MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to interact with MyFitnessPal data including food diary, exercises, body measurements, nutrition goals, and water intake through natural language.2073MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to search foods and recipes, look up barcodes, and manage food diaries, saved meals, favorites, weight, exercise, and profile data through a nutrition platform API.44MIT