mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

جميع نقاط نهاية mcp

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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

التفاصيل

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