mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

จุดสิ้นสุด mcp ทั้งหมด

การยืนยันตัวตน

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ mcp.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body

รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ 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