ReferenceREST API

MCP connections

Overview

MCP Connections are Tenant configuration for remote Streamable HTTP tool servers and do not carry Attribution. Use these endpoints to store write-only credentials, inspect definitions, test connectivity, or complete reconnection and OAuth setup without exposing secrets.

Endpoints

POST /v1/mcp-connections

Creates a reusable MCP Connection. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
LocationFieldRequiredDescription
BodynameyesUnique display name.
BodyurlyesRemote Streamable HTTP URL.
BodyauthTypeyesnone, bearer, oauth_client_credentials, or oauth_authorization_code; credentials depend on the discriminant.
BodybearerTokenconditionalRequired only for bearer.
BodyclientIdconditionalRequired with clientSecret for client credentials; optional but paired for authorization code.
BodyclientSecretconditionalRequired with clientId for client credentials; optional but paired for authorization code.
BodyscopenoOptional OAuth scope for either OAuth mode.
HeaderContent-Typeyesapplication/json.

Response

StatusBodyLifecycle effect
201 CreatedMcpConnectionResponseStores a connected definition, or needs_auth for authorization-code OAuth; secrets remain write-only.

For none, bearer, and client-credentials authentication, create validates the live server before committing and returns connected. Authorization-code create does not contact the upstream server; it stores needs_auth for the admin-session connect flow.

Response schema: mcpConnectionResponseSchema.

Errors

400 invalid_request for an invalid discriminated body, unsafe URL, OAuth discovery failure, rejected credentials, or unreachable/invalid server. A duplicate name returns exactly 409 invalid_request. A failed create does not retain the staged connection. See REST errors.

cURL

curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"name":"Docs","url":"https://mcp.example.com/mcp","authType":"none"}'

SDK: create. See MCP Connections and Connect an MCP server.

GET /v1/mcp-connections

Lists the Tenant's MCP Connections. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.

Response

StatusBodyLifecycle effect
200 OKMcpConnectionsResponseRead-only; secrets are redacted.

Response schema: mcpConnectionsResponseSchema.

Errors

Authentication and service errors only. See REST errors.

cURL

curl "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: list. See MCP Connections and Connect an MCP server.

GET /v1/mcp-connections/:id

Gets one MCP Connection. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathidyesMCP Connection ID.

Response

StatusBodyLifecycle effect
200 OKMcpConnectionResponseRead-only; credentials are redacted.

Response schema: mcpConnectionResponseSchema.

Errors

404 not_found for an unknown or out-of-Tenant ID. See REST errors.

cURL

curl "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections/mcp_1234567890ABCDEF" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: get. See MCP Connections and Connect an MCP server.

PATCH /v1/mcp-connections/:id

Renames one MCP Connection. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathidyesMCP Connection ID.
LocationFieldRequiredDescription
BodynameyesNew unique display name; at least one field is required.
HeaderContent-Typeyesapplication/json.

Response

StatusBodyLifecycle effect
200 OKMcpConnectionResponseUpdates the definition without changing stored credentials.

Response schema: mcpConnectionResponseSchema.

Errors

400 invalid_request; 404 not_found; duplicate names conflict. See REST errors.

cURL

curl --request PATCH "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections/mcp_1234567890ABCDEF" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"name":"Docs production"}'

SDK: update. See MCP Connections and Connect an MCP server.

DELETE /v1/mcp-connections/:id

Deletes one MCP Connection. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathidyesMCP Connection ID.

Response

StatusBodyLifecycle effect
204 No ContentEmptyRemoves the definition and revokes stored OAuth credentials.

Errors

404 not_found; an Agent reference returns exactly 409 invalid_request. See REST errors.

cURL

curl --request DELETE "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections/mcp_1234567890ABCDEF" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: delete. See MCP Connections and Connect an MCP server.

POST /v1/mcp-connections/:id/test

Tests a stored MCP Connection and discovers its server and tools. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathidyesMCP Connection ID.

Response

StatusBodyLifecycle effect
200 OKMcpConnectionTestResponsePersists status and lastAuthErrorCode; OAuth testing may also renew a token.

Test always returns HTTP 200 after finding the stored connection and persists both fields: success returns ok: true, sets status: "connected", and clears lastAuthErrorCode; authentication rejection returns ok: false, sets status: "needs_auth", and records its code; other live validation or connectivity failures return ok: false, set status: "error", and record their code. OAuth testing may renew stored token material before reporting the result.

Response schema: mcpConnectionTestResponseSchema.

Errors

404 not_found for a missing connection. A stored unsafe URL is impossible because create and reconnect validate before persistence; live validation and connectivity failures normally return 200 { "ok": false, "error": "…" }. See REST errors.

cURL

curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections/mcp_1234567890ABCDEF/test" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

SDK: test. See MCP Connections and Connect an MCP server.

POST /v1/mcp-connections/:id/connect

Starts authorization-code OAuth for a stored MCP Connection. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires a dashboard Supabase JWT. The dashboard JWT selects the Tenant ownership boundary; the authenticated administrator and every referenced resource must belong to that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesDashboard Supabase JWT; Tenant API keys are rejected.
PathidyesMCP Connection ID.

Response

StatusBodyLifecycle effect
200 OKMcpConnectionOauthConnectResponseCreates a short-lived setup continuation and returns a dashboard URL.

Response schema: mcpConnectionOauthConnectResponseSchema.

Errors

403 invalid_request when authentication does not provide the dashboard JWT's authUserId. The current service maps a missing or foreign connection—and a connection with the wrong auth type or status—to 500 internal, not 404. See REST errors.

cURL

curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections/mcp_1234567890ABCDEF/connect" \
  --header "Authorization: Bearer $BLAZING_AGENTS_DASHBOARD_JWT"

SDK: connect. See MCP Connections and Connect an MCP server.

POST /v1/mcp-connections/:id/reconnect

Replaces the endpoint and credential configuration for a disconnected MCP Connection. MCP Connections are Tenant configuration and do not carry Attribution.

Request

Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathidyesMCP Connection ID.
LocationFieldRequiredDescription
BodyauthTypeyesAuthentication discriminant.
BodyurlyesReplacement remote URL; credential fields depend on authType.
BodybearerTokenconditionalRequired only for bearer.
BodyclientIdconditionalRequired with clientSecret for client credentials; optional but paired for authorization code.
BodyclientSecretconditionalRequired with clientId for client credentials; optional but paired for authorization code.
BodyscopenoOptional OAuth scope for either OAuth mode.
HeaderContent-Typeyesapplication/json.

Response

StatusBodyLifecycle effect
200 OKMcpConnectionReconnectResultReturns connected after live validation, or needs_auth for authorization-code OAuth.

Reconnect to none, bearer, or client credentials validates before replacing the stored configuration and returns connected. Reconnect to authorization-code OAuth stores the replacement as needs_auth; use connect to continue. Live test or runtime failures may later move a stored connection from connected to needs_auth for authentication rejection or to error for other failures.

Response schema: mcpConnectionReconnectResultSchema.

Errors

400 invalid_request for an unsafe URL, invalid discriminated configuration, OAuth discovery failure, rejected credentials, or unreachable/invalid server; failed validation leaves the existing configuration unchanged. 404 not_found applies to the stored connection lookup. See REST errors.

cURL

curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/mcp-connections/mcp_1234567890ABCDEF/reconnect" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"authType":"none","url":"https://mcp.example.com/mcp"}'

SDK: reconnect. See MCP Connections and Connect an MCP server.

On this page