mcp
POST /v1/mcp/connections
Create an MCP connection (Connect AI tool).
Autentifikimi
Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen mcp.manage; një çelës pa të refuzohet me 403, jo 404.
Ku shkon id i organizatës suaj
Ky endpoint pranon org_id si fushë në trupin JSON.
ID-ja e organizatës suaj ndodhet në ekranin e çelësave API në panelin tuaj të kontrollit, pranë vetë çelësit. Është i njëjti ID në çdo thirrje që bëni.
Provoje
Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.
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[]> }'Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së
Detajet
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`.
Trupi i kërkesës
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
name | string | Po | — |
client | McpClient | Jo | The AI client a connection is for (informational). |
scopes | string[] | Po | 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`,… |
sandbox | boolean | Jo | — |
org_id | Uuid | null | Jo | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Jo | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Jo | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Jo | — |
Përgjigja
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
id | Uuid | Po | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Po | — |
client | McpClient | Po | The AI client a connection is for (informational). |
prefix | string | Po | The token's public lookup prefix (not a secret). |
scopes | string[] | Po | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Po | — |
spend_cap_minor | integer | null | Jo | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Jo | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Po | The rolling window the spend cap applies over. |
last_used_at | string | null | Jo | — |
revoked_at | string | null | Jo | — |
created_at | string | Po | — |
token | string | Po | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Po | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Po | A paste-ready MCP client config snippet embedding the endpoint + token. |
Gabimet që ky pikëndalim mund të kthejë
401 · 403 · 422 · 429