mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Semua titik akhir mcp

Pengesahan

Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran mcp.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.

Tempat ID organisasi anda diletakkan

Titik akhir ini mengambil org_id sebagai medan dalam kandungan JSON.

ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

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

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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

Badan permintaan

NamaJenisDiperlukanApakah ia
namestringYa
clientMcpClientTidakThe AI client a connection is for (informational).
scopesstring[]YaRBAC 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`,…
sandboxbooleanTidak
org_idUuid | nullTidakThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullTidakOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeTidakISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerTidak

Respons

NamaJenisDiperlukanApakah ia
idUuidYaUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringYa
clientMcpClientYaThe AI client a connection is for (informational).
prefixstringYaThe token's public lookup prefix (not a secret).
scopesstring[]YaThe RBAC permission keys this connection's token may exercise.
sandboxbooleanYa
spend_cap_minorinteger | nullTidakOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeTidakISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerYaThe rolling window the spend cap applies over.
last_used_atstring | nullTidak
revoked_atstring | nullTidak
created_atstringYa
tokenstringYaThe full `zmcp_…` token, shown exactly once.
endpointstringYaThe MCP protocol endpoint URL to configure in the AI client.
configobjectYaA paste-ready MCP client config snippet embedding the endpoint + token.

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 422 · 429