mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

כל נקודות הקצה מסוג mcp

אימות

שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה mcp.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.

המקום שבו מזהה הארגון שלך נכנס

נקודת קצה זו מקבלת את org_id כשדה בגוף ה-JSON.

מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

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

גוף הבקשה

שםסוגנדרשמה זה
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לא

תשובה

שםסוגנדרשמה זה
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