mcp
POST /v1/mcp/connections
Create an MCP connection (Connect AI tool).
प्रमाणन
बेरर टोकन के रूप में एक 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.
अनुरोध बॉडी
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
name | string | हाँ | — |
client | McpClient | नहीं | The AI client a connection is for (informational). |
scopes | string[] | हाँ | 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,… |
sandbox | boolean | नहीं | — |
org_id | Uuid | null | नहीं | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | नहीं | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | नहीं | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | नहीं | — |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यह क्या है |
|---|---|---|---|
id | Uuid | हाँ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | हाँ | — |
client | McpClient | हाँ | The AI client a connection is for (informational). |
prefix | string | हाँ | The token's public lookup prefix (not a secret). |
scopes | string[] | हाँ | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | हाँ | — |
spend_cap_minor | integer | null | नहीं | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | नहीं | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | हाँ | The rolling window the spend cap applies over. |
last_used_at | string | null | नहीं | — |
revoked_at | string | null | नहीं | — |
created_at | string | हाँ | — |
token | string | हाँ | The full zmcp_… token, shown exactly once. |
endpoint | string | हाँ | The MCP protocol endpoint URL to configure in the AI client. |
config | object | हाँ | A paste-ready config for the connection's client, embedding the endpoint and token. The shape differs per client: Claude Code gets an http-typed server, Cursor a url +… |
config_file | object | हाँ | Where that client reads config — e.g. .mcp.json. null when it has no file. |
command | object | हाँ | A one-line alternative for a client with a command line (Claude Code), else null. It embeds the token, so treat it like the token. |
note | object | हाँ | Set when the client cannot use a bearer token at all. chatgpt_needs_oauth: ChatGPT connects by OAuth sign-in only, so this token cannot reach it. |
त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है
401 · 403 · 422 · 429