Family Grocery MCP

Family Grocery MCP

MCP server for family meal planning and Kroger/King Soopers shopping. It helps generate weekly dinner plans, consolidate grocery lists, flag allergy risks, estimate costs, search live products, and add approved items to a Kroger cart.

Category
访问服务器

README

Family Grocery MCP

An MVP proof of concept for a family meal-planning and Kroger/King Soopers shopping assistant.

The project is intentionally split into two layers:

  • references/kroger-mcp/: cloned upstream Kroger MCP reference.
  • src/family_grocery_mcp/: our family-specific planning, allergy review, shopping-list, budget, and cart-prep layer.

Current MVP

This first pass works without Kroger credentials by using a small mock catalog. It can:

  • Load a household profile from data/household_profile.json
  • Suggest a Mediterranean-leaning weekly dinner plan
  • Generate leftover lunches
  • Consolidate a grocery list from selected meals
  • Match grocery items to mock products
  • Flag egg, peanut, and tree-nut allergy risks
  • Estimate total cost against a monthly budget
  • Search live Kroger/King Soopers locations and products
  • Prepare a conservative approved-cart list from live product matches
  • Start and complete Kroger cart OAuth
  • Add only approved, non-review items to the Kroger cart after explicit confirmation
  • Expose the workflow as MCP tools when dependencies are installed

Quick Demo

python3 -m family_grocery_mcp.cli demo

If running directly from the repo without installing, use:

PYTHONPATH=src python3 -m family_grocery_mcp.cli demo

Live Kroger Public API Checks

After creating .env, validate credentials without printing secrets:

PYTHONPATH=src python3 -m family_grocery_mcp.cli validate-kroger

Search nearby stores:

PYTHONPATH=src python3 -m family_grocery_mcp.cli locations --zip 80005

Search products at a selected store:

PYTHONPATH=src python3 -m family_grocery_mcp.cli products "greek yogurt" --location-id "YOUR_LOCATION_ID"

Preview the seed meal plan with live Kroger product matches:

PYTHONPATH=src python3 -m family_grocery_mcp.cli preview-live --location-id "YOUR_LOCATION_ID"

Live compact product search does not reliably include full ingredient lists, so packaged foods are marked for review by default. Raw produce, meat, and seafood can be treated as lower-risk matches, but checkout still remains manual.

MCP Server

Install dependencies once:

uv sync

Run the MCP server:

uv run family-grocery-mcp

Claude Desktop/Codex MCP config can use:

{
  "mcpServers": {
    "family-grocery": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/kkaminky/Documents/Grocery Shopper",
        "run",
        "family-grocery-mcp"
      ]
    }
  }
}

Current MCP tools include:

  • plan_week
  • preview_shopping
  • validate_kroger
  • search_kroger_locations
  • search_kroger
  • preview_live_shopping
  • start_kroger_cart_auth
  • complete_kroger_cart_auth
  • kroger_cart_auth_status
  • prepare_kroger_cart
  • add_approved_items_to_kroger_cart
  • add_single_item_to_kroger_cart

Cart OAuth and Add-To-Cart

Start cart authentication:

uv run family-grocery cart-auth-start

Open the returned URL, log in, then copy the final redirected URL and run:

uv run family-grocery cart-auth-complete "PASTE_FULL_REDIRECT_URL_HERE"

Preview what would be added:

uv run family-grocery cart-preview --dinners 2

Add only approved, non-review items to the real Kroger cart:

uv run family-grocery cart-add-approved --dinners 2 --confirm

Add one explicit test item by UPC:

uv run family-grocery cart-add-item 0000000094053 --quantity 1 --confirm

Items flagged for missing ingredient data, egg, peanut, or tree-nut risk are skipped.

Kroger Developer Setup

Create a Kroger developer app before live cart testing:

  1. Go to Kroger Developer.

  2. Sign in or create a developer account.

  3. Open My Apps / Manage Apps and create a new application.

  4. Set the OAuth redirect URI exactly to:

    http://localhost:8000/callback
    
  5. Enable/request these scopes:

    product.compact
    cart.basic:write
    profile.compact
    
  6. Copy the client ID and client secret into a local .env file:

    cp .env.example .env
    

    Then edit .env locally. Do not commit secrets.

The public Kroger API can add items to a cart, but it cannot fully view or remove cart contents. This assistant keeps local tracking and expects a human to review the real cart before checkout.

MCP Configuration

Once dependencies are installed, point Claude Desktop or another MCP client at:

{
  "mcpServers": {
    "family-grocery": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/kkaminky/Documents/Grocery Shopper",
        "run",
        "family-grocery-mcp"
      ],
      "env": {
        "FAMILY_GROCERY_PROFILE": "/Users/kkaminky/Documents/Grocery Shopper/data/household_profile.json",
        "KROGER_USER_ZIP_CODE": "80005"
      }
    }
  }
}

Next Build Steps

  1. Import recipes from PDFs and URLs.
  2. Persist approved products, substitutions, and rejected products.
  3. Improve quantity/package math for produce and meat.
  4. Add a small review UI for allergy uncertainty and budget tradeoffs.
  5. Add recipe/meal-plan editing instead of only seed meals.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选