Rohlik
STDIOMCP server for Rohlik Group grocery delivery services with cart management
MCP server for Rohlik Group grocery delivery services with cart management
Enhance your favourite LLM with capabilities to buy groceries.
[!WARNING] This MCP server is made for study purposes with use of reverse engineered Rohlik API. It is for personal use only.
This is a Model Context Protocol (MCP) server that enables AI assistants to interact with the Rohlik Group's online grocery delivery services across multiple countries. This server provides tools for searching products, managing shopping carts, and accessing account info.
Supported Services:
Example LLM prompts that work very well with the Rohlik MCP:
🛒 Regular Shopping:
🤖 Smart Shopping:
📅 Planning:
New to Rohlik MCP? Check out our Complete Guide for Newcomers!
Add the MCP to Claude Desktop configuration:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonAdd the following configuration:
{ "mcpServers": { "rohlik": { "command": "npx", "args": ["-y", "@tomaspavlin/rohlik-mcp"], "env": { "ROHLIK_USERNAME": "[email protected]", "ROHLIK_PASSWORD": "your-password", "ROHLIK_BASE_URL": "https://www.rohlik.cz" } } } }
The server supports multiple Rohlik regions by setting the ROHLIK_BASE_URL environment variable:
https://www.rohlik.cz (default)https://www.knuspr.dehttps://www.gurkerl.athttps://www.kifli.huhttps://www.sezamo.rohttps://www.sezamo.ithttps://www.sezamo.esIf ROHLIK_BASE_URL is not specified, it defaults to the Czech version.
search_products - Search for grocery products by name with filtering optionsadd_to_cart - Add multiple products to your shopping cartget_cart_content - View current cart contents and totalsremove_from_cart - Remove items from your shopping cartget_shopping_list - Retrieve shopping lists by IDget_meal_suggestions - Get personalized suggestions for breakfast, lunch, dinner, snacks, baking, drinks, or healthy eating based on your order historyget_frequent_items - Analyze order history to find most frequently purchased items (overall + per category)get_shopping_scenarios - Interactive guide showing what you can do with the MCPget_account_data - Get comprehensive account information including delivery details, orders, announcements, cart, and premium statusget_order_history - View your past delivered orders with detailsget_order_detail - Get detailed information about a specific order including all productsget_upcoming_orders - See your scheduled upcoming ordersget_delivery_info - Get current delivery information and feesget_delivery_slots - View available delivery time slots for your addressget_premium_info - Check your Rohlik Premium subscription status and benefitsget_announcements - View current announcements and notificationsget_reusable_bags_info - Track your reusable bags and environmental impactnpm install npm run build
npm run build - Compile TypeScript to JavaScriptnpm start - Launch the production servernpm run dev - Start development mode with watchnpm run inspect - Test with MCP Inspectornpm test - Run unit testsnpm run test:watch - Run tests in watch modenpm run test:coverage - Generate test coverage reportThe project includes unit tests for smart shopping data transformation logic:
# Run all tests npm test # Run tests in watch mode (development) npm run test:watch # Generate coverage report npm run test:coverage
What's tested:
get_frequent_items)get_meal_suggestions)See tests/README.md for detailed testing documentation.
Add this to configuration:
{ "mcpServers": { "rohlik-local": { "command": "node", "args": ["/path/to/rohlik-mcp/dist/index.js"], "env": { "ROHLIK_USERNAME": "[email protected]", "ROHLIK_PASSWORD": "your-password", "ROHLIK_BASE_URL": "https://www.rohlik.cz" } } } }
If you're experiencing authentication issues, enable debug mode to see detailed logs:
{ "mcpServers": { "rohlik-local": { "command": "node", "args": ["/path/to/rohlik-mcp/dist/index.js"], "env": { "ROHLIK_USERNAME": "[email protected]", "ROHLIK_PASSWORD": "your-password", "ROHLIK_BASE_URL": "https://www.rohlik.cz", "ROHLIK_DEBUG": "true" } } } }
Debug logs will appear in ~/Library/Logs/Claude/mcp-server-rohlik-local.log (macOS) or %APPDATA%/Claude/logs/mcp-server-rohlik-local.log (Windows).
You can test the MCP server using the official MCP Inspector (https://modelcontextprotocol.io/legacy/tools/inspector):
npm run inspect
In the Inspector, set the ROHLIK_USERNAME and ROHLIK_PASSWORD envs.
To validate that all Rohlik API endpoints are working correctly and diagnose authentication issues:
npm run validate-api
This will:
tests/validation-results.jsontests/validation-report.htmlThe validator automatically loads credentials from your Claude Desktop config or environment variables. Open the HTML report in your browser for an easy-to-read summary of all tests.
Possible causes:
Solutions:
claude_desktop_config.json"ROHLIK_DEBUG": "true" in env section~/Library/Logs/Claude/mcp-server-rohlik*.log (macOS) or %APPDATA%\Claude\logs\mcp-server-rohlik*.log (Windows)npm run validate-api to test all endpointsCause: Your account has no past orders, or orders are not accessible
Solution: Ensure you have at least one completed order on Rohlik before using smart shopping features (get_meal_suggestions, get_frequent_items)
Causes:
Solutions:
Causes:
Solutions:
Add ROHLIK_DEBUG to your configuration to see detailed logs:
{ "mcpServers": { "rohlik-local": { "command": "node", "args": ["/path/to/rohlik-mcp/dist/index.js"], "env": { "ROHLIK_USERNAME": "[email protected]", "ROHLIK_PASSWORD": "your-password", "ROHLIK_BASE_URL": "https://www.rohlik.cz", "ROHLIK_DEBUG": "true" } } } }
View logs:
# macOS tail -f ~/Library/Logs/Claude/mcp-server-rohlik-local.log # Windows type %APPDATA%\Claude\logs\mcp-server-rohlik-local.log
If you encounter authentication or API issues, run the validator:
npm run validate-api
This will:
validation-results.json with test resultsvalidation-report.html for easy viewing in browsernpm publishThis project is licensed under the MIT License - see the LICENSE file for details.