RO

Rohlik MCP Server for Rohlik Group Grocery Platforms

Use the Rohlik MCP server to shop groceries across Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu and Sezamo.ro with unified, fast access.

Quick Install
npx -y @tomaspavlin/rohlik-mcp

Overview

The Rohlik MCP server exposes a unified, developer-friendly HTTP API that gives fast access to product, availability and cart operations across Rohlik Group grocery platforms (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu and Sezamo.ro). Instead of integrating with each shop’s website or scraping pages repeatedly, the server normalizes product data and marketplace behaviors into a single, consistent interface. This makes it easier to build tools, bots, agents and integrations that need inventory, pricing or cart manipulation across multiple countries.

The server implements the Model Context Protocol (MCP) pattern commonly used to expose tool-like capabilities to language models and other automation frameworks. In practice that means predictable JSON endpoints, lightweight authentication/session handling for each market, optional caching, and simple health/metrics endpoints so the service can be operated in production or used locally during development.

Features

  • Unified API for multiple Rohlik Group markets (cz, de, at, hu, ro)
  • Search and product detail endpoints returning normalized JSON
  • Basic cart operations (add/view/remove/checkout helpers)
  • Session / cookie support per market for authenticated endpoints
  • Response caching and configurable TTL to reduce load and latency
  • Health and metrics endpoints for observability
  • Lightweight, self-hostable server (Docker-friendly)
  • Designed to be used as an MCP tool for LLM-driven agents and developer scripts

Installation / Configuration

Two common ways to run the server: Docker (recommended for quick start) or local node run. Adjust the environment variables for your deployment.

Clone the repository:

git clone https://github.com/tomaspavlin/rohlik-mcp.git
cd rohlik-mcp

Run with Docker:

docker build -t rohlik-mcp .
docker run -p 3000:3000 \
  -e PORT=3000 \
  -e LOG_LEVEL=info \
  -e CACHE_TTL=60 \
  -e ROHLIK_CZ_SESSION="SESSION_COOKIE_VALUE" \
  rohlik-mcp

Example Docker Compose (docker-compose.yml):

version: "3.8"
services:
  rohlik-mcp:
    image: your-registry/rohlik-mcp:latest
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
      - LOG_LEVEL=info
      - CACHE_TTL=60
      - ROHLIK_CZ_SESSION=${ROHLIK_CZ_SESSION}
    restart: unless-stopped

Local development (if the project uses Node):

npm install
npm run dev
# or
node dist/index.js

Configuration notes:

  • PORT — HTTP port to listen on (default: 3000)
  • CACHE_TTL — cache duration in seconds for product/search responses
  • LOG_LEVEL — logging verbosity (error, warn, info, debug)
  • ROHLIK__SESSION — session cookie or token used to access each market (one env per market)

    If the server supports a config file, place a JSON or YAML config next to the binary and reference it with CONFIG_FILE env var:

    {
      "port": 3000,
      "cacheTTL": 60,
      "markets": {
        "cz": { "session": "..." },
        "de": { "session": "..." }
      }
    }
    

    Available Resources

    Typical endpoints you can expect. Exact paths may vary; check the server’s OpenAPI/README for the definitive list.

    • GET /health — basic health check
    • GET /metrics — Prometheus-style metrics (if enabled)
    • GET /v1/search?query=&market=<cz|de|at|hu|ro> — search products
    • GET /v1/product/:id?market=<…> — product details (normalized)
    • POST /v1/cart/add — add an item to a market cart (body: product id, qty, market)
    • GET /v1/cart/view?market=<…> — view current cart
    • POST /v1/cart/remove — remove item from cart
    • POST /v1/cart/checkout — helper to start checkout (may only return headers/URL)
    • These endpoints return structured JSON that normalizes fields such as id, title, brand, price (gross/net), unit, availability and image URLs so clients do not need market-specific parsing.

      Use Cases

      • Build a multilingual grocery assistant

        • Use the search endpoint to find items by natural-language query, then add them to a cart across multiple markets. A language model can call MCP tools exposed by this server to execute those actions.
      • Price and availability comparison

        • Query product details for the same SKU across markets to compare price, stock and pack sizes. Cache responses to avoid re-scanning pages.
      • Automated shopping scripts

        • Automate routine orders (weekly groceries) by saving a list of product IDs and calling add-to-cart endpoints with the appropriate market session cookie.
      • Rapid prototyping of integrations

        • Use the server as a stable backend while building frontends or chatbots. The server hides scraping and market quirks behind a consistent API.

      Examples

      Search for “milk” in the Czech market:

      curl "http://localhost:3000/v1/search?query=milk&market=cz" -H "Accept: