mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

تمام mcp اینڈ پوائنٹس

توثيقِ شناخت

ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس mcp.manage اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔

جہاں آپ کی تنظیم کی آئی ڈی آتی ہے

یہ اینڈ پوائنٹ JSON باڈی میں ایک فیلڈ کے طور پر org_id لیتا ہے۔

آپ کی تنظیم کی آئی ڈی آپ کے ڈیش بورڈ پر 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