---
title: dots.v2.actionGateway.mcpServers.byServer_ref().delete()
description: Delete an MCP Server
product: Reference
url: https://docs.digitalocean.com/reference/dots/reference/action-gateway/mcpservers-delete/
last_updated: "2026-11-24"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# dots.v2.actionGateway.mcpServers.byServer_ref().delete()

Generated on 24 Nov 2026 from DoTs version [`v1.26.0`](https://github.com/digitalocean/dots/releases/tag/v1.26.0)

## Usage

```typescript
client.v2.actionGateway.mcpServers.byServer_ref(server_ref).delete(requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Mcp_server_response>
```

## Description

Disables all of the server’s tools, removes them from your team’s catalog, and deletes the server. An `api_key` supplied at registration is deleted; a `credentialRef` you supplied is left untouched. For a server registered with `credentialRefSource` connection, every user connection made through its OAuth client is revoked. Returns the deleted server, or 404 when it does not exist.

## Parameters

`server_ref` string required

Example: `docs`

Server identifier (`serverRef`) of one of your team's MCP servers.

## Request Sample

## Show Request Sample

```typescript
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.actionGateway.mcpServers
    .byServer_ref("docs").delete();
```

## Response Example

## Show Response Example

```json
{
  "mcpServer": {
    "serverRef": "docs",
    "endpoint": "https://mcp.example.com/mcp",
    "transport": "streamable_http",
    "credentialRefSource": "secret",
    "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c",
    "syncStatus": "ok",
    "syncError": "",
    "lastSyncedAt": "2026-09-20T15:04:05Z",
    "protocolVersion": "2025-06-18",
    "toolCount": 2,
    "createdAt": "2026-09-20T15:00:00Z",
    "updatedAt": "2026-09-20T15:04:05Z",
    "description": "Internal documentation search.",
    "oauth_authorize_url": "",
    "oauth_scopes": [],
    "oauth_authorization_ttl_seconds": "0"
  }
}
```

## More Information

See [`/v2/action-gateway/mcp-servers/{server_ref}`](https://docs.digitalocean.com/reference/api/reference/action-gateway/index.html.md#mcpServers_delete) in the API reference for additional detail on responses, headers, parameters, and more.