mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Ҳамаи нуқтаҳои ниҳоии mcp

Санҷиши ҳаққоният

Kaliti API-ро ҳамчун рамзи доранда (bearer token) фиристед. Калит бояд дорои иҷозати mcp.manage бошад; калиди бидуни он бо хатои 403 рад карда мешавад, на 404.

Ҷое, ки рақами мушаххаси ташкилоти шумо ҷойгир аст

Ин нуқтаи поёнӣ org_id -ро ҳамчун майдон дар бадани JSON мегирад.

Rakami муайянкунандаи ташкилоти шумо дар экрани калидҳои API дар панели идоракунии шумо, дар паҳлӯи худи калид ҷойгир аст. Ин як раками муайянкунанда дар ҳар یک дархосте, ки шумо иҷро мекунед, якхела аст.

Санҷидан

Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.

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

Воarid шудаед? Консоли API дар панели идоракунии шумо рақами мушаххаси ташкилоти воқеӣ ва калиди худро пур мекунад ва дархостро бар зидди 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