agentleFS
tomaspavlintomaspavlin/rohlik-mcp/CLAUDE.md

rohlik-mcp

CLAUDE.md119 starsChanged 8 months agoMITView on GitHub

  • Reads credentials
  • In this repository2 other files it gives its agents.

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All endpoints use reverse-engineered Rohlik Group APIs

    line 55
  2. Very specific:

    /test-mcp skill: - Use this skill whenever you need to investigate what an API endpoint returns, verify tool field mappings, debug tool …

    line 72
  3. Distinctive:

    Unit tests: - Test data transformation logic in smart shopping features (frequent-items, meal-suggestions)

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Rohlik MCP Server - Project Context

Overview

This is a Model Context Protocol (MCP) server for Rohlik Group's online grocery services across Europe (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro).

Project Structure

src/
├── index.ts              # Main server entry point
├── rohlik-api.ts         # API client with all HTTP calls
├── types.ts              # TypeScript type definitions
└── tools/                # Individual MCP tools
    ├── search-products.ts
    ├── cart-management.ts
    ├── shopping-lists.ts
    ├── account-data.ts
    ├── order-history.ts
    ├── order-detail.ts
    ├── delivery-info.ts
    ├── upcoming-orders.ts
    ├── premium-info.ts
    ├── delivery-slots.ts
    ├── announcements.ts
    ├── reusable-bags.ts
    ├── frequent-items.ts      # Analyze purchase patterns
    ├── meal-suggestions.ts    # Data-driven meal shopping
    ├── shopping-scenarios.ts  # User help guide
    └── discounted-items.ts    # Browse current sales/deals

tests/
├── README.md             # Comprehensive testing guide
├── helpers.ts            # Mock data generators
├── frequent-items.test.ts    # Unit tests for frequency analysis
├── meal-suggestions.test.ts  # Unit tests for meal suggestions
└── validate-api.ts       # Integration tests for API endpoints

Environment Variables

  • ROHLIK_USERNAME - User email (required)
  • ROHLIK_PASSWORD - User password (required)
  • ROHLIK_BASE_URL - Service URL (optional, defaults to rohlik.cz)
  • ROHLIK_DEBUG - Enable debug logging (optional, set to "true")

Available Tools (17 total)

Smart Shopping: get_meal_suggestions, get_frequent_items, get_shopping_scenarios Core Shopping: search_products, add_to_cart, get_cart_content, remove_from_cart, get_shopping_list Deals & Discounts: get_discounted_items Order Management: get_account_data, get_order_history, get_order_detail, get_upcoming_orders Delivery: get_delivery_info, get_delivery_slots Account: get_premium_info, get_announcements, get_reusable_bags_info

Key Implementation Details

  • Each tool is in separate file for modularity
  • API client handles authentication (login/logout per request)
  • All endpoints use reverse-engineered Rohlik Group APIs
  • Session management via cookies
  • Error handling with typed exceptions
  • Unit tests for data transformation logic (smart shopping features)
  • Integration tests for API validation

Development Commands

  • npm run build - Compile TypeScript
  • npm start - Run production server
  • npm run dev - Development mode
  • npm run inspect - Test with MCP Inspector
  • npm test - Run unit tests
  • npm run test:watch - Run tests in watch mode
  • npm run test:coverage - Generate test coverage report
  • npm run validate-api - Integration tests for API endpoints

Testing

  • /test-mcp skill - Use this skill whenever you need to investigate what an API endpoint returns, verify tool field mappings, debug tool output, or test changes. It lets you call the API directly via node --env-file=.env without needing the user to run the Inspector.
  • Unit tests - Test data transformation logic in smart shopping features (frequent-items, meal-suggestions)
  • Integration tests - Validate all API endpoints against real Rohlik API
  • Test helpers - Mock data generators for consistent test data
  • See tests/README.md for comprehensive testing documentation

Documentation Structure

  • README.md - Quick overview, installation, basic usage, troubleshooting
  • docs/README.md - Comprehensive user guide (500+ lines)
  • tests/README.md - Testing guide with examples and best practices
  • CLAUDE.md - This file, for Claude Code context

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.