mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Բոլոր mcp վերջնակետերը

Բոլոր մշակողների փաստաթղթերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա mcp.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն

Այս վերջնակետը JSON մարմնում որպես դաշտ վերցնում է org_id-ը։

Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն 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 վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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 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_fileobjectԱյոWhere that client reads config — e.g. .mcp.json. null when it has no file.
commandobjectԱյո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.
noteobjectԱյո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