Grocery Logger MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Grocery Logger MCP ServerLog these groceries: 2 lbs bananas $2.99, 1 gallon milk $4.50 from Costco"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: Expense Tracker MCP Server
Installation
Requires Python 3.10+ and uv.
# Clone the repo
git clone <your-repo-url>
cd grocery_mcp
# Install dependencies
uv syncClaude 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 |
| Bulk add grocery purchases |
| Get price history and average for an item |
| List all items in a category with stats |
| Analyze spending by vendor, category, or date |
| 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 toolsadd_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"
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations and no output schema, the description must carry the whole behavioral burden. It discloses the write intent and gives concrete parsing guidance, but says nothing about duplicates/deduplication, batch size limits, permissions, or what a successful write returns. It also states 'Each item requires ... unit' while the schema gives unit a default of 'each', a minor inaccuracy about optionality.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The write intent is front-loaded, the field list is bulleted and scannable, and the worked examples are the highest-value content. It runs a bit long because the category enumeration restates the schema enum and the 'each item requires' list partially duplicates the required array.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a nested-payload write tool with no annotations, no output schema, and no top-level parameter description, the definition covers required fields, formats, enum values, and parsing heuristics well. The remaining gaps are response behavior, error handling, and the optional/default nature of unit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The reported schema coverage is 0% at the top level, so the description is doing real work: it enumerates every per-item field, gives format examples (ISO timestamp, vendor names), lists the category enum, and supplies parsing rules that map free-text item strings onto item_name/quantity/unit. Those normalization examples add genuine meaning beyond the schema, though the category list merely duplicates the enum.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource with scope: 'Bulk add grocery items to the database.' The write semantics are unambiguous and clearly contrast with the all-read sibling set (query_item_price, list_items_by_category, query_spending, list_categories). An agent can select it without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use this tool to log one or more grocery purchases' gives a clear triggering context and implicitly covers the single-vs-multiple case via 'bulk'. It does not name or exclude any alternative, but the sibling tools are all read-only queries, so there is little ambiguity to resolve.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the return contract: a fixed set of categories annotated with which ones have logged items. It does not state how that distinction is represented in the response, but for a zero-parameter read-only lookup the disclosure is solidly above baseline.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action, followed by return contents and the actionable instruction. Slight redundancy between 'List all valid grocery categories' and 'Returns the fixed set of valid categories' costs it a point, but there is no padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description must characterize the return value, and it does so at a high level (fixed categories plus item-presence flags). It is sufficient for correct invocation, though the exact representation of the has-items marker is left unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes no parameters, so there is nothing to document and the baseline is 4. There is no argument-related information an agent could need.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('List all valid grocery categories') and immediately narrows scope to the fixed, canonical set. It also implicitly separates itself from list_items_by_category by clarifying that this returns the category vocabulary rather than items.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly tells the agent when to use the output: 'Use these exact category names when adding items,' which connects it to the add_grocery_items sibling. It gives no explicit when-not guidance or named alternative (e.g., list_items_by_category for listing items), so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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)
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| include_price_stats | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does disclose useful behaviors: partial matching on category, and optional per-item price statistics defaulting to True. However it says nothing about pagination, result limits, or ordering, which matters for a list operation. Adequate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded and readable, but the first three lines overlap ('List all items...' / 'Get distinct items...' / 'Optionally includes price statistics...') and the Args block then repeats what the schema already states about the parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description does describe the returned data (items, prices, optional min/max/avg), which is the key missing piece. Only pagination and result-scoping behavior remain unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does: it explains that category supports partial match with examples ('produce', 'dairy') and that include_price_stats controls min/max/avg with a default of True. This adds real meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('List all items in a category with their prices') and clarifies scope as 'distinct items'. It is distinguishable from list_categories and query_item_price, though it never explicitly names those siblings to sharpen the boundary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the description (category browsing), but there is no explicit when-to-use guidance relative to query_item_price or list_categories. An agent must infer the routing decision rather than being told.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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)
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| vendor | No | ||
| item_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does disclose key behaviors: partial match support, optional vendor filter, and that it returns average price plus recent purchase history with a default limit of 10. However, it omits whether this is read-only (though implied by 'Get'), any auth or rate limits, and what the history entries contain beyond 'purchase history'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with a clear purpose sentence, then usage detail, then a structured Args section. No wasted words; each sentence adds value. Well-organized for quick parsing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-param read-only query tool with no annotations and no output schema, the description covers the core inputs and return summary. However, without an output schema, it could better describe the shape of the returned history (e.g., date, price, vendor fields) and whether results are sorted or paginated. Still missing some behavioral context needed for full confidence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains each parameter: item_name supports partial match (with an example showing 'banana' matches 'Organic Bananas'), vendor is an optional filter, and limit controls max history entries with default 10. This adds substantial meaning beyond the bare schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (get) and resource (average price and price history for a grocery item). Distinguishes from siblings like list_items_by_category (listing), query_spending (spending totals), and add_grocery_items (mutation) by focusing on price lookup. Clear what the tool returns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage via search-by-name with optional vendor filter, but does not state when to use this tool versus query_spending or list_items_by_category. No explicit when-not or alternatives given. Adequate but with a clear gap in routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | No | ||
| category | No | ||
| end_date | No | ||
| start_date | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the return shape (total spending, item count, breakdown by category or vendor), which is genuinely useful since there is no output schema, but it omits any note on defaults, result limits, or whether filters combine with AND semantics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded purpose sentence followed by a scannable bulleted filter list and a returns sentence. Every element earns its place; only the generic 'Use this tool to analyze spending patterns' line is slightly redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only, four-parameter query tool with no annotations and no output schema, the description covers purpose, all filters, and the return shape. An agent has enough to invoke it; only matching semantics and default behavior remain unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate and largely does: it names all four parameters, gives example values for vendor and category, and specifies ISO date format with examples for start_date/end_date. Remaining gap is whether vendor/category are exact or substring matches.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Query total spending') with scope (optional filters), which is clear on its own. It does not explicitly distinguish itself from siblings like query_item_price, but the resource difference is self-evident.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use this tool to analyze spending patterns' implies the analysis use case, and the filter list hints at scoping. However, there is no explicit when-not guidance and no routing to alternatives such as query_item_price or list_items_by_category.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
add_grocery_items - First observed
list_categories - First observed
list_items_by_category - First observed
query_item_price - First observed
query_spending
TDQS
Scored across 5 tools
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).
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.
Five tools is well-scoped for a focused grocery logging server; each tool covers a distinct, non-redundant operation. No bloat or trivial padding.
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
Related MCP Connectors
AI-powered kitchen management — pantry, recipes, meal plans, shopping lists
- Era ContextOAuthapp.era
Personal finance, bank account, and shared memory connector for Claude, ChatGPT, Gemini Spark & more
Persistent shopping memory for AI assistants. The AI reasons; Kaufliste stores and executes.
Grocery meal planning, budgets, and flyer deals for Canadian households. Auth required.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceIntegrates Kroger's public API with Claude to allow adding meal plan grocery lists directly to your Kroger cart via natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables users to manage personal expenses through natural conversation with Claude, including adding, updating, deleting expenses, and viewing summaries by category or date range.3MIT
- 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.-