mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Tất cả các điểm cuối mcp

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền mcp.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

curl -X POST https://api.zinndigital.com/v1/mcp/connections \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "scopes": <string[]> }'

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

Mints a per-tool MCP connection and returns the full `zmcp_…` token **once** (only its hash is stored) plus a paste-ready client config snippet. The requested `scopes` must be permissions the caller already holds in the target org — an unheld scope is a `403` (a connection can never out-scope its creator), an unknown one a `422`. An optional spend cap bounds AI-triggered paid actions. Requires `mcp.manage`.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
namestring
clientMcpClientKhôngThe AI client a connection is for (informational).
scopesstring[]RBAC permission keys to grant the token. Each must be a permission the caller holds in the target org (a connection can never out-scope its creator); an unheld scope is a `403`,…
sandboxbooleanKhông
org_idUuid | nullKhôngThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullKhôngOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeKhôngISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerKhông

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestring
clientMcpClientThe AI client a connection is for (informational).
prefixstringThe token's public lookup prefix (not a secret).
scopesstring[]The RBAC permission keys this connection's token may exercise.
sandboxboolean
spend_cap_minorinteger | nullKhôngOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeKhôngISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerThe rolling window the spend cap applies over.
last_used_atstring | nullKhông
revoked_atstring | nullKhông
created_atstring
tokenstringThe full `zmcp_…` token, shown exactly once.
endpointstringThe MCP protocol endpoint URL to configure in the AI client.
configobjectA paste-ready MCP client config snippet embedding the endpoint + token.

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422 · 429