> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.butterix.com/llms.txt
> - v0: https://docs.butterix.com/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/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 服务器

`POST /mcp`

组织的 MCP 服务器（Streamable HTTP 传输，JSON 响应），只读。只接受组织 API Key，工具见[托管平台](https://docs.butterix.com/guides/deploy/platform.md#组织-mcp-服务器)。
`GET` 请求返回 405；每个 API Key 每分钟最多 120 次调用，超过返回 429。

Base URL: https://api.butterix.com/v1

Authentication: bearer token in Authorization header

## 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://api.butterix.com/v1/mcp \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
         "jsonrpc": "2.0",
         "id": 1,
         "method": "tools/call",
         "params": {
           "name": "list_sites",
           "arguments": {}
         }
       }'
```

## Responses

### 200

JSON-RPC 响应

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

通知类消息，无响应体

### 401

未登录或凭据无效

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string | yes | 人类可读的错误信息 |
| `code` | string | no | 机器可读的错误码（部分接口提供） |

### Example response (200)

```json
{
  "jsonrpc": "string",
  "id": "string",
  "result": {},
  "error": {
    "code": 1,
    "message": "string"
  }
}
```
