Detect MCP connection¶
Probes MCP services and returns discoverable tools. Probing does not save connections.
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¶
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 |
|---|---|---|---|
|
string |
No |
MCP service address to probe. Required if connection_id is not provided. |
|
string |
No |
Saved connection ID. Required if endpoint_uri is not provided. |
|
string |
No |
Authentication type. |
|
string |
No |
The request header name used by API Key. |
|
object |
No |
Credentials used when probing, which can include bearer_token, api_key, basic_username, basic_password, or custom_headers. |
|
string |
No |
MCP transmission mode: |
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¶
{
"code": 0,
"data": {
"tool_count": 0,
"tools": []
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
integer |
Number of tools discovered. |
|
array of object |
Tools returned by the MCP service. |
|
string |
Name. |
|
string |
Show title. Can be omitted if not set. |
|
string |
Description. Can be omitted if not set. |
|
object |
Input JSON Schema to the upstream tool. |
|
object |
Output JSON Schema from the upstream tool. Can be omitted if not set. |
|
object |
Extended annotations. Can be omitted if not set. |
|
array of object |
Upstream tool icon information. Can be omitted if not set. |
|
object |
Upstream tool extension information. Can be omitted if not set. |
|
string |
MCP protocol version. Does not return if not provided. Can be omitted if not set. |
Error response¶
{
"code": 2,
"message": "invalid request body"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |
|
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. |