Detect MCP connection

Probes MCP services and returns discoverable tools. Probing does not save connections.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/connections/actions/probe-mcp

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare a personal access token and target workspace ID that can access the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/connections/actions/probe-mcp" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "endpoint_uri": "https://mcp.example.com",
    "transport": "http-streaming"
  }'

Field

Type

Required

Description

endpoint_uri

string

No

MCP service address to probe. Required if connection_id is not provided.

connection_id

string

No

Saved connection ID. Required if endpoint_uri is not provided.

auth_type

string

No

Authentication type.

api_key_header

string

No

The request header name used by API Key.

credential

object

No

Credentials used when probing, which can include bearer_token, api_key, basic_username, basic_password, or custom_headers.

transport

string

No

MCP transmission mode: sse or http-streaming. If omitted, the existing connection configuration will be used first. Use http-streaming when there is no existing configuration.

When specifying a saved connection, the omitted transport method and authentication configuration will inherit the configuration of the connection. The default transport method for new connections is used only if there is no inheritable configuration.

When connection_id is specified, the service reads the corresponding MCP connection. When the address or transmission method is omitted, the existing configuration is used. When credentials are not explicitly submitted, the connection’s saved credentials are inherited. Private connections must belong to the current caller. Probing addresses from different sources using existing credentials will be rejected and new credentials will need to be explicitly provided.

Successful response

JSON
{
  "code": 0,
  "data": {
    "tool_count": 0,
    "tools": []
  }
}

Field

Type

Description

code

integer

0 when the request is processed successfully.

data

object

response data.

data.tool_count

integer

Number of tools discovered.

data.tools

array of object

Tools returned by the MCP service.

data.tools[].name

string

Name.

data.tools[].title

string

Show title. Can be omitted if not set.

data.tools[].description

string

Description. Can be omitted if not set.

data.tools[].inputSchema

object

Input JSON Schema to the upstream tool.

data.tools[].outputSchema

object

Output JSON Schema from the upstream tool. Can be omitted if not set.

data.tools[].annotations

object

Extended annotations. Can be omitted if not set.

data.tools[].icons

array of object

Upstream tool icon information. Can be omitted if not set.

data.tools[]._meta

object

Upstream tool extension information. Can be omitted if not set.

data.protocol_version

string

MCP protocol version. Does not return if not provided. Can be omitted if not set.

Error response

JSON
{
  "code": 2,
  "message": "invalid request body"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

details.reason

string

Error classification: INVALID_BODY, INVALID_ENDPOINT, HOST_NOT_ALLOWED, INVALID_TRANSPORT, AUTH_FAILED, TIMEOUT, INITIALIZE_FAILED, TLS_ERROR, PROTOCOL_ERROR, TOOLS_LIST_FAILED, or UPSTREAM_ERROR.

Last updated on