> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.butterix.com/en/llms.txt
> - v0: https://docs.butterix.com/en/v0/llms.txt

> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.butterix.com/en/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.butterix.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.butterix.com/_biti/feedback/agent.

# MCP server

`POST /_mcp/server`

The site's MCP server (Streamable HTTP transport, JSON responses). Supports `initialize`, `ping`, `tools/list`, and `tools/call`, and accepts batches.
Tools: `search_docs` (search), `get_page` (a page's Markdown), and `list_pages` (list pages). On sites with several languages, `search_docs` and `list_pages` accept `locale`. `GET` requests get 405; sites with MCP turned off return 404.
Password-protected sites need an access token or an OAuth sign-in, and return 401 without one.

Base URL: https://butterix-sites.butterix.com

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `jsonrpc` | "2.0" | yes | Allowed: `2.0`. |
| `id` | string | no |  |
| `method` | enum | yes | Allowed: `initialize`, `ping`, `tools/list`, `tools/call`. |
| `params` | object | no |  |

## Example request

```bash
curl -X POST https://butterix-sites.butterix.com/_mcp/server \
     -H "Content-Type: application/json" \
     -d '{
         "jsonrpc": "2.0",
         "id": 1,
         "method": "tools/call",
         "params": {
           "name": "search_docs",
           "arguments": {
             "query": "Custom domains",
             "limit": 3
           }
         }
       }'
```

## Responses

### 200

JSON-RPC response

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `jsonrpc` | string | no |  |
| `id` | string | no |  |
| `result` | object | no |  |
| `error` | object | no |  |
| `error.code` | integer | no |  |
| `error.message` | string | no |  |

### 202

Notifications have no response body

### Example response (200)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "## 1. Custom domains › Configure DNS\nURL: https://docs.butterix.com/guides/deploy/custom-domains\n\nAdd a TXT record…"
      }
    ]
  }
}
```
