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

# Disconnect from MCP Server

> Closes connection to an MCP server

## Request Body

<ParamField body="id" type="string" required>
  MCP server ID to disconnect
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the disconnection was successful
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.example.com/api/mcp/disconnect \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "id": "mcp_abc123"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.example.com/api/mcp/disconnect', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      id: 'mcp_abc123'
    })
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.example.com/api/mcp/disconnect',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={'id': 'mcp_abc123'}
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true
  }
  ```

  ```json Not Found theme={null}
  {
    "success": false,
    "message": "Server not found"
  }
  ```
</ResponseExample>
