mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

सभी mcp एंडपॉइंट्स

प्रमाणन

बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास mcp.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।

जहां आपकी संगठन आईडी आती है

यह एंडपॉइंट JSON बॉडी में एक फ़ील्ड के रूप में org_id लेता है।

आपकी ऑर्गनाइजेशन आईडी आपके डैशबोर्ड पर एपीआई कीज़ स्क्रीन पर, की के ठीक बगल में मौजूद है। यह आपके द्वारा की जाने वाली हर कॉल में समान आईडी होती है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

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