Skip to main content
Glama
serbia-prices-mcp

serbia-prices-mcp

by moskrc

serbia-prices-mcp

An MCP server for grocery prices in Serbia. It downloads the daily price lists that retail chains publish on data.gov.rs, stores them in a local DuckDB file and lets an AI assistant search, compare and price a shopping list across chains.

Chains: Lidl, Maxi (also Mega Maxi, Shop&Go), Idea (also Mercator, Roda), Univerexport, Gomex, Aman, Metro, dm, Aroma, Svetofor and Veropoulos — the major chains in Belgrade and Novi Sad.

It runs on your computer. There is no account, API key or hosted service.

Why

The chains publish their prices as open data, but in a form that is hard to use directly: one CSV per chain, each with its own column names, unit spellings and encoding problems. The portal has no search and no way to compare chains. This server normalizes the files into one table so the assistant can answer questions like:

  • Where is this product cheapest, and by how much?

  • Which store is cheapest for my shopping list?

  • Is this discount real, or was the regular price raised before it?

  • How has the price changed over the last months?

Related MCP server: mcp-supermercados-cl

Example questions

You can ask in any language. The assistant translates product names to Serbian before calling the tools.

  • "Price a weekly basket for two in every store: 2 l of milk, bread, 10 eggs, chicken breast, cheese, bananas, coffee. Which store is cheapest and how much do I save compared to the most expensive one?"

  • "I'm cooking carbonara for six. Price the ingredients in Maxi, Lidl and Idea."

  • "Show the 10 biggest discounts on meat and say which ones look inflated."

  • "Which Lidl and Maxi promotions end tomorrow?"

  • "Where is Coca-Cola 2 l cheapest, and is the two-pack promotion a better deal?"

  • "Find Lurpak butter 250 g and compare that exact product across all chains."

  • "How has the price of 2.8% milk changed since September in Maxi and Idea?"

Install

You need uv. The server uses the stdio transport, so it works in clients that start local MCP servers: Claude Code, Claude Desktop, Codex, Antigravity, Cursor, VS Code. It does not work in web-only clients such as ChatGPT or claude.ai in the browser.

Claude Code

claude mcp add --scope user serbia-prices -- uvx serbia-prices-mcp

Codex

codex mcp add serbia-prices -- uvx serbia-prices-mcp

or in ~/.codex/config.toml:

[mcp_servers.serbia-prices]
command = "uvx"
args = ["serbia-prices-mcp"]

Antigravity

agy mcp add serbia-prices uvx serbia-prices-mcp

Claude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json)

{ "mcpServers": { "serbia-prices": { "command": "uvx", "args": ["serbia-prices-mcp"] } } }

VS Code (.vscode/mcp.json)

{ "servers": { "serbia-prices": { "type": "stdio", "command": "uvx", "args": ["serbia-prices-mcp"] } } }

On the first start the server downloads about 135 MB of price lists and builds the database, which takes about half a minute. Until then the tools return "retry in a minute". To download in advance:

uvx serbia-prices-mcp sync

Tools

Tool

Description

search_products

Search by name: most relevant names first, then the cheapest package. With ean: one exact product in all chains and store formats, with the difference from the cheapest in RSD and %.

optimize_basket

Cost of a shopping list in each store. Items are given by name or by barcode, quantity in packages. Stores that have every item come first.

get_top_discounts

Current promotions. Flags a regular price that is higher than in recent monthly snapshots, and discounts of 80% or more, which are usually clearance or data errors.

get_price_history

Monthly snapshots published by the chains plus today's price for one barcode.

list_retailers_and_categories

Chains, store formats, date of the data and the 25 product categories.

All tools are read-only. Lists are paged with limit and offset and return total.

How it works

  1. For each chain the server asks the data.gov.rs API for the chain's datasets and takes the newest price list CSV.

  2. It downloads all files in parallel.

  3. DuckDB reads each file with one SQL query: the header is mapped to one schema, prices and dates are validated, invalid rows are skipped and names are prepared for search without diacritics and Cyrillic.

  4. The rows go into a new DuckDB file, which then replaces the old one. If a chain fails to download or parse, its previous prices are kept.

  5. Each tool call is one SQL query over the file, opened read-only. Queries take 30–100 ms.

  6. While running, the server checks every hour and downloads again when the data is older than 20 hours.

No history is collected. The chains' files contain today's prices and monthly snapshots for recent months; price history and the discount check use those snapshots. The database takes about 50 MB in ~/.cache/serbia-prices-mcp.

Settings

Variable

Default

Description

SERBIA_PRICES_MCP_DATA_DIR

~/.cache/serbia-prices-mcp

Directory for prices.duckdb

SERBIA_PRICES_MCP_TRANSPORT

stdio

http serves Streamable HTTP at /mcp

SERBIA_PRICES_MCP_HOST, SERBIA_PRICES_MCP_PORT

127.0.0.1, 8000

HTTP address

SERBIA_PRICES_MCP_LOG_LEVEL

INFO

Log level; logs go to stderr

Data

The price lists are published by the retail chains on data.gov.rs under the Open Data License of the Republic of Serbia. Prices are shown as published and may differ in the store. This project is not affiliated with the chains or the portal.

Development

uv sync
uv run pytest
uv run mypy src tests

License

MIT

Available Tools

5 tools
get_price_historyGet Price HistoryA
Read-only

Price history of a product by EAN from the price lists on data.gov.rs: monthly snapshots published by the chains (snapshot='monthly') and today's list (snapshot='current').

Inputs: ean (required), limit, offset, retail_chains. Returns: items, limit, total, offset

get_top_discountsGet Top DiscountsA
Read-only

Current promotions with discount of at least min_discount_pct, as published by the chains. regular_raised_before_promo=true means the regular price was raised compared to the monthly snapshots of recent months, so the discount may be inflated; false does NOT confirm the discount is real. needs_verification=true marks discounts of 80% or more: usually clearance of leftover stock or a data error in the published price list; warn the user to check in the store.

Inputs: limit, offset, category, retail_chains, +1 more. Returns: items, limit, total, offset

list_retailers_and_categoriesList Retailers And CategoriesA
Read-only

List available chains, their store formats, data dates and the 25 product categories.

Inputs: no named parameters. Returns: retailers, categories

optimize_basketOptimize BasketA
Read-only

Estimate grocery basket cost per store. Each item has a Serbian Latin query and the number of packages, e.g. {'query': 'jaja', 'quantity': 1}. Without ean, every store gets the cheapest package whose name matches, which may be a different product (chocolate milk for 'mleko'). For an exact product, first find it with search_products, let the user choose, then pass its ean: {'query': 'mleko 2.8% 1l', 'ean': '860...', 'quantity': 2}. Cost is price x quantity; stores with all items come first.

Inputs: items (required), preferred_chains. Returns: result

search_productsSearch ProductsA
Read-only

Search current product prices across Serbian chains. Pass the product name in Serbian Latin (translate from Russian/English first) and optionally synonyms as extra list items. Most relevant names first, then the cheapest shelf price (price of the package as sold). If nothing is found, retry with a synonym or a more general word. Pass ean instead of query to compare one exact product across all chains and store formats: results are sorted by price, diff_rsd and diff_pct show the difference from the cheapest.

Inputs: ean, limit, query, offset, +2 more. Returns: items, limit, total, offset

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct role: searching products, estimating a basket, listing retailers/categories, retrieving promotions, and fetching price history. The overlap between search_products and get_price_history is clearly separated by current prices vs. historical snapshots, and EAN usage is explained.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: optimize_basket, search_products, list_retailers_and_categories, get_top_discounts, get_price_history. The one compound name is still readable and predictable.

    Tool Count5/5

    Five tools are well-scoped for a grocery price comparison server. Each tool covers a distinct workflow: discovery, search, basket estimation, promotions, and history, with no unnecessary filler.

    Completeness4/5

    The surface covers core price comparison workflows: current search, exact-product comparison via EAN, basket costing, retailer metadata, discounts, and history. Minor gaps exist, such as no explicit product-detail endpoint or category-filtered search, but agents can work around these using existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to track global food prices, search products by barcode or name, and compare costs across 27 countries. It provides tools for real-time price scraping and data aggregation from major international supermarket chains.
      8
      4
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables searching products, comparing prices, and building optimal shopping lists across major Chilean supermarkets, using your local machine to access real-time prices and loyalty deals.
      14
      70 npm
      68
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables querying live offers and prices from 10 Dutch supermarket chains through a single normalised JSON API. Exposes 26 curated tools, including product search and category lookups, over stdio or authenticated Streamable HTTP.
      20
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables natural-language search of Swiss grocery products, price comparison, and weekly promotion lookup across retailers including Migros, Coop, Aldi, Denner, Lidl, Farmy, Volgshop, and Otto's.
      7
      MIT