Skip to main content
Glama
FatSecret MCP Server

FatSecret MCP Server

by fliptheweb

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 がセットアップをガイドします:

  1. check_auth_status — 認証情報の不足を検出し、必要な手順を案内

  2. setup_credentials — API キーを提供(~/.fatsecret-mcp/config.json に保存)

  3. 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"
      }
    }
  }
}

🔑 認証情報の取得方法

  1. platform.fatsecret.com で無料アカウントを作成

  2. マイアカウント → API キー に移動

  3. 以下の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-mcp

claude mcp list で確認できます。

Cursor

  • 設定 UI — 設定 → MCP → + 新しい MCP サーバーを追加 でコマンド、引数、環境変数を入力

  • プロジェクト設定 — プロジェクトルートの .cursor/mcp.json に JSON を追加

  • グローバル設定 — ~/.cursor/mcp.json に JSON を追加

🛠️ 利用可能なツール

ツール

説明

🔐 セットアップと認証

check_auth_status

認証情報とプロフィール認証の設定状況を確認します。最初に呼び出してください。

setup_credentials

FatSecret API 認証情報を永続設定に保存

start_auth

OAuth 1.0 認可を開始 — ユーザーがアクセスする URL を返す

complete_auth

認可ページの確認コードで OAuth を完了

🔍 食品検索 (公開)

search_foods

食品データベースを検索

get_food

食品の詳細な栄養情報を取得

find_food_by_barcode

GTIN-13 バーコードで食品を検索

autocomplete_foods

検索のオートコンプリート候補を取得

🍳 レシピ (公開)

search_recipes

フィルター付きでレシピを検索

get_recipe

材料と手順を含むレシピ詳細を取得

📚 リファレンス (公開)

get_food_categories

食品カテゴリを取得

get_food_sub_categories

食品サブカテゴリを取得

get_brands

食品ブランドを取得

get_recipe_types

レシピタイプを取得

📝 食事日記 (プロフィール認証)

get_food_entries

指定日の食事日記エントリーを取得

get_food_entries_month

月間栄養サマリーを取得(1日あたりのカロリーと栄養素)

create_food_entry

食事日記エントリーを追加

edit_food_entry

食事日記エントリーを編集

delete_food_entry

食事日記エントリーを削除

copy_food_entries

エントリーを別の日にコピー

copy_saved_meal_entries

保存済み食事を指定日にコピー

⭐ お気に入り (プロフィール認証)

get_favorite_foods

お気に入りの食品を取得

delete_favorite_food

お気に入りから食品を削除

get_most_eaten_foods

最もよく食べる食品を取得

get_recently_eaten_foods

最近食べた食品を取得

get_favorite_recipes

お気に入りのレシピを取得

add_favorite_recipe

レシピをお気に入りに追加

delete_favorite_recipe

お気に入りからレシピを削除

🍽️ 保存済み食事 (プロフィール認証)

get_saved_meals

保存済み食事を取得

create_saved_meal

保存済み食事を作成

edit_saved_meal

保存済み食事を編集

delete_saved_meal

保存済み食事を削除

get_saved_meal_items

保存済み食事のアイテムを取得

add_saved_meal_item

保存済み食事に食品を追加

edit_saved_meal_item

保存済み食事アイテムを編集

delete_saved_meal_item

保存済み食事からアイテムを削除

⚖️ 体重 (プロフィール認証)

update_weight

指定日の体重を記録

get_weight_month

月間の体重履歴を取得

🏃♂️ 運動 (プロフィール認証)

get_exercises

運動タイプを取得

edit_exercise_entries

アクティビティ間で運動時間を移動

get_exercise_entries_month

月間の運動データを取得

save_exercise_template

曜日ごとの運動テンプレートを保存

👤 プロフィール (プロフィール認証)

get_profile

ユーザープロフィール情報を取得

create_food

カスタム食品を作成(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 など)

🔧 開発

  1. リポジトリをクローン

  2. npm install

  3. .env.example を .env にコピーし、認証情報を入力

  4. 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 tools
add_favorite_recipeB
Idempotent

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_foodsC
Read-onlyIdempotent

Get autocomplete suggestions for a partial food search expression. Premier exclusive.

Inputs: expression (required), region, language, max_results.

check_auth_statusA
Read-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_foodC
DestructiveIdempotent

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_recipeA
DestructiveIdempotent

Remove a recipe from the user's favorites. Requires profile auth (check_auth_status first).

Inputs: recipe_id (required).

delete_food_entryB
DestructiveIdempotent

Delete a food diary entry by ID. Requires profile auth (check_auth_status first).

Inputs: food_entry_id (required).

delete_saved_mealA
DestructiveIdempotent

Delete a saved meal. Requires profile auth (check_auth_status first).

Inputs: saved_meal_id (required).

delete_saved_meal_itemA
DestructiveIdempotent

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_entryA
Idempotent

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_mealA
Idempotent

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_itemA
Idempotent

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_barcodeA
Read-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_brandsB
Read-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_monthA
Read-onlyIdempotent

Get daily calories expended from exercise for a month. Requires profile auth (check_auth_status first).

Inputs: date.

get_exercisesA
Read-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_foodsA
Read-onlyIdempotent

Get the user's favorite foods. Requires profile auth (check_auth_status first).

Inputs: no named parameters.

get_favorite_recipesA
Read-onlyIdempotent

Get the user's favorite recipes. Requires profile auth (check_auth_status first).

Inputs: no named parameters.

get_foodA
Read-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_categoriesC
Read-onlyIdempotent

Get the full list of food categories. Premier exclusive.

Inputs: region, language.

get_food_entriesA
Read-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_monthA
Read-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_categoriesA
Read-onlyIdempotent

Get food sub categories for a given food category. Premier exclusive.

Inputs: food_category_id (required), region, language.

get_most_eaten_foodsA
Read-onlyIdempotent

Get the user's most eaten foods, optionally filtered by meal. Requires profile auth (check_auth_status first).

Inputs: meal.

get_profileA
Read-onlyIdempotent

Get profile status information for the authenticated user. Requires profile auth (check_auth_status first).

Inputs: no named parameters.

get_recently_eaten_foodsA
Read-onlyIdempotent

Get the user's recently eaten foods, optionally filtered by meal. Requires profile auth (check_auth_status first).

Inputs: meal.

get_recipeA
Read-onlyIdempotent

Get detailed recipe information by ID including ingredients, directions, and nutrition.

Inputs: recipe_id (required), max_results, page_number.

get_recipe_typesA
Read-onlyIdempotent

Get the full list of supported recipe type names.

Inputs: no named parameters.

get_saved_meal_itemsA
Read-onlyIdempotent

Get all food items in a saved meal. Requires profile auth (check_auth_status first).

Inputs: saved_meal_id (required).

get_saved_mealsA
Read-onlyIdempotent

Get the user's saved meals, optionally filtered by meal type. Requires profile auth (check_auth_status first).

Inputs: meal.

get_weight_monthA
Read-onlyIdempotent

Get the user's weight entries for a month. Requires profile auth (check_auth_status first).

Inputs: date.

save_exercise_templateA
Idempotent

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_foodsB
Read-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_recipesB
Read-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_credentialsA
Idempotent

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_authA
Read-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_weightA
Idempotent

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

    B3.3/5.0

    Scored across 44 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count2/5

    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.

    Completeness2/5

    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

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers