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 a configured external or hosted MCP server against the upstream and reports whether credentials accept a real initialize + tools/list round trip.

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
hostedConfig
Mcp Server Hosted Config · object | null

MCPServerHostedConfig configures a hosted MCP server backed by the MCP gateway.

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
  • googleServiceAccount
  • awsSigv4
  • basicAuth
updateMask
string | null

Response

200 - application/json

Successful response

The MCPServerServiceTestConnectionResponse message.

credentialVerified
boolean

True when the upstream accepted the supplied credentials. For hosted configurations that means the catalog entry's auth_validation_url answered an authenticated tools/list. Always false when the configuration carries no credential.

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 a connection test completes successfully: the upstream was contacted with the supplied credentials. For hosted configurations that is an authenticated MCP tools/list against the catalog entry's auth_validation_url.

toolCount
string<int64>

Number of tools exposed by the connection test. For external configurations, this is the upstream tools/list result. For hosted configurations, this is the catalog tool surface. Zero when reachable=false. int64 to match MCPServerSearchWithToolCountResult.tool_count.