mcp
POST /v1/mcp/connections
Create an MCP connection (Connect AI tool).
Doğrulama
API açarını bearer token kimi göndərin. Açar mcp.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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[]> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
name | string | Bəli | — |
client | McpClient | Xeyr | The AI client a connection is for (informational). |
scopes | string[] | Bəli | 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 | Xeyr | — |
org_id | Uuid | null | Xeyr | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Xeyr | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Xeyr | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | Uuid | Bəli | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Bəli | — |
client | McpClient | Bəli | The AI client a connection is for (informational). |
prefix | string | Bəli | The token's public lookup prefix (not a secret). |
scopes | string[] | Bəli | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Bəli | — |
spend_cap_minor | integer | null | Xeyr | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Xeyr | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Bəli | The rolling window the spend cap applies over. |
last_used_at | string | null | Xeyr | — |
revoked_at | string | null | Xeyr | — |
created_at | string | Bəli | — |
token | string | Bəli | The full zmcp_… token, shown exactly once. |
endpoint | string | Bəli | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Bəli | A paste-ready config for the connection's client, embedding the endpoint and token. The shape differs per client: Claude Code gets an http-typed server, Cursor a url +… |
config_file | object | Bəli | Where that client reads config — e.g. .mcp.json. null when it has no file. |
command | object | Bəli | A one-line alternative for a client with a command line (Claude Code), else null. It embeds the token, so treat it like the token. |
note | object | Bəli | Set when the client cannot use a bearer token at all. chatgpt_needs_oauth: ChatGPT connects by OAuth sign-in only, so this token cannot reach it. |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422 · 429