> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cabrapi.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Integration (Model Context Protocol)

> Connect AI clients such as Cursor, VS Code, and Claude to the official caBRAPI MCP server to manage your store using natural language.

The **caBRAPI MCP** server exposes the caBRAPI REST API as **33 MCP tools** over **Streamable HTTP**, allowing compatible AI clients to manage stores, products, categories, coupons, payments, affiliates, pages, webhooks, and fees directly from chat.

## Connection details

* **Endpoint:** `https://mcp.cabrapi.com.br/mcp`
* **Transport:** Streamable HTTP (`POST /mcp`)
* **Authentication:** OAuth 2.0 with PKCE (S256) or caBRAPI API key

## Authentication

You can connect in two ways:

1. **OAuth 2.0 with PKCE (recommended):** modern clients (such as Cursor and VS Code) automatically open the browser authorization page so you can enter your caBRAPI API key without storing it in plain text in your config file.
2. **`Authorization` header:** send your API key directly in the `Authorization` header (**without** the `Bearer` prefix).

## Client configuration

### Cursor / VS Code (`mcp.json`)

```json theme={null}
{
  "mcpServers": {
    "cabrapi": {
      "url": "https://mcp.cabrapi.com.br/mcp"
    }
  }
}
```

If you prefer authenticating manually with an API key header:

```json theme={null}
{
  "mcpServers": {
    "cabrapi": {
      "url": "https://mcp.cabrapi.com.br/mcp",
      "headers": {
        "Authorization": "YOUR_CABRAPI_API_KEY"
      }
    }
  }
}
```

## Available resources (35 tools)

Once connected, your AI client can use tools to manage:

* **Stores & fees:** list, inspect, and update stores and fees.
* **Products & categories:** create, edit, reorder, and delete products and categories.
* **Coupons:** create, look up by code/ID, update, reorder, and delete coupons.
* **Payments:** list, filter, and inspect payment details.
* **Affiliates, pages & webhooks:** manage affiliates, store pages, and webhook subscriptions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.