Management API
Delete MCP Server Instance
Delete an existing MCP server instance.
DELETE
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
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
server_id | integer | Yes | The MCP server connection ID |
Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | Yes | Bearer token from OAuth authentication |
Content-Type | string | Yes | Must be application/json |
Response
Success Response (200 OK)
Response Fields
Field | Type | Description |
---|---|---|
success | boolean | Whether the request was successful |
data | null | Always null for delete operations |
message | string | Confirmation message |
Error Responses
Connection Not Found (404)
Unauthorized (401)
Forbidden (403)
Internal Server Error (500)
Examples
Delete Connection
Response
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
Related Endpoints
- Get Connection Details - Get connection information before deletion
- Update Connection - Modify connection instead of deleting
- Create Connection - Create a new connection
- List User Connections - View remaining connections
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Example:
"srv_123abc"
Response
200 - application/json
MCP server connection deleted successfully
The response is of type object
.