DELETE
/
api
/
v1
/
mcp-servers
/
{server_id}
curl --request DELETE \
  --url https://api.kambrium.com/api/v1/mcp-servers/{server_id} \
  --header 'Authorization: Bearer <token>'
{
  "message": "Connection deleted successfully"
}

Overview

This endpoint permanently deletes an MCP server connection, removing all associated data and configurations. This action cannot be undone.

Prerequisites

  • Valid OAuth Token - Bearer token with mgmt.write scope
  • Existing Connection - Valid MCP server connection ID

Request

DELETE /api/v1/mcp-servers/{server_id}

Path Parameters

ParameterTypeRequiredDescription
server_idintegerYesThe MCP server connection ID

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token from OAuth authentication
Content-TypestringYesMust be application/json

Response

Success Response (200 OK)

{
  "success": true,
  "data": null,
  "message": "MCP server connection deleted successfully"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request was successful
datanullAlways null for delete operations
messagestringConfirmation message

Error Responses

Connection Not Found (404)

{
  "detail": "MCP server 123 not found or not accessible"
}

Unauthorized (401)

{
  "detail": "Authentication credentials were not provided."
}

Forbidden (403)

{
  "detail": "You do not have permission to delete this connection."
}

Internal Server Error (500)

{
  "detail": "Failed to delete MCP server: database error"
}

Examples

Delete Connection

curl -X DELETE "https://api.kambrium.com/api/v1/mcp-servers/123" \
  -H "Authorization: Bearer your_oauth_token" \
  -H "Content-Type: application/json"

Response

{
  "success": true,
  "data": null,
  "message": "MCP server connection deleted successfully"
}

Implementation Notes

Permanent Deletion

  • This action is irreversible - deleted connections cannot be recovered
  • All associated data is permanently removed from the database
  • OAuth credentials are revoked and cleaned up

Cascading Effects

  • All tool access records are removed
  • OAuth client credentials are deleted
  • Connection history is purged
  • Any active sessions using this connection are invalidated

Access Control

  • Users can only delete their own connections
  • Connection ownership is verified before deletion
  • Admin users may have broader deletion permissions

Verification

  • After deletion, attempts to access the connection will return 404
  • The connection ID becomes invalid and cannot be reused
  • All related resources are cleaned up

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

server_id
string
required
Example:

"srv_123abc"

Response

200 - application/json

MCP server connection deleted successfully

The response is of type object.