delete_mcp_server
Permanently delete an MCP server instance, instantly revoking all connected users' access. Use only after verifying no workflows depend on this server.
Instructions
Delete an MCP server instance. This is irreversible, removes connected users' access immediately, and should be used only after confirming no workflows depend on the server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The MCP server ID or slug to delete |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |
Implementation Reference
- src/tools/mcp-servers.tools.ts:242-264 (registration)Registration of the 'delete_mcp_server' tool. It registers the tool name, description, uses the deleteMcpServer schema for validation, and calls service.mcpServers.deleteMcpServer(params.id) as the handler logic.
server.tool( "delete_mcp_server", "Delete an MCP server instance. This is irreversible, removes connected users' access immediately, and should be used only after confirming no workflows depend on the server.", MCP_SERVERS_TOOL_SCHEMAS.deleteMcpServer, async (params) => { await service.mcpServers.deleteMcpServer(params.id); return { content: [ { type: "text", text: JSON.stringify( { message: `Successfully deleted MCP server "${params.id}"`, success: true, }, null, 2, ), }, ], }; }, ); - src/tools/mcp-servers.tools.ts:48-50 (schema)Zod schema definition for deleteMcpServer input: requires a string 'id' parameter described as 'The MCP server ID or slug to delete'.
deleteMcpServer: { id: z.string().describe("The MCP server ID or slug to delete"), }, - Service-level handler that executes the actual HTTP DELETE request to '/mcp-servers/{id}' via the base service's delete method, returning { success: true }.
async deleteMcpServer(id: string): Promise<{ success: boolean }> { await this.delete(`/mcp-servers/${this.encodePathSegment(id)}`); return { success: true }; } - src/services/base.service.ts:159-161 (helper)Base service's delete method used by deleteMcpServer. Calls executeRequest with 'DELETE' method, allowing 204 No Content responses.
protected async delete<T>(path: string): Promise<T> { return this.executeRequest<T>("DELETE", path, { allowNoContent: true }); }