Skip to content
Back to search

rohlik-mcp

MCP server that lets you shop groceries across the Rohlik Group platforms (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tomaspavlin--rohlik-mcp/badge.svg)](/listings/tomaspavlin--rohlik-mcp)

HTML

<a href="/listings/tomaspavlin--rohlik-mcp"><img src="/api/listings/tomaspavlin--rohlik-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm install
npm run build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 360 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # <img src="https://www.rohlik.cz/favicon/cz/favicon.ico" alt="Rohlik" width="30" height="30"> Rohlik MCP Server
  2. **Enhance your favourite LLM with capabilities to buy groceries.**
  3. > [!WARNING]
  4. > This MCP server is made for study purposes with use of reverse engineered Rohlik API. It is for personal use only.
  5. 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.
  6. **Supported Services:**
  7. - 🇨🇿 **[Rohlik.cz](https://www.rohlik.cz)** - Czech Republic
  8. - 🇩🇪 **[Knuspr.de](https://www.knuspr.de)** - Germany
  9. - 🇦🇹 **[Gurkerl.at](https://www.gurkerl.at)** - Austria
  10. - 🇭🇺 **[Kifli.hu](https://www.kifli.hu)** - Hungary
  11. - 🇷🇴 **[Sezamo.ro](https://www.sezamo.ro)** - Romania
  12. - 🇮🇹 **[Sezamo.it](https://www.sezamo.it)** - Italy (planned)
  13. - 🇪🇸 **[Sezamo.es](https://www.sezamo.es)** - Spain (planned)
  14. Example LLM prompts that work very well with the Rohlik MCP:
  15. **🛒 Regular Shopping:**
  16. - *Add ingredients for apple pie to the cart. Only gluten-free and budget-friendly.*
  17. - *Or actually, instead of apple pie I want to make pumpkin pie. Change the ingredients.*
  18. - *What are the items in my cart?*
  19. - *Add the items in the attached shopping list photo to the cart.*
  20. - *Add the bread I marked as favorite in Rohlik to my cart.*
  21. **🤖 Smart Shopping:**
  22. - *"Add breakfast items I typically order"*
  23. - *"Show me lunch suggestions for this week"*
  24. - *"What do I usually buy for dinner?"*
  25. - *"I need snacks - suggest what I normally order"*
  26. - *"Show my top 20 most purchased items"*
  27. - *"What can I do with Rohlik MCP?"*
  28. **💰 Deals & Discounts:**
  29. - *What's on sale this week?*
  30. **📅 Planning:**
  31. - *What are the cheapest delivery slots for tomorrow?*
  32. - *When is my next delivery?*
  33. - *Show my last 5 orders*
  34. ## 📚 Documentation
  35. **New to Rohlik MCP?** Check out our [Complete Guide for Newcomers](./docs/README.md)!
  36. ## Usage
  37. ### Claude Desktop Configuration
  38. Add the MCP to Claude Desktop configuration:
  39. - On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
  40. - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
  41. Add the following configuration:
  42. ```json
  43. {
  44. "mcpServers": {
  45. "rohlik": {
  46. "command": "npx",
  47. "args": ["-y", "@tomaspavlin/rohlik-mcp"],
  48. "env": {
  49. "ROHLIK_USERNAME": "your-email@example.com",
  50. "ROHLIK_PASSWORD": "your-password",
  51. "ROHLIK_BASE_URL": "https://www.rohlik.cz"
  52. }
  53. }
  54. }
  55. }
  56. ```
  57. ### Supported Regions
  58. The server supports multiple Rohlik regions by setting the `ROHLIK_BASE_URL` environment variable:
  59. * **Czech Republic**: `https://www.rohlik.cz` (default)
  60. * **Germany**: `https://www.knuspr.de`
  61. * **Austria**: `https://www.gurkerl.at`
  62. * **Hungary**: `https://www.kifli.hu`
  63. * **Romania**: `https://www.sezamo.ro`
  64. * **Italy** (planned): `https://www.sezamo.it`
  65. * **Spain** (planned): `https://www.sezamo.es`
  66. If `ROHLIK_BASE_URL` is not specified, it defaults to the Czech version.
  67. ## Tools
  68. ### Core Shopping
  69. - `search_products` - Search for grocery products by name with filtering options
  70. - `add_to_cart` - Add multiple products to your shopping cart
  71. - `get_cart_content` - View current cart contents and totals
  72. - `remove_from_cart` - Remove items from your shopping cart
  73. - `get_shopping_list` - Retrieve shopping lists by ID
  74. ### 🤖 Smart Shopping
  75. - `get_meal_suggestions` - Get personalized suggestions for breakfast, lunch, dinner, snacks, baking, drinks, or healthy eating based on your order history
  76. - `get_frequent_items` - Analyze order history to find most frequently purchased items (overall + per category)
  77. - `get_shopping_scenarios` - Interactive guide showing what you can do with the MCP
  78. ### Deals & Discounts
  79. - `get_discounted_items` - Browse currently discounted items (cenové trháky), optionally filtered by food category, with sorting and pagination
  80. ### Getting info
  81. - `get_account_data` - Get comprehensive account information including delivery details, orders, announcements, cart, and premium status
  82. - `get_order_history` - View your past delivered orders with details
  83. - `get_order_detail` - Get detailed information about a specific order including all products
  84. - `get_upcoming_orders` - See your scheduled upcoming orders
  85. - `get_delivery_info` - Get current delivery information and fees
  86. - `get_delivery_slots` - View available delivery time slots for your address
  87. - `get_premium_info` - Check your Rohlik Premium subscription status and benefits
  88. - `get_announcements` - View current announcements and notifications
  89. - `get_reusable_bags_info` - Track your reusable bags and environmental impact
  90. ## Development
  91. ### Installation
  92. ```bash
  93. npm install
  94. npm run build
  95. ```
  96. ### Scripts
  97. - `npm run build` - Compile TypeScript to JavaScript
  98. - `npm start` - Launch the production server
  99. - `npm run dev` - Start development mode with watch
  100. - `npm run inspect` - Test with MCP Inspector
  101. - `npm test` - Run unit tests
  102. - `npm run test:watch` - Run tests in watch mode
  103. - `npm run test:coverage` - Generate test coverage report
  104. ## Testing
  105. ### Unit Tests
  106. The project includes unit tests for smart shopping data transformation logic:
  107. ```bash
  108. # Run all tests
  109. npm test
  110. # Run tests in watch mode (development)
  111. npm run test:watch
  112. # Generate coverage report
  113. npm run test:coverage
  114. ```
  115. **What's tested:**
  116. - Frequency analysis algorithms (`get_frequent_items`)
  117. - Meal suggestion filtering and ranking (`get_meal_suggestions`)
  118. - Price averaging and calculations
  119. - Category filtering and grouping
  120. - Edge cases (empty data, missing fields, etc.)
  121. See [tests/README.md](./tests/README.md) for detailed testing documentation.
  122. ### Testing with Claude Desktop
  123. Add this to configuration:
  124. ```json
  125. {
  126. "mcpServers": {
  127. "rohlik-local": {
  128. "command": "node",
  129. "args": ["/path/to/rohlik-mcp/dist/index.js"],
  130. "env": {
  131. "ROHLIK_USERNAME": "your-email@example.com",
  132. "ROHLIK_PASSWORD": "your-password",
  133. "ROHLIK_BASE_URL": "https://www.rohlik.cz"
  134. }
  135. }
  136. }
  137. }
  138. ```
  139. ### Debug Mode
  140. If you're experiencing authentication issues, enable debug mode to see detailed logs:
  141. ```json
  142. {
  143. "mcpServers": {
  144. "rohlik-local": {
  145. "command": "node",
  146. "args": ["/path/to/rohlik-mcp/dist/index.js"],
  147. "env": {
  148. "ROHLIK_USERNAME": "your-email@example.com",
  149. "ROHLIK_PASSWORD": "your-password",
  150. "ROHLIK_BASE_URL": "https://www.rohlik.cz",
  151. "ROHLIK_DEBUG": "true"
  152. }
  153. }
  154. }
  155. }
  156. ```
  157. Debug logs will appear in `~/Library/Logs/Claude/mcp-server-rohlik-local.log` (macOS) or `%APPDATA%/Claude/logs/mcp-server-rohlik-local.log` (Windows).
  158. ### Testing with MCP Inspector
  159. You can test the MCP server using the official MCP Inspector (https://modelcontextprotocol.io/legacy/tools/inspector):
  160. ```bash
  161. npm run inspect
  162. ```
  163. In the Inspector, set the ROHLIK_USERNAME and ROHLIK_PASSWORD envs.
  164. ### API Validation Tool
  165. To validate that all Rohlik API endpoints are working correctly and diagnose authentication issues:
  166. ```bash
  167. npm run validate-api
  168. ```
  169. This will:
  170. - Test all 11 API endpoints used by the MCP server
  171. - Show detailed HTTP request/response logs in the console
  172. - Generate a JSON report: `tests/validation-results.json`
  173. - Generate a beautiful HTML report: `tests/validation-report.html`
  174. 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.
  175. ## Troubleshooting
  176. ### Common Issues
  177. #### Claude Desktop does not see the MCP server (on Windows)
  178. For your config file, instead of `%APPDATA%/Claude/claude_desktop_config.json` use `C:\Users\[YOUR WINDOWS USER]\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json`
  179. #### "Login failed" Error
  180. **Possible causes:**
  181. 1. Wrong username/password in configuration
  182. 2. Rohlik API changed or is temporarily unavailable
  183. 3. Network connectivity issues
  184. **Solutions:**
  185. 1. Verify credentials in your `claude_desktop_config.json`
  186. 2. Enable debug mode: `"ROHLIK_DEBUG": "true"` in env section
  187. 3. Check logs: `~/Library/Logs/Claude/mcp-server-rohlik*.log` (macOS) or `%APPDATA%\Claude\logs\mcp-server-rohlik*.log` (Windows)
  188. 4. Run API validator: `npm run validate-api` to test all endpoints
  189. #### "No order history found"
  190. **Cause:** Your account has no past orders, or orders are not accessible
  191. **Solution:** Ensure you have at least one completed order on Rohlik before using smart shopping features (`get_meal_suggestions`, `get_frequent_items`)
  192. #### Slow response times
  193. **Causes:**
  194. - Analyzing too many orders (smart shopping features)
  195. - Network latency to Rohlik servers
  196. - API rate limiting
  197. **Solutions:**
  198. - For smart shopping: reduce number of orders analyzed (try 10 instead of default 20)
  199. - Use fewer requests or add delays between bulk operations
  200. - Check your network connection
  201. #### Products not found or search returns no results
  202. **Causes:**
  203. - Product out of stock or discontinued
  204. - Product ID changed in Rohlik system
  205. - Spelling mistake in search query
  206. **Solutions:**
  207. - Search by partial name instead of full product name
  208. - Try alternative spellings or broader search terms
  209. - Verify product exists on Rohlik website directly
  210. #### Server fails with `spawn npx ENOENT`
  211. Under Claude Desktop, fails with:
  212. ```shell
  213. spawn npx ENOENT
  214. Server disconnected. Transport closed unexpectedly.
  215. ```
  216. **Solutions:**
  217. - Change config to use absolute path to npx as /Users/adam/.local/share/mise/installs/node/22.14.0/bin/npx)
  218. - See more info: https://github.com/tomaspavlin/rohlik-mcp/issues/6
  219. ### Enabling Debug Mode
  220. Add `ROHLIK_DEBUG` to your configuration to see detailed logs:
  221. ```json
  222. {
  223. "mcpServers": {
  224. "rohlik-local": {
  225. "command": "node",
  226. "args": ["/path/to/rohlik-mcp/dist/index.js"],
  227. "env": {
  228. "ROHLIK_USERNAME": "your-email@example.com",
  229. "ROHLIK_PASSWORD": "your-password",
  230. "ROHLIK_BASE_URL": "https://www.rohlik.cz",
  231. "ROHLIK_DEBUG": "true"
  232. }
  233. }
  234. }
  235. }
  236. ```
  237. **View logs:**
  238. ```bash
  239. # macOS
  240. tail -f ~/Library/Logs/Claude/mcp-server-rohlik-local.log
  241. # Windows
  242. type %APPDATA%\Claude\logs\mcp-server-rohlik-local.log
  243. ```
  244. ### Using the API Validation Tool
  245. If you encounter authentication or API issues, run the validator:
  246. ```bash
  247. npm run validate-api
  248. ```
  249. This will:
  250. - Test all 11 API endpoints used by the MCP
  251. - Show detailed HTTP request/response information
  252. - Generate `validation-results.json` with test results
  253. - Create `validation-report.html` for easy viewing in browser
  254. - Help identify which specific endpoints are failing
  255. ### Publishing as NPM package
  256. 1. Update version in package.json
  257. ```bash
  258. # Patch: 3.1.1 → 3.1.2
  259. npm version patch
  260. # Minor: 3.1.1 → 3.2.0
  261. npm version minor
  262. # Major: 3.1.1 → 4.0.0
  263. npm version major
  264. ```
  265. 2. `npm publish --access public`
  266. ## License
  267. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
  268. ## Acknowledgements
  269. - https://github.com/dvejsada/HA-RohlikCZ for reverse engineering the Rohlik.cz API

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.