mcp
POST /v1/mcp/connections
Create an MCP connection (Connect AI tool).
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ 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.
សំណើរបស់រាងកាយ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
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