Skip to main content
Glama
Grocery Logger MCP Server

Grocery Logger MCP Server

by jihopark

Grocery Logger MCP Server

A Model Context Protocol (MCP) server for logging and analyzing grocery purchases. Works with Claude Desktop to track prices, spending patterns, and purchase history.

Features

  • Bulk add grocery items with timestamp, vendor, item name, category, price, quantity, and unit

  • Query item prices with average price and purchase history

  • List items by category with price statistics

  • Analyze spending by vendor, category, or date range

  • List categories to maintain consistency when logging

Related MCP server: Raley

Installation

Requires Python 3.10+ and uv.

# Clone the repo
git clone <your-repo-url>
cd grocery_mcp

# Install dependencies
uv sync

Claude Desktop Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "grocery-logger": {
      "command": "/usr/local/bin/uv",
      "args": [
        "run",
        "--directory", "/path/to/grocery_mcp",
        "grocery-mcp"
      ]
    }
  }
}

Then restart Claude Desktop.

Available Tools

Tool

Description

add_grocery_items

Bulk add grocery purchases

query_item_price

Get price history and average for an item

list_items_by_category

List all items in a category with stats

query_spending

Analyze spending by vendor, category, or date

list_categories

List existing categories for consistency

Example Usage

Once configured, ask Claude:

  • "Log these groceries: 2 lbs bananas $2.99, 1 gallon milk $4.50 from Costco"

  • "What was the price of green onions?"

  • "How much did I spend at Trader Joes this month?"

  • "Show me all produce items I've bought"

  • "What's my average spending by category?"

Data Storage

Grocery data is stored in data/grocery.db (SQLite). This file is gitignored to keep your personal data private.

Available Tools

5 tools
add_grocery_itemsA

Bulk add grocery items to the database.

Use this tool to log one or more grocery purchases. Each item requires:

  • timestamp: When purchased (ISO format, e.g., "2025-01-10T14:30:00")

  • vendor: Store name (e.g., "Costco", "Whole Foods")

  • item_name: Product name WITHOUT quantity/weight (e.g., "Organic Bananas", "Frozen Cooked Mussel")

  • category: One of: produce, dairy, eggs, meat, seafood, bakery, deli, frozen, pantry, beverages, snacks, condiments, spices, household, personal_care, baby, pet, alcohol, other

  • price: Price paid (e.g., 3.99)

  • quantity: The numeric amount (e.g., 2.0, 340, 1.5)

  • unit: Unit of the quantity (e.g., "each", "lb", "oz", "g", "kg", "ml", "L", "bunch", "bag")

IMPORTANT: Parse quantity and unit from item descriptions. Examples:

  • "Frozen Cooked Mussel 340g" -> item_name: "Frozen Cooked Mussel", quantity: 340, unit: "g"

  • "2 lbs Ground Beef" -> item_name: "Ground Beef", quantity: 2, unit: "lb"

  • "Milk 1 gallon" -> item_name: "Milk", quantity: 1, unit: "gallon"

  • "3 Avocados" -> item_name: "Avocado", quantity: 3, unit: "each"

Inputs: items (required).

list_categoriesA

List all valid grocery categories.

Returns the fixed set of valid categories and shows which ones have items logged. Use these exact category names when adding items.

Inputs: no named parameters.

list_items_by_categoryA

List all items in a category with their prices.

Get distinct items from a category (partial match supported). Optionally includes price statistics (min, max, average) per item.

Args: category: Category to search (e.g., "produce", "dairy") include_price_stats: Include min/max/avg prices (default: True)

Inputs: category (required), include_price_stats.

query_item_priceA

Get average price and price history for a grocery item.

Search for an item by name (partial match supported) and optionally filter by vendor. Returns average price and recent purchase history.

Args: item_name: Name to search for (e.g., "banana" matches "Organic Bananas") vendor: Optional vendor filter (e.g., "Costco") limit: Maximum history entries to return (default: 10)

Inputs: item_name (required), limit, vendor.

query_spendingA

Query total spending with optional filters.

Use this tool to analyze spending patterns. Supports filtering by:

  • vendor: Store name (e.g., "Trader Joes", "Costco")

  • category: Category name (e.g., "produce", "dairy")

  • start_date: Start of date range (ISO format, e.g., "2025-01-01")

  • end_date: End of date range (ISO format, e.g., "2025-01-31")

Returns total spending, item count, and breakdown by category or vendor.

Inputs: vendor, category, end_date, start_date.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct action+resource: single-item price lookup, category listing, aggregate spending analysis, bulk insertion, and category enumeration. The two read tools that surface prices (query_item_price vs list_items_by_category) differ clearly in scope (one item's history vs all items in a category).

    Naming Consistency5/5

    All names follow a consistent snake_case verb_noun pattern (query_item_price, list_items_by_category, query_spending, add_grocery_items, list_categories). The query_/list_/add_ verb prefixes are used predictably.

    Tool Count5/5

    Five tools is well-scoped for a focused grocery logging server; each tool covers a distinct, non-redundant operation. No bloat or trivial padding.

    Completeness3/5

    The surface covers create and several read operations but lacks any update or delete tool, so agents cannot correct or remove mislogged purchases. Core workflows (log + query price/spending) are supported, but the lifecycle is incomplete.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables users to manage personal expenses through natural conversation with Claude, including adding, updating, deleting expenses, and viewing summaries by category or date range.
      3
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Automated 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.
      18
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language expense tracking and management via Claude Desktop, supporting adding, listing, summarizing, updating, and deleting expenses with flexible date parsing and category filtering.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables users to manage personal expenses, analyze spending patterns, track budgets, generate reports, and export data through natural language conversations with Claude.
      -