mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Όλα τα τελικά σημεία mcp

Πισtoποίηση

Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα mcp.manage· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.

Πού μπαίνει το αναγνωριστικό του οργανισμού σας

Αυτό το endpoint δέχεται το πεδίο org_id στο σώμα JSON.

Το αναγνωριστικό του οργανισμού σας βρίσκεται στην οθόνη των κλειδιών API στον πίνακα ελέγχου σας, δίπλα στο ίδιο το κλειδί. Είναι το ίδιο αναγνωριστικό σε κάθε κλήση που πραγματοποιείτε.

Δοκιμάστε το

Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.

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

Συνδεθήκατε; Η κονσόλα 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`.

Σώμα αίτησης

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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Όχι

Απάντηση

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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