Create MCP Server
POSThttps://api.confident-ai.com/v1/mcp-servers
Registers one of your MCP servers with the project and returns its id. Registering does not connect — call the connect route to verify it and discover its tools.
curl -X POST "https://api.confident-ai.com/v1/mcp-servers" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub",
"transport": "HTTP",
"url": "https://mcp.example.com/sse",
"headers": {
"Authorization": "Bearer YOUR-TOKEN"
}
}'{
"success": true,
"data": {
"id": "MCP-SERVER-ID"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
namestringRequiredThe name of the MCP server. Must be unique — names are not reused.
transportenumRequiredHow Confident AI reaches the server.
HTTPrequiresurl,STDIOrequirescommand.Show 2 enum valuesHide 2 enum values
HTTPSTDIO
descriptionstringThe description of the MCP server.
urlstringThe URL of the server. Required when the transport is
HTTP, and cleared otherwise.headersobjectStatic headers sent with every request. Only used when
authTypeisHEADERS, and cleared otherwise. Replaces the whole map, so send every header you want to keep.authTypeenumHow Confident AI authenticates to the server.
HTTPtransport only, and defaults toHEADERS.Show 3 enum valuesHide 3 enum values
HEADERSOAUTH_CLIENT_CREDENTIALSAZURE_AD
authConfigobjectCredentials for a non-
HEADERSauth type. Unlikeheaders, these fields merge — send only the ones you are changing.Show 4 propertiesHide 4 properties
tenantIdstringThe Azure AD directory (tenant) id. Required when
authTypeisAZURE_AD.clientIdstringThe OAuth client id. Required when
authTypeisAZURE_ADorOAUTH_CLIENT_CREDENTIALS.clientSecretstringThe OAuth client secret. Write-only — omit it to keep the stored secret. Changing
authTypediscards the stored secret, so a new one must be sent.scopestringThe OAuth scope to request. Required when
authTypeisAZURE_AD.
commandstringThe command that launches the server. Required when the transport is
STDIO, and cleared otherwise.argslist of stringsThe arguments passed to
command.STDIOtransport only. Replaces the whole list.
Response
The id of the created MCP server.
successbooleanIndicates if the request was successful.
dataobjectThe id of the affected MCP server.
Show 1 propertyHide 1 property
idstringThe id of the affected MCP server.
deprecatedbooleanIndicates if this endpoint is deprecated.