mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

すべての mcp エンドポイント

すべての開発者向けドキュメント

認証

ベアラー トークンとして API キーを送信します。キーには mcp.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

組織 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