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

# Delete server

> Permanently deletes a server and all associated data



## OpenAPI

````yaml delete /api/servers/{serverId}
openapi: 3.0.1
info:
  title: MCP Server API
  description: >
    The Alloy MCP Server API enables you to create and manage MCP (Model Context
    Protocol) servers that provide secure, controlled access to platform
    integrations for AI assistants.


    ## Key Features

    - Dynamic tool discovery and execution

    - Fine-grained access restrictions

    - JWT-based user isolation

    - Self-sufficient token URLs

    - Support for 21+ platform connectors
  version: '2.0'
  contact:
    name: Alloy Support
    email: support@runalloy.com
    url: https://runalloy.com
servers:
  - url: https://mcp.runalloy.com
    description: Production server
  - url: http://localhost:3000
    description: Local development server
security:
  - bearerAuth: []
tags:
  - name: Server Management
    description: Create and manage MCP servers
  - name: MCP Protocol
    description: Execute MCP protocol operations
  - name: Tools
    description: Discover and execute tools
  - name: Resources
    description: Access server resources
  - name: Prompts
    description: Access prompt templates
paths:
  /api/servers/{serverId}:
    delete:
      tags:
        - Server Management
      summary: Delete server
      description: Permanently deletes a server and all associated data
      operationId: delete-server
      parameters:
        - name: serverId
          in: path
          required: true
          description: Server ID
          schema:
            type: string
        - name: x-alloy-userid
          in: header
          description: User ID (optional with API key)
          schema:
            type: string
      responses:
        '200':
          description: Server deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Server deleted
                  serverId:
                    type: string
                    example: production-server-a1b2c3d4
        '401':
          description: Unauthorized
        '404':
          description: Server not found
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: Use either an Alloy API key or JWT token

````