Kroger MCP Server
🛒 Kroger MCP サーバー 🛍️ -- Kroger ショッピング向け FastMCP
FastMCPサーバーは、クロードのようなAIアシスタントに、モデルコンテキストプロトコル( MCP )を介してクローガーの食料品ショッピング機能へのシームレスなアクセスを提供します。このサーバーにより、AIアシスタントは店舗の検索、商品の検索、ショッピングカートの管理、そしてkroger-api Pythonライブラリを介してクローガーの包括的な食料品データへのアクセスが可能になります。
📺 デモ
この MCP サーバーで Claude を使用して、店舗を検索し、製品を見つけ、アイテムをカートに追加します。
Related MCP server: mcp-carrefour
🚀 クイックスタート
前提条件
Kroger API認証情報( Kroger Developer Portalから無料で入手可能)が必要です。Kroger Developer Portalにアクセスして、以下の操作を行ってください。
開発者アカウントを作成する
アプリケーションを登録する
CLIENT_ID、CLIENT_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 店舗を設定できるように支援します
レシピショッピング:レシピを見つけて材料をカートに追加します
📚 利用可能なツール
位置情報ツール
道具 | 説明 | 認証が必要です |
| 郵便番号の近くにあるKroger店舗を探す | いいえ |
| 特定の店舗の詳細情報を取得する | いいえ |
| 今後の操作のために優先ストアを設定する | いいえ |
| 現在設定されている優先ストアを取得する | いいえ |
| 場所IDが有効かどうかを確認する | いいえ |
製品ツール
道具 | 説明 | 認証が必要です |
| 名前、ブランド、その他の条件で製品を検索します | いいえ |
| 価格を含む詳細な製品情報を入手 | いいえ |
| 特定の製品IDで製品を検索する | いいえ |
| 特定の視点(前面、背面など)から製品画像を取得します | いいえ |
カートツール
道具 | 説明 | 認証が必要です |
| 商品を1つカートに追加 | はい |
| 1 回の操作で複数の商品をカートに追加 | はい |
| 現在ローカルカートの追跡にあるアイテムを表示する | いいえ |
| ローカルカートトラッキングからアイテムを削除する | いいえ |
| ローカルカートの追跡からすべてのアイテムをクリアする | いいえ |
| 現在のカートを注文履歴に移動する | いいえ |
| 注文履歴を表示する | いいえ |
情報ツール
道具 | 説明 | 認証が必要です |
| クローガー傘下のチェーン店をすべて見る | いいえ |
| 特定のチェーンの詳細を取得する | いいえ |
| チェーンが存在するかどうかを確認する | いいえ |
| すべての店舗部門を取得する | いいえ |
| 特定の部門の詳細を取得する | いいえ |
| 部門が存在するかどうかを確認する | いいえ |
プロフィールツール
道具 | 説明 | 認証が必要です |
| 認証されたユーザーのプロフィール情報を取得する | はい |
| 認証トークンが有効かどうかをテストする | はい |
| 詳細な認証ステータスを取得する | はい |
| トークンをクリアして再認証を強制する | いいえ |
ユーティリティツール
道具 | 説明 | 認証が必要です |
| 現在のシステムの日付と時刻を取得する | いいえ |
🧰 ローカル限定のカート追跡
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件の通話 | ユーザープロフィール情報 |
**注:**レート制限はオペレーションごとではなくエンドポイントごとに適用されます。必要に応じて、同じエンドポイントを使用して複数のオペレーションに呼び出しを分散できます。
🏫 基本的なワークフロー
優先場所を設定します:
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]製品の検索と追加:
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]カートと注文の管理:
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パッケージのドキュメントをお読みください。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with a complete e-commerce application, providing authentication, product browsing, and shopping cart management through standardized MCP tools.
- AlicenseNot gradedqualityDmaintenanceMCP server that connects Carrefour Drive to Claude and other MCP clients, enabling product search with real prices, nutriscore, availability, and natural language cart management.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Online Boutique AI Assistant that exposes 18 e-commerce microservice functions via the Model Context Protocol, enabling any MCP client to manage products, carts, checkout, payments, and shipping.MIT
- AlicenseNot gradedqualityAmaintenanceControl your grocery cart with AI! This MCP server enables LLMs (like Claude) to search past orders, find products, and manage your shopping cart across all Loblaws-owned grocery banners.6AGPL 3.0
Related MCP Connectors
Connect e-commerce and marketing data to AI assistants via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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