Skip to main content
Glama

Kroger MCP Server

🛒 Kroger MCP サーバー 🛍️ -- Kroger ショッピング向け FastMCP

FastMCPサーバーは、クロードのようなAIアシスタントに、モデルコンテキストプロトコル( MCP )を介してクローガーの食料品ショッピング機能へのシームレスなアクセスを提供します。このサーバーにより、AIアシスタントは店舗の検索、商品の検索、ショッピングカートの管理、そしてkroger-api Pythonライブラリを介してクローガーの包括的な食料品データへのアクセスが可能になります。

📺 デモ

この MCP サーバーで Claude を使用して、店舗を検索し、製品を見つけ、アイテムをカートに追加します。

Kroger MCP デモ

🚀 クイックスタート

前提条件

Kroger API認証情報( Kroger Developer Portalから無料で入手可能)が必要です。Kroger Developer Portalにアクセスして、以下の操作を行ってください。

  1. 開発者アカウントを作成する

  2. アプリケーションを登録する

  3. CLIENT_IDCLIENT_SECRETを取得し、 REDIRECT_URIを設定します。

ユーザー認証を必要とするツールを初めて実行する際、ウェブブラウザでアプリの認証を求めるメッセージが表示されます。認証は、第三者ではなく、ご自身の登録済みアプリに対して行われます。

インストール

オプション 1: Claude Desktop で uvx を使用する (推奨)

PyPI に公開したら、リポジトリをクローンせずに uvx を使用してパッケージを直接実行できます。

Claude Desktop の設定ファイルを編集します。

macOS : ~/Library/Application Support/Claude/claude_desktop_config.json

Linux : ~/.config/Claude/claude_desktop_config.json

Windows : %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "kroger": { "command": "uvx", "args": [ "kroger-mcp" ], "env": { "KROGER_CLIENT_ID": "your_client_id", "KROGER_CLIENT_SECRET": "your_client_secret", "KROGER_REDIRECT_URI": "http://localhost:8000/callback", "KROGER_USER_ZIP_CODE": "10001" } } } }

この方法の利点:

  • 必要に応じてPyPIからパッケージを自動的にインストールします

  • サーバーを実行するための隔離された環境を作成します

  • 最新バージョンを簡単に入手できるようになります

  • ローカルリポジトリのクローンを維持する必要がない

オプション2: ローカルクローンでUVを使用する

まず、ローカルにクローンを作成します。

git clone https://github.com/CupOfOwls/kroger-mcp

次に、Claude Desktop の構成ファイルを編集します。

{ "mcpServers": { "kroger": { "command": "uv", "args": [ "--directory", "/path/to/cloned/kroger-mcp", "run", "kroger-mcp" ], "env": { "KROGER_CLIENT_ID": "your_client_id", "KROGER_CLIENT_SECRET": "your_client_secret", "KROGER_REDIRECT_URI": "http://localhost:8000/callback", "KROGER_USER_ZIP_CODE": "10001" } } } }

オプション3: PyPIからインストールする

# Install with uv (recommended) uv pip install kroger-mcp # Or install with pip pip install kroger-mcp

オプション4: ソースからインストールする

# Clone the repository git clone https://github.com/CupOfOwls/kroger-mcp cd kroger-mcp # Install with uv (recommended) uv sync # Or install with pip pip install -e .

構成

プロジェクト ルートに.envファイルを作成するか、JSON 構成を介して env 値を渡します。

# Required: Your Kroger API credentials KROGER_CLIENT_ID=your_client_id_here KROGER_CLIENT_SECRET=your_client_secret_here KROGER_REDIRECT_URI=http://localhost:8000/callback # Optional: Default zip code for location searches KROGER_USER_ZIP_CODE=90274

サーバーの実行

# With uv (recommended) uv run kroger-mcp # With uvx (directly from PyPI without installation) uvx kroger-mcp # Or with Python directly python server.py # With FastMCP CLI for development fastmcp dev server.py --with-editable .

🛠️ 機能

💬 組み込みの MCP プロンプト

  • ショッピングパス: 食料品リストに基づいて店内の最適な経路を見つける

  • 薬局チェック:希望する場所の薬局が営業しているか確認する

  • 店舗選択: ユーザーが好みの Kroger 店舗を設定できるように支援します

  • レシピショッピング:レシピを見つけて材料をカートに追加します

📚 利用可能なツール

位置情報ツール

道具

説明

認証が必要です

search_locations

郵便番号の近くにあるKroger店舗を探す

いいえ

get_location_details

特定の店舗の詳細情報を取得する

いいえ

set_preferred_location

今後の操作のために優先ストアを設定する

いいえ

get_preferred_location

現在設定されている優先ストアを取得する

いいえ

check_location_exists

場所IDが有効かどうかを確認する

いいえ

製品ツール

道具

説明

認証が必要です

search_products

名前、ブランド、その他の条件で製品を検索します

いいえ

get_product_details

価格を含む詳細な製品情報を入手

いいえ

search_products_by_id

特定の製品IDで製品を検索する

いいえ

get_product_images

特定の視点(前面、背面など)から製品画像を取得します

いいえ

カートツール

道具

説明

認証が必要です

add_items_to_cart

商品を1つカートに追加

はい

bulk_add_to_cart

1 回の操作で複数の商品をカートに追加

はい

view_current_cart

現在ローカルカートの追跡にあるアイテムを表示する

いいえ

remove_from_cart

ローカルカートトラッキングからアイテムを削除する

いいえ

clear_current_cart

ローカルカートの追跡からすべてのアイテムをクリアする

いいえ

mark_order_placed

現在のカートを注文履歴に移動する

いいえ

view_order_history

注文履歴を表示する

いいえ

情報ツール

道具

説明

認証が必要です

list_chains

クローガー傘下のチェーン店をすべて見る

いいえ

get_chain_details

特定のチェーンの詳細を取得する

いいえ

check_chain_exists

チェーンが存在するかどうかを確認する

いいえ

list_departments

すべての店舗部門を取得する

いいえ

get_department_details

特定の部門の詳細を取得する

いいえ

check_department_exists

部門が存在するかどうかを確認する

いいえ

プロフィールツール

道具

説明

認証が必要です

get_user_profile

認証されたユーザーのプロフィール情報を取得する

はい

test_authentication

認証トークンが有効かどうかをテストする

はい

get_authentication_info

詳細な認証ステータスを取得する

はい

force_reauthenticate

トークンをクリアして再認証を強制する

いいえ

ユーティリティツール

道具

説明

認証が必要です

get_current_datetime

現在のシステムの日付と時刻を取得する

いいえ

🧰 ローカル限定のカート追跡

Kroger API はカートの表示機能を提供しないため、このサーバーはローカル トラッキングを維持します。

ローカルカートストレージ

  • ファイル: kroger_cart.json

  • 内容: タイムスタンプ付きの現在のカートアイテム

  • 自動: 自動的に作成および更新されます

注文履歴

  • ファイル: kroger_order_history.json

  • 内容: 発注タイムスタンプ付きの過去の注文

  • 使用方法: mark_order_placedで完了したカートを履歴に移動する

🚧 Kroger パブリック API の制限

  • 表示のみ: remove_from_cartおよびclear_current_cartツールはローカルトラッキングにのみ影響し、実際のKrogerカートには影響しません。

  • ローカル同期: ユーザーが Kroger アプリ/ウェブサイトでカートからアイテムを削除した場合にのみ、これらのツールを使用します。

  • 一方通行:パブリックAPIでは、Krogerのカートに商品を追加することはできますが、削除することはできません。パートナーAPIではこれらの操作が可能ですが、Krogerとの契約が必要です。

API

バージョン

レート制限

注記

承認

1.0.13

特に制限なし

トークン管理

製品

1.2.4

1日10,000件の通話

検索と製品の詳細

場所

1.2.2

エンドポイントあたり1日1,600回の通話

店舗の場所と詳細

カート

1.2.3

1日5,000件の通話

カートアイテムの追加/管理

身元

1.2.3

1日5,000件の通話

ユーザープロフィール情報

**注:**レート制限はオペレーションごとではなくエンドポイントごとに適用されます。必要に応じて、同じエンドポイントを使用して複数のオペレーションに呼び出しを分散できます。

🏫 基本的なワークフロー

  1. 優先場所を設定します:

    User: "Find Kroger stores near 90274" Assistant: [Uses search_locations tool] User: "Set the first one as my preferred location" Assistant: [Uses set_preferred_location tool]
  2. 製品の検索と追加:

    User: "Add milk to my cart" Assistant: [Uses search_products, then add_items_to_cart] User: "Add bread, eggs, and cheese to my cart" Assistant: [Uses search_products for each, then bulk_add_to_cart]
  3. カートと注文の管理:

    User: "What's in my cart?" Assistant: [Uses view_current_cart tool to see local memory] User: "I placed the order on the Kroger website" Assistant: [Uses mark_order_placed tool, moving current cart to the order history]

🤝 貢献する

貢献を歓迎します!お気軽にプルリクエストを送信してください。大きな変更については、まずIssueを開いて、変更したい点について議論してください。

📄 ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

⚠️免責事項

これはKrogerパブリックAPIの非公式MCPサーバーです。Krogerと提携、承認、またはスポンサー契約を結んでいません。

Kroger API に関する質問については、 Kroger 開発者ポータルにアクセスするか、 kroger-apiパッケージのドキュメントをお読みください。

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Claude のような AI アシスタントに、モデル コンテキスト プロトコルを通じて Kroger の食料品ショッピング機能へのシームレスなアクセスを提供し、店舗検索、製品検索、カート管理を可能にする FastMCP サーバー。

  1. 📺 デモ
    1. 🚀 クイックスタート
      1. 前提条件
      2. インストール
      3. 構成
      4. サーバーの実行
    2. 🛠️ 機能
      1. 💬 組み込みの MCP プロンプト
      2. 📚 利用可能なツール
      3. 🧰 ローカル限定のカート追跡
      4. 🚧 Kroger パブリック API の制限
    3. 🏫 基本的なワークフロー
      1. 🤝 貢献する
        1. 📄 ライセンス
          1. ⚠️免責事項

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
              Last updated -
              196
              MIT License
              • Apple
              • Linux
            • A
              security
              F
              license
              A
              quality
              An MCP server that connects AI assistants to SearchAgora, enabling users to search for, discover, and purchase products across the web through natural language conversations.
              Last updated -
              6
              2
              • Apple
            • -
              security
              A
              license
              -
              quality
              Allows Large Language Models to interact with Kroger's grocery services, enabling product search, store lookup, and cart management through the Model Context Protocol.
              Last updated -
              1
              MIT License
            • -
              security
              F
              license
              -
              quality
              A high-speed MCP server that enables AI assistants like Claude to interact with local filesystems, manage Git repositories, and provide interactive experiences through a standardized JSON-based protocol.
              Last updated -
              5
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/CupOfOwls/kroger-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server