mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Бүх mcp төгсгөлийн цэгүүд

Баталгаажуулалт

API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь mcp.manage эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.

Таны байгууллагын дугаар орох газар

Энэ төгсгөлийн цэг нь JSON бие хэсэгт org_id-ийг талбар болгон авдаг.

Танай байгууллагын ID нь таны хяналтын самбар дээрх API түлхүүрийн дэлгэцэнд, түлхүүр өөрөө хажууд байрладаг. Энэ нь таны хийх дуудлага бүрт ижил ID байна.

Туршиж үзэх

Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.

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[]> }'

Та нэвтэрсэн байна уу? Таны хяналтын самбар дахь API консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй API рүү хүсэлт илгээх тул та бодит хариуг харах боломжтой болно. Энэ төгсгөлийн цэгийг API консол дээр нээх

Дэлгэрэнгүй

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`.

Хүсэлтийн бие

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
namestringТийм
clientMcpClientҮгүйThe 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`,…
sandboxbooleanҮгүй
org_idUuid | nullҮгүйThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullҮгүйOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeҮгүйISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerҮгүй

Хариу үйлдэл

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
idUuidТиймUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringТийм
clientMcpClientТиймThe AI client a connection is for (informational).
prefixstringТиймThe token's public lookup prefix (not a secret).
scopesstring[]ТиймThe RBAC permission keys this connection's token may exercise.
sandboxbooleanТийм
spend_cap_minorinteger | nullҮгүйOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeҮгүйISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerТиймThe rolling window the spend cap applies over.
last_used_atstring | nullҮгүй
revoked_atstring | nullҮгүй
created_atstringТийм
tokenstringТиймThe full `zmcp_…` token, shown exactly once.
endpointstringТиймThe MCP protocol endpoint URL to configure in the AI client.
configobjectТиймA paste-ready MCP client config snippet embedding the endpoint + token.

Энэ төгсгөл цэгээс буцааж болох алдаанууд

401 · 403 · 422 · 429