Rohlik MCP Server
Enables AI assistants to interact with Rohlik Group's online grocery delivery services across multiple European countries, supporting product search, shopping cart management, order history analysis, and personalized meal suggestions based on purchase patterns.
README
<img src="https://www.rohlik.cz/favicon/cz/favicon.ico" alt="Rohlik" width="30" height="30"> Rohlik MCP Server
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:
- 🇨🇿 Rohlik.cz - Czech Republic
- 🇩🇪 Knuspr.de - Germany
- 🇦🇹 Gurkerl.at - Austria
- 🇭🇺 Kifli.hu - Hungary
- 🇷🇴 Sezamo.ro - Romania
- 🇮🇹 Sezamo.it - Italy (planned)
- 🇪🇸 Sezamo.es - Spain (planned)
Example LLM prompts that work very well with the Rohlik MCP:
🛒 Regular Shopping:
- Add ingredients for apple pie to the cart. Only gluten-free and budget-friendly.
- Or actually, instead of apple pie I want to make pumpkin pie. Change the ingredients.
- What are the items in my cart?
- Add the items in the attached shopping list photo to the cart.
- Add the bread I marked as favorite in Rohlik to my cart.
🤖 Smart Shopping:
- "Add breakfast items I typically order"
- "Show me lunch suggestions for this week"
- "What do I usually buy for dinner?"
- "I need snacks - suggest what I normally order"
- "Show my top 20 most purchased items"
- "What can I do with Rohlik MCP?"
📅 Planning:
- What are the cheapest delivery slots for tomorrow?
- When is my next delivery?
- Show my last 5 orders
📚 Documentation
New to Rohlik MCP? Check out our Complete Guide for Newcomers!
Usage
Claude Desktop Configuration
Add the MCP to Claude Desktop configuration:
- On MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"rohlik": {
"command": "npx",
"args": ["-y", "@tomaspavlin/rohlik-mcp"],
"env": {
"ROHLIK_USERNAME": "your-email@example.com",
"ROHLIK_PASSWORD": "your-password",
"ROHLIK_BASE_URL": "https://www.rohlik.cz"
}
}
}
}
Supported Regions
The server supports multiple Rohlik regions by setting the ROHLIK_BASE_URL environment variable:
- Czech Republic:
https://www.rohlik.cz(default) - Germany:
https://www.knuspr.de - Austria:
https://www.gurkerl.at - Hungary:
https://www.kifli.hu - Romania:
https://www.sezamo.ro - Italy (planned):
https://www.sezamo.it - Spain (planned):
https://www.sezamo.es
If ROHLIK_BASE_URL is not specified, it defaults to the Czech version.
Tools
Core Shopping
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 ID
🤖 Smart Shopping
get_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 MCP
Getting info
get_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 impact
Development
Installation
npm install
npm run build
Scripts
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 report
Testing
Unit Tests
The 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:
- Frequency analysis algorithms (
get_frequent_items) - Meal suggestion filtering and ranking (
get_meal_suggestions) - Price averaging and calculations
- Category filtering and grouping
- Edge cases (empty data, missing fields, etc.)
See tests/README.md for detailed testing documentation.
Testing with Claude Desktop
Add this to configuration:
{
"mcpServers": {
"rohlik-local": {
"command": "node",
"args": ["/path/to/rohlik-mcp/dist/index.js"],
"env": {
"ROHLIK_USERNAME": "your-email@example.com",
"ROHLIK_PASSWORD": "your-password",
"ROHLIK_BASE_URL": "https://www.rohlik.cz"
}
}
}
}
Debug Mode
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": "your-email@example.com",
"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).
Testing with MCP Inspector
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.
API Validation Tool
To validate that all Rohlik API endpoints are working correctly and diagnose authentication issues:
npm run validate-api
This will:
- Test all 11 API endpoints used by the MCP server
- Show detailed HTTP request/response logs in the console
- Generate a JSON report:
tests/validation-results.json - Generate a beautiful HTML report:
tests/validation-report.html
The 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.
Troubleshooting
Common Issues
"Login failed" Error
Possible causes:
- Wrong username/password in configuration
- Rohlik API changed or is temporarily unavailable
- Network connectivity issues
Solutions:
- Verify credentials in your
claude_desktop_config.json - Enable debug mode:
"ROHLIK_DEBUG": "true"in env section - Check logs:
~/Library/Logs/Claude/mcp-server-rohlik*.log(macOS) or%APPDATA%\Claude\logs\mcp-server-rohlik*.log(Windows) - Run API validator:
npm run validate-apito test all endpoints
"No order history found"
Cause: 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)
Slow response times
Causes:
- Analyzing too many orders (smart shopping features)
- Network latency to Rohlik servers
- API rate limiting
Solutions:
- For smart shopping: reduce number of orders analyzed (try 10 instead of default 20)
- Use fewer requests or add delays between bulk operations
- Check your network connection
Products not found or search returns no results
Causes:
- Product out of stock or discontinued
- Product ID changed in Rohlik system
- Spelling mistake in search query
Solutions:
- Search by partial name instead of full product name
- Try alternative spellings or broader search terms
- Verify product exists on Rohlik website directly
Enabling Debug Mode
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": "your-email@example.com",
"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
Using the API Validation Tool
If you encounter authentication or API issues, run the validator:
npm run validate-api
This will:
- Test all 11 API endpoints used by the MCP
- Show detailed HTTP request/response information
- Generate
validation-results.jsonwith test results - Create
validation-report.htmlfor easy viewing in browser - Help identify which specific endpoints are failing
Publishing as NPM package
- Update version in package.json
npm publish
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- https://github.com/dvejsada/HA-RohlikCZ for reverse engineering the Rohlik.cz API
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。