# MCP and connectors

The MCP server gives agents the same capabilities as the REST API. Every tool is a thin wrapper over the same service, so results match REST exactly.

**Endpoint**

```text
https://dev.ziffi.xyz/v1/mcp
```

JSON-RPC 2.0. Read tools need no key. Send `X-Ziffi-Key` to be credited for attribution.

## Tool catalog

| Tool | Does |
|---|---|
| `search_products` | Search across all brands. Args: `q`, `mode`, `price_min`, `price_max`, `in_stock`, `brand`, `sort`, `limit`. |
| `get_product` | Full detail by `ident` (id or product_uid). |
| `get_price` | Live price and stock by `ident`. |
| `recommend` | Related or cross-brand for a `product_id`. |
| `browse` | Faceted grid by `category` or `brand`. |
| `suggest` | Typeahead for a partial `q`. |
| `find_coupons` | Working discount codes by `product`, `brand`, or `domain`. |
| `list_brands` | Brands in the catalogue. |
| `list_categories` | The category tree. |

Discover the live list anytime:

```bash
curl -X POST "https://dev.ziffi.xyz/v1/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## Connect a client

**ChatGPT**

Add a connector or action that points at the OpenAPI at `/openapi.json`. Read actions need no auth. For attribution, configure an `X-Ziffi-Key` header credential.

**Claude**

Add a custom connector with the MCP URL above (Projects or Desktop).

**Any MCP client**

Use standard `initialize`, then `tools/list` and `tools/call`.

## Try it

The [Playground](/dev/) has a live MCP tester. Pick a tool, fill the arguments, and see the JSON-RPC result.

## Next steps

- [Build an AI agent](#/agents): a worked multi-step flow.
- [API reference](#/reference): the REST equivalents.
