Connect MCP Server
POSThttps://api.confident-ai.com/v1/mcp-servers/{mcpServerId}/connect
Connects to the MCP server and lists the tools it exposes, replacing its stored connected and availableTools. This reaches out to your own server and can take a few seconds.
curl -X POST "https://api.confident-ai.com/v1/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"
}
}
],
"error": null
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
mcpServerIdstringRequiredThe id of the MCP server.
Response
The result of the connection attempt. A server that failed to connect also returns 200 — read connected for the verdict.
successbooleanIndicates if the request was successful.
dataobjectShow 3 propertiesHide 3 properties
connectedbooleanWhether Confident AI completed a handshake with the server.
availableToolslist of objectsThe tools the server exposes. Empty when the connection failed.
Show 3 propertiesHide 3 properties
namestringThe name of the tool, as the server reports it.
descriptionstringWhat the tool does.
inputSchemaobjectThe JSON Schema describing the tool's arguments.
errorstringWhy the connection failed. Null when connected.
deprecatedbooleanIndicates if this endpoint is deprecated.