Connect Server
POSThttps://api.confident-ai.com/v2/mcp-servers/{mcpServerId}/connect
Connects to the MCP server, lists the tools it exposes, and replaces its stored connected and availableTools with the result. This reaches out to your own server and can take a few seconds. A server that fails to connect is not an error: the response is still 200 with connected false and error set to what went wrong, so read connected for the verdict.
curl -X POST "https://api.confident-ai.com/v2/mcp-servers/{mcpServerId}/connect" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"connected": true,
"availableTools": [
{
"name": "search_issues",
"description": "Search issues in a repository",
"inputSchema": {
"type": "object"
},
"annotations": {
"readOnlyHint": true
}
}
],
"error": "MCP connection timed out"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
mcpServerIdstringRequiredThe id of the MCP server.
Response
Connect Server succeeded.
successbooleanIndicates if the request was successful.
dataobjectThe outcome of a connection attempt, which also becomes the server's stored
connectedandavailableTools.Show 3 propertiesHide 3 properties
connectedbooleanWhether Confident AI completed a handshake with the server. A failed attempt is reported here rather than as an error status, so read this field for the verdict.
availableToolslist of objectsThe tools the server exposes. Empty when the attempt failed.
Show 4 propertiesHide 4 properties
namestringThe name of the tool, as the server reports it.
descriptionstring | nullWhat the tool does, or null when the server describes it.
inputSchemaobjectThe JSON Schema describing the tool's arguments.
annotationsobject | null
errorstring | null
deprecatedbooleanIndicates if this endpoint is deprecated.