Kroger MCP Server
Kroger MCP 服务器
将 Kroger 的公共 API 与 Claude 集成,以便可以将膳食计划购物清单直接添加到您的 Kroger 购物车中。
工具
工具 | 功能 |
| 通过邮政编码查找附近的 Kroger 门店,返回 |
| 搜索产品目录,返回 UPC + 价格 + 通道 |
| 通过 UPC 将单个产品添加到您的购物车 |
| 一次性搜索并添加整个购物清单 |
| 清除存储的令牌(如果您需要重新进行身份验证) |
Related MCP server: Tiv Taam MCP Server
设置
第 1 步 — 在 Kroger 开发者门户注册您的应用
点击 Register App
填写:
应用名称:
Meal Plan Assistant(或任何名称)重定向 URI:
http://localhost:8080/callback作用域:
product.compact,cart.basic:write,profile.compact
复制您的 Client ID 和 Client Secret
第 2 步 — 安装依赖项
cd kroger_mcp
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt第 3 步 — 设置环境变量
export KROGER_CLIENT_ID=your_client_id_here
export KROGER_CLIENT_SECRET=your_client_secret_here
export KROGER_REDIRECT_URI=http://localhost:8080/callback将这些添加到您的 shell 配置文件(~/.zshrc 或 ~/.bashrc)中,以便它们持久生效。
第 4 步 — 连接到 Claude
添加到您的 Claude MCP 配置中(在 Mac 上通常为 ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"kroger": {
"command": "/path/to/kroger_mcp/venv/bin/python",
"args": ["/path/to/kroger_mcp/server.py"],
"env": {
"KROGER_CLIENT_ID": "your_client_id",
"KROGER_CLIENT_SECRET": "your_client_secret",
"KROGER_REDIRECT_URI": "http://localhost:8080/callback"
}
}
}
}保存后重启 Claude Desktop。
首次使用 — OAuth 登录
当您第一次要求 Claude 将商品添加到购物车时:
您的浏览器将打开 Kroger 的登录页面
使用您的 Kroger 账户登录
将重定向 URL 粘贴回终端
完成 — 令牌已保存在
~/.kroger_mcp_tokens.json中
此后,Claude 可以使用存储的刷新令牌静默地添加到您的购物车。
示例流程
连接后,您可以对 Claude 说:
"找到我最近的 Kroger 门店,并将本周的购物清单添加到我的购物车"
Claude 将:
使用您的邮政编码调用
kroger_find_store使用所有商品调用
kroger_add_grocery_list反馈已添加的内容、跳过的内容以及任何问题
安全说明
您的 Client ID 和 Secret 是您自己的 — 在您的账户下注册
令牌存储在本地
~/.kroger_mcp_tokens.json(权限:600)不涉及第三方代码 — 直接调用 Kroger 的官方 API
kroger_clear_auth可在需要时删除所有存储的令牌
故障排除
"Missing environment variables" — 设置 KROGER_CLIENT_ID 和 KROGER_CLIENT_SECRET
"Authorization expired" — 重试该操作;服务器将自动刷新
"No matching product found" — 尝试更短的搜索词(例如,使用 "spinach" 而不是 "Private Selection Baby Spinach")
速率限制 (HTTP 429) — Kroger 限制请求;请等待 30 秒后重试
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI meal plans that fill your Kroger/Instacart cart - pantry-aware lists, all from chat.
Your recipes, family meal plan and shopping list from Foodie, in ChatGPT, Claude and Codex.
Log meals, water, and weight to Garmin Connect from Claude or ChatGPT.
AnyList MCP server for ChatGPT, Claude and any AI agent: list shopping lists, add list item, cross off item, read recipe, create recipe, add recipe to meal plan and add meal plan ingredients to list in your own AnyList account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to AnyList yourself; Cotlet does not store your password and you need no AnyList API key. About the official AnyList API: AnyList has no public API, developer docs or official MCP server (checked 25 Oct 2026). The official connections are voice entry with Siri and Amazon Alexa, and an iCalendar link that shows your meal plan in a calendar app. Setup and FAQ: https://cotlet.dev/integrations/anylist-api-mcp-server
Related MCP Servers
- AlicenseCqualityDmaintenanceAutomated grocery shopping assistant with intelligent unit pricing and automatic coupon clipping, enabling AI to search products, manage carts, and plan grocery runs via Claude Desktop or CLI.181-
- FlicenseNot gradedqualityDmaintenanceEnables shopping at Tiv Taam grocery store through Claude, including recipe parsing and cart population.-
- AlicenseNot gradedqualityBmaintenanceEnables AI models to manage Kroger/QFC shopping lists, search products, and plan meals via the Kroger API.1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to search products, manage shopping carts, clip digital coupons, check fuel points, schedule delivery/pickup, and place grocery orders with Kroger.1551 npm2MIT