Disconnect MCP server
Disconnect an MCP server at runtime, removing its tools until reconnected.
POST
/api/mcp/{server}/disconnectPath parameters
serverstringrequiredQuery parameters
locationobject | anyResponses
204<No Content>
400InvalidRequestError
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
any401UnauthorizedError
_tagstringrequiredAllowed:
UnauthorizedErrormessagestringrequired404McpServerNotFoundError
_tagstringrequiredAllowed:
McpServerNotFoundErrorserverstringrequiredmessagestringrequiredRequest
curl -X POST "/api/mcp/string/disconnect"const response = await fetch("/api/mcp/string/disconnect", {
method: "POST"
});import requests
response = requests.post(
"/api/mcp/string/disconnect",
)Response
<No Content>
{
"_tag": "InvalidRequestError",
"message": "string",
"kind": "string",
"field": "string"
}{
"_tag": "UnauthorizedError",
"message": "string"
}{
"_tag": "McpServerNotFoundError",
"server": "string",
"message": "string"
}