> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hasmcp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How can I delete an MCP server via the API?

> Detailed guide explaining how to permanently delete an MCP server using the HasMCP manager REST API.

# Deleting an MCP Server

## Using HasMCP UI

<img src="https://mintcdn.com/hasmcp/d2X-lsG7b5q-dkAh/images/kb/server-delete-confirm.png?fit=max&auto=format&n=d2X-lsG7b5q-dkAh&q=85&s=97e44ace85d258e7d995dc0a17f3261b" alt="Delete MCP Server Confirmation Modal" width="2560" height="1440" data-path="images/kb/server-delete-confirm.png" />

To delete an MCP server through the dashboard:

1. Open the specific server's detail view from the **Servers** page.
2. Click the red **Delete** button in the top right.
3. Review the confirmation modal to understand the consequences.
4. Confirm the deletion. This action is irreversible.

## Using REST API

When an MCP server is no longer needed, you can cleanly tear it down via the API. Doing this will remove the server's configuration and disassociate it from any existing providers or prompts.

### The Deletion Route

**`DELETE /servers/{id}`**

### How to Delete a Server

1. Identify the 11-character `id` of the server you wish to remove.
2. Make an authenticated `DELETE` request targeting that specific server.

#### Example Request

```bash theme={null}
curl -X DELETE https://app.hasmcp.com/api/v1/servers/kSuB9Gf6aD4 \
 -H "Authorization: Bearer YOUR_TOKEN"
```

If the deletion goes through successfully, the system returns a `204 No Content` response, indicating that the server no longer exists.
