mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Všechny koncové body mcp

Všechny dokumenty pro vývojáře

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění mcp.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Sem patří ID vaší organizace

Tento koncový bod přijímá org_id jako pole v těle JSON.

ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

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

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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.

Tělo požadavku

NázevTypPožadovánoCo to je
namestringAno
clientMcpClientNeThe AI client a connection is for (informational).
scopesstring[]AnoRBAC 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,…
sandboxbooleanNe
org_idUuid | nullNeThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullNeOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeNeISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerNe

Odpověď

NázevTypPožadovánoCo to je
idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringAno
clientMcpClientAnoThe AI client a connection is for (informational).
prefixstringAnoThe token's public lookup prefix (not a secret).
scopesstring[]AnoThe RBAC permission keys this connection's token may exercise.
sandboxbooleanAno
spend_cap_minorinteger | nullNeOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeNeISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerAnoThe rolling window the spend cap applies over.
last_used_atstring | nullNe
revoked_atstring | nullNe
created_atstringAno
tokenstringAnoThe full zmcp_… token, shown exactly once.
endpointstringAnoThe MCP protocol endpoint URL to configure in the AI client.
configobjectAnoA 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_fileobjectAnoWhere that client reads config — e.g. .mcp.json. null when it has no file.
commandobjectAnoA one-line alternative for a client with a command line (Claude Code), else null. It embeds the token, so treat it like the token.
noteobjectAnoSet 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.

Chyby, které může tento koncový bod vrátit

401 · 403 · 422 · 429