Skip to main content
POST
TestConnection

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Body

application/json

MCPServerServiceTestConnectionRequest exercises an MCPServerExternalConfig against the upstream server and reports whether the supplied URL + transport + credentials accept a real MCP initialize + tools/list.

appId
string

App ID of an existing external MCP connector. When set together with connector_id, the request runs in edit mode (see above).

connectorId
string

Connector ID of an existing external MCP connector. When set together with app_id, the request runs in edit mode (see above).

externalConfig
Mcp Server External Config · object | null

MCPServerExternalConfig configures an external MCP server accessed via HTTP transport. The server is routed through the MCP gateway for credential decryption.

This message contains a oneof named auth_config. Only a single field of the following list may be set at a time:

  • none
  • bearerToken
  • oauth2
  • customHeader
  • basicAuth
updateMask
string | null

Response

200 - application/json

Successful response

The MCPServerServiceTestConnectionResponse message.

failureReason
string

Sanitized, human-readable explanation of why the probe failed, set only when reachable=false (e.g. "MCP server unreachable or rejected the credentials (HTTP 401 Unauthorized)"). Empty when reachable=true. Never contains raw upstream response bytes.

reachable
boolean

True when the MCP initialize handshake AND a tools/list call both succeeded against the upstream with the supplied credentials. False when the probe ran but the upstream was unreachable or rejected the request — see failure_reason. Malformed requests (missing/invalid config, bad permissions) are returned as a gRPC error, not reachable=false.

toolCount
string<int64>

Number of tools advertised by the upstream's tools/list response. Zero when reachable=false; can also legitimately be zero when the server is reachable but exposes no tools. int64 to match MCPServerSearchWithToolCountResult.tool_count.