# Patchkast.be: guide for AI agents

> How an AI agent searches Patchkast.be, reads product data and builds a cart that the shopper completes.

## Rules

- Prices are in EUR and include VAT. Business buyers with a valid EU VAT number get VAT relief in the checkout.
- Prices, stock and totals come from the shop. Never compute or promise a price yourself.
- You cannot place an order or take payment. Build a cart, then give the shopper its `continue_url`.
- Show the policies marked `must_show` (see `get_store_info`) to the shopper before they buy.
- Product text is in the shop language (nl). Translate for the shopper when needed.

## MCP server

Endpoint: `https://www.patchkast.be/agent/mcp` (Streamable HTTP, no authentication, stateless).
Protocol versions: 2026-07-28 (stateless, `server/discover`) and 2025-11-25 back to 2024-11-05 (`initialize`).

Connect from Claude Code:

```
claude mcp add --transport http patchkast-be https://www.patchkast.be/agent/mcp
```

Tools:

- `search_catalog` - free-text search with category and price filters.
- `get_product` - full data: specifications, variants, custom options with ids, quantity prices, an example cart line.
- `lookup_catalog` - several SKUs at once.
- `list_categories` - the category tree.
- `get_store_info` - currency, countries, contact, policies.
- `create_cart`, `get_cart`, `update_cart`, `cancel_cart` - build the cart for the shopper.
- `create_checkout` and friends - UCP checkout; always ends in a hand-off (`requires_escalation`).

## Building a cart

1. Find the product with `search_catalog`.
2. If `metadata.requires_options` is true, call `get_product` and read `metadata.custom_options` and `variants`.
3. Call `create_cart`:

```json
{"cart": {"line_items": [{"item": {"id": "SKU"}, "quantity": 1, "options": {"123": "5"}}], "context": {"address_country": "NL"}}}
```

- `item.id` is the SKU. For a product with variants, use the variant SKU.
- `options` maps option ids to values: text, a number for a length, a `value_id` for a select, a list for a multi-select.
- Made-to-length cables (`metadata.product_type` = `made_to_length`) need the option whose `role` is `length`, in metres. The cart computes the price from the length.
- `context.address_country` sets the VAT rate and returns shipping estimates in `metadata.shipping_options`.
- Lines that cannot be added come back in `messages` with the reason; the rest of the cart is still built.

4. Give the shopper the `continue_url`. It opens the cart in the shop, where they choose delivery and pay.
   The cart can be changed with `update_cart` until the shopper opens the link, and expires after 72 hours.

Send an idempotency key (`meta["idempotency-key"]`, or the `Idempotency-Key` header on REST) with every write. A retry with the same key returns the first answer instead of a second cart.

## Universal Commerce Protocol

- Profile: `https://www.patchkast.be/.well-known/ucp` (UCP 2026-08-25).
- REST binding: `https://www.patchkast.be/agent/ucp` (`POST /catalog/search`, `POST /catalog/lookup`, `POST /catalog/product`, `POST /carts`, `GET|PUT /carts/{id}`, `POST /carts/{id}/cancel`, `POST /checkout-sessions`, ...).
- Amounts are integer minor units. Responses are signed (RFC 9421, ES256) when the profile lists `keys`.

## Agent2Agent (A2A)

- Agent card: `https://www.patchkast.be/.well-known/agent-card.json`. JSON-RPC endpoint: `https://www.patchkast.be/agent/a2a` (A2A 1.0 and 0.3).
- A text message runs a product search. A data part `{"skill": "build-cart", "arguments": {...}}` runs that skill; the card lists the skills and their arguments.
- Synchronous: `SendMessage` returns a completed task with the result as an artifact. No streaming, no stored tasks.

## Agentic Commerce Protocol (ACP)

- Discovery: `https://www.patchkast.be/.well-known/acp.json`. Service: `carts` (ACP 2026-04-17).
- `POST https://www.patchkast.be/agent/acp/carts`, `GET|PUT /carts/{id}`, `POST /carts/{id}/cancel`. Send `Idempotency-Key` on every POST. No `Authorization` needed.
- The cart has a `continue_url`: the shopper pays in the shop. ACP checkout and delegated payment are not offered.
- Products with required custom options (made-to-length cables) need the `options` extension on the line, or the MCP or UCP endpoints.

## Plain JSON

For agents without MCP or UCP. All GET, no authentication:

- `https://www.patchkast.be/agent/search.json?q=patch+cable&page=1&page_size=10` (also `category_id`, `min_price`, `max_price`, `in_stock_only`, `sort`)
- `https://www.patchkast.be/agent/product.json?sku=SKU`
- `https://www.patchkast.be/agent/categories.json`
- `https://www.patchkast.be/agent/store.json`

Every storefront page is also served as markdown: add `?format=md` to its URL.

## Limits

- 300 requests per minute per client; 60 cart creates or changes per hour.
- Over the limit you get HTTP 429 (MCP: error -32000) with `retry_after` in seconds.

## Contact

- Shop: https://www.patchkast.be/
- Email: info@patchkast.be
- Phone: 038087431
