Update MCP Server
PUThttps://api.confident-ai.com/v1/mcp-servers/{mcpServerId}
Updates an MCP server. Only the fields you send change, and the merged result must be valid — switching transport needs that transport's required field in the same call.
curl -X PUT "https://api.confident-ai.com/v1/mcp-servers/{mcpServerId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub (production)"
}'{
"success": true,
"data": {
"mcpServer": {
"id": "MCP-SERVER-ID",
"name": "GitHub (production)",
"description": "Repository and issue tools",
"transport": "HTTP",
"connected": false,
"url": "https://mcp.example.com/sse",
"headers": {
"Authorization": "Bearer YOUR-TOKEN"
},
"authType": "HEADERS",
"authConfig": null,
"command": null,
"args": []
}
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
mcpServerIdstringRequiredThe id of the MCP server.
Request body
namestringThe name of the MCP server. Must be unique — names are not reused.
transportenumHow Confident AI reaches the server. Switching transport clears the fields the other one owns, so send the new transport's required field in the same call.
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 updated MCP server.
successbooleanIndicates if the request was successful.
dataobjectThe MCP server, with the stored OAuth client secret masked.
Show 1 propertyHide 1 property
mcpServerobjectShow 12 propertiesHide 12 properties
idstringThe unique identifier of the MCP server. Use this value when running a dataset evaluation.
namestringThe name of the MCP server.
descriptionstringThe description of the MCP server.
transportenumHow Confident AI reaches the server.
Show 2 enum valuesHide 2 enum values
HTTPSTDIO
connectedbooleanWhether the last connection attempt succeeded. Set by the connect route, and reset to
falseby any update.urlstringThe URL of the server. Only set when the transport is
HTTP.headersobjectThe static headers sent with every request, returned as stored.
authTypeenumHow Confident AI authenticates to the server.
Show 3 enum valuesHide 3 enum values
HEADERSOAUTH_CLIENT_CREDENTIALSAZURE_AD
authConfigobjectThe stored credentials with the secret removed —
clientSecretis replaced by a maskedclientSecretPreview, which cannot be sent back.commandstringThe command that launches the server. Only set when the transport is
STDIO.argslist of stringsThe arguments passed to
command. Only set when the transport isSTDIO.availableToolslist of objectsThe tools discovered by the last successful connection. Not cleared by an update, so treat it as stale whenever
connectedisfalse.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.
deprecatedbooleanIndicates if this endpoint is deprecated.