Skip to main content
Glama
MealCP

MealCP MCP

Official
by MealCP

MealCP MCP

Official Model Context Protocol server for MealCP — the grocery & food data layer for AI agents.

Exposes two tools over the MealCP public API:

  • search_products — search the grocery product catalog by keyword with faceted filtering (country, retailer, chain, brand, tag, category, city, price range, sort, pagination).

  • get_price_history — aggregated price-history stats (min/max/avg/first/ last, net change) for one product over a date range.

Requirements

  • Python 3.10+

  • An API key from MealCP (each tool call consumes 1 credit)

Related MCP server: market-fiyatlari-mcp-server

Usage

Run directly with uv:

uvx mealcp-mcp

Or install:

pip install mealcp-mcp
mealcp-mcp

The server speaks MCP over stdio; any MCP host (Claude Desktop, opencode, Cursor, …) can spawn it.

Claude Desktop

{
  "mcpServers": {
    "mealcp": {
      "command": "uvx",
      "args": ["mealcp-mcp"],
      "env": {
        "MEALCP_API_URL": "https://api.mealcp.com",
        "MEALCP_API_KEY": "mcp_live_your_key_here"
      }
    }
  }
}

opencode

{
  "mcp": {
    "mealcp": {
      "type": "local",
      "command": ["uvx", "mealcp-mcp"],
      "enabled": true,
      "environment": {
        "MEALCP_API_URL": "https://api.mealcp.com",
        "MEALCP_API_KEY": "mcp_live_your_key_here"
      }
    }
  }
}

Configuration

Variable

Default

Description

MEALCP_API_URL

http://localhost:8000

Base URL of the MealCP API

MEALCP_API_KEY

(none)

X-API-Key sent with every request

Errors

Tool errors surface the API's stable error tokens, formatted <code>: <message> (e.g. not_found: Product not found). Branch on the code, never the message.

Contract

Response models are generated from the API's OpenAPI spec (contract/openapi.json, currently version 0.1.0). Refresh with:

uvx --from datamodel-code-generator datamodel-codegen \
  --input contract/openapi.json \
  --output src/mealcp_mcp/models.py \
  --output-model-type pydantic_v2.BaseModel \
  --target-python-version 3.10 --disable-timestamp

Development

uv sync
uv run pytest
uv run ruff check .

License

MIT

Available Tools

2 tools
get_price_historyA

Get aggregated price-history stats for one product over a date range.

Returns min/max/avg/first/last price plus the net change over the window, pooled across every store carrying the product. Pair with search_products first and pass a hit's id here verbatim.

Args: product_id: Opaque product id from a search hit (e.g. rp_550e8400e29b41d4a8b2c3d1e9f7a6c8). from_date: ISO date, inclusive lower bound (e.g. "2026-01-01"). to_date: ISO date, inclusive upper bound; defaults to today.

Returns: Aggregated price-history stats.

Raises: mcp.server.mcpserver.exceptions.ToolError: If the API is unavailable or the product is not found; the message starts with the API's stable error token.

ParametersJSON Schema
NameRequiredDescriptionDefault
to_dateNo
from_dateYes
product_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
nameYes
brandNo
changeNo
to_dateYes
currencyNo
avg_priceNo
from_dateYes
max_priceNo
min_priceNo
change_pctNo
last_priceNo
first_priceNo
store_countNo
retailer_slugYes
last_observed_atNo
first_observed_atNo
observation_countYes

TDQS

A4.7/5.0
Behavior4/5

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 discloses error behavior (ToolError with stable token), the aggregation scope ('pooled across every store'), and the inclusive date semantics. It implies a read-only operation via 'get' but does not explicitly state idempotency or lack of side effects. Given the absence of annotations, the description is thorough, though a brief note on read-only nature would make it fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a leading one-sentence purpose, then a compact Args/Returns/Raises layout. Every sentence adds value—examples for product_id and dates, explicit defaults, and error detail—without redundancy. It is front-loaded with the core function and avoids fluff, making it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is an output schema, so the minimal 'Returns: Aggregated price-history stats' is acceptable since the schema provides structure. The description covers the usage prerequisite (search first), parameter details, aggregation behavior, and error conditions. The only minor gap is a lack of mention of any range limits or rate limiting, but that's not essential given the tool's simplicity and the existence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must fully explain each parameter. It does this exceptionally: product_id is defined as 'Opaque product id from a search hit' with a concrete example; from_date and to_date are described with format and inclusiveness, plus a default for to_date. This far exceeds what the bare schema provides and gives the agent all necessary context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Get aggregated price-history stats') and clearly scopes it to 'one product over a date range'. It enumerates the exact statistics returned (min/max/avg/first/last price and net change), which distinguishes it from the sibling tool search_products, which is about discovering products rather than analyzing history. This is unambiguous and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs the agent to 'Pair with search_products first and pass a hit's id here verbatim', establishing a clear workflow and the prerequisite. It also clarifies the required input source. While it doesn't state 'when not to use', the pair-with guidance and the fact that it's for a single product implies the alternative use case, making the routing clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_productsA

Search the grocery product catalog by keyword with faceted filtering.

Returns matching products with name, brand, price, unit price, retailer and a URL, plus facet counts for retailers, brands and countries.

Args: q: Free-text query (e.g. "potatoes", "krumpli"). Empty returns all, sorted by sort or recency. country: ISO 3166-1 alpha-2 country code (e.g. HU, FR). retailer: Retailer slug (e.g. tesco-hu, auchan-fr). chain: Chain slug (e.g. tesco, auchan). brand: Brand free-text token. tag: Tag slug (e.g. vegan). category: Category slug at any level (L1/L2/L3, e.g. fresh-produce, dairy-eggs, vegetables/potatoes); matches the whole subtree. city: City free-text token filtering stores carrying the product. currency: ISO 4217 currency code (e.g. HUF, EUR). min_price: Minimum latest price (inclusive). max_price: Maximum latest price (inclusive). sort: Stable sort token: relevance, newest, oldest, price_asc, price_desc, unit_price_asc, unit_price_desc. page: 1-indexed result page. page_size: Hits per page (1-100).

Returns: A structured search response.

Raises: mcp.server.mcpserver.exceptions.ToolError: If the search API is unavailable; the message starts with the API's stable error token.

ParametersJSON Schema
NameRequiredDescriptionDefault
qNo
tagNo
cityNo
pageNo
sortNo
brandNo
chainNo
countryNo
categoryNo
currencyNo
retailerNo
max_priceNo
min_priceNo
page_sizeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
pageYes
foundYes
queryYes
facetsYes
page_sizeYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden, and it does add real behavioral detail: returned fields, facet counts, and a Raises clause naming ToolError with a stable error token prefix. It still omits auth requirements, rate limits, or cost characteristics that an unannotated tool would ideally disclose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded summary sentence followed by cleanly separated Args/Returns/Raises blocks; with 14 parameters the length is justified and each arg line earns its place. The 'Returns: A structured search response.' line is slightly vacuous given an output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter search tool with an output schema, the description supplies everything needed to invoke it correctly: all parameter semantics, error behavior, and result composition. Only the absence of routing guidance relative to the sibling keeps it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for 14 parameters, so the description must compensate, and it does thoroughly: format examples (HU, FR; HUF, EUR), slug hierarchies with subtree matching for category, inclusive bounds for min_price/max_price, stable sort token semantics, 1-indexed paging and page_size 1-100. This adds meaning no schema field conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search the grocery product catalog by keyword') plus the faceting capability, so the agent knows exactly what it does. It does not, however, distinguish itself from the sibling get_price_history, leaving the agent to infer the split between catalog search and price history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use guidance and no mention of the sibling get_price_history. The only hint ('Empty returns all, sorted by sort or recency') is parameter behavior rather than a usage rule, so the agent must guess which tool fits a price-over-time question.

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.

  1. 1 tool updatev0.1.1
    • Changedsearch_products1 field changed
      • changedInput schema / properties / category / anyOf
        Previous value: -[
        -  {
        -    "maxLength": 128,
        -    "pattern": "^[A-Za-z0-9_-]+$",
        -    "type": "string"
        -  },
        -  {
        -    "type": "null"
        -  }
        -]New value: +[
        +  {
        +    "maxLength": 128,
        +    "pattern": "^[A-Za-z0-9_-]+(/[A-Za-z0-9_-]+)*$",
        +    "type": "string"
        +  },
        +  {
        +    "type": "null"
        +  }
        +]
  2. 2 tool updatesv0.1.0
    • First observedget_price_history
    • First observedsearch_products

TDQS

A4/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: catalog search versus price-history retrieval for a specific product. There is no overlap in function or ambiguity about when to use each.

Naming Consistency5/5

Both tool names follow a consistent snake_case verb_noun pattern: search_products and get_price_history. The convention is predictable and readable.

Tool Count3/5

Only two tools exist for a grocery catalog and price-history server. While they are focused, the surface feels thin for the apparent domain, which likely needs more lookup or discovery operations.

Completeness3/5

Search is broad and returns useful facets, and price history works when paired with search. However, notable gaps remain: no direct product-detail lookup, no category/retailer/brand listing endpoints, and no multi-product comparison tools.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers