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

# Delete MCP Registry Server

> Soft delete an MCP registry server (sets is_deleted flag). Requires X-Enkrypt-MCP-Registry-Server header.



## OpenAPI

````yaml DELETE /mcp-registry/delete-server
openapi: 3.0.0
info:
  title: Enkrypt AI APIs
  version: 2.0.0
servers:
  - url: https://api.enkryptai.com
security:
  - apiKeyAuth: []
tags:
  - name: Guardrails
  - name: Code of Conduct
  - name: Endpoints
  - name: Datasets
  - name: Redteam
  - name: Deployments
  - name: AI Proxy
  - name: Leaderboard
  - name: Archived
  - name: MCP Hub
    description: >-
      MCP Hub vulnerability scanning APIs. Submitting scans (the POST endpoints)
      is open to all authenticated callers. The scan **retrieval** APIs — Get
      Scan Job Status, Get Complete Scan Results, List Scans, and Get MCP Hub
      Scan Statistics (the GET endpoints) — are an **enterprise data-license
      feature**: they require your organization to have MCP Hub API access
      enabled by Enkrypt, otherwise they return `403`. Contact us at
      support@enkryptai.com to enable access.
  - name: MCP Registry Servers
  - name: MCP Gateways
  - name: MCP Playground
paths:
  /mcp-registry/delete-server:
    delete:
      tags:
        - MCP Registry Servers
      summary: Delete MCP Registry Server
      description: >-
        Soft delete an MCP registry server (sets is_deleted flag). Requires
        X-Enkrypt-MCP-Registry-Server header.
      operationId: deleteRegistryServer
      parameters:
        - $ref: '#/components/parameters/MCPGatewayRegistryServerHeader'
        - $ref: '#/components/parameters/MCPGatewayRegistryServerVersionHeader'
      responses:
        '200':
          description: Registry server deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPGatewayRegistryServerResponse'
        '400':
          $ref: '#/components/responses/MCPGatewayBadRequest'
        '401':
          $ref: '#/components/responses/MCPGatewayUnauthorized'
        '403':
          $ref: '#/components/responses/MCPGatewayForbidden'
        '404':
          $ref: '#/components/responses/MCPGatewayNotFound'
        '500':
          $ref: '#/components/responses/MCPGatewayInternalError'
components:
  parameters:
    MCPGatewayRegistryServerHeader:
      name: X-Enkrypt-MCP-Registry-Server
      in: header
      required: true
      description: Registry server saved_name
      schema:
        type: string
        maxLength: 32
        example: my-filesystem-server
    MCPGatewayRegistryServerVersionHeader:
      name: X-Enkrypt-MCP-Registry-Server-Version
      in: header
      required: false
      description: Registry server version (defaults to "v1")
      schema:
        type: string
        default: v1
        example: v1
  schemas:
    MCPGatewayRegistryServerResponse:
      type: object
      properties:
        message:
          type: string
          description: Response message
        data:
          $ref: '#/components/schemas/MCPGatewayRegistryServer'
    MCPGatewayRegistryServer:
      type: object
      properties:
        saved_name:
          type: string
          description: User-given name for the server
        server_version:
          type: string
          description: Server version
        job_id:
          type: string
          format: uuid
          nullable: true
          description: MCP Hub server identifier (optional)
        source_url:
          type: string
          nullable: true
          description: Source URL
        source_version:
          type: string
          nullable: true
          description: Source version or commit hash
        server_name:
          type: string
          nullable: true
          description: Server package name
        description:
          type: string
          nullable: true
          description: Server description
        mcp_config:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayMCPConfig'
          nullable: true
        registry_id:
          type: string
          description: Hashed ID of the parent registry this server belongs to
        registry_name:
          type: string
          description: Name of the parent registry (defaults to "default")
        project_name:
          type: string
          description: Project name
        is_active:
          type: boolean
          description: Whether the server is enabled (distinct from is_deleted)
        is_sample:
          type: boolean
          description: Whether this is a sample server
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        created_by:
          type: string
          format: uuid
          nullable: true
          description: User ID who created this server
        updated_by:
          type: string
          format: uuid
          nullable: true
          description: User ID who last updated this server
    MCPGatewayErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
    MCPGatewayMCPConfig:
      type: object
      description: >-
        MCP server configuration template. Shape mirrors a single entry of
        secure-mcp-gateway's `mcp_configs.<id>.mcp_config[]` array, so the
        registry server's mcp_config is directly consumable by the gateway
        runtime.
      properties:
        config:
          type: object
          description: Server execution configuration
          properties:
            command:
              type: string
              description: Command to execute the MCP server
              example: npx
            args:
              type: array
              items:
                type: string
              description: Command-line arguments
              example:
                - '-y'
                - '@modelcontextprotocol/server-filesystem'
                - /tmp
            env:
              type: object
              additionalProperties:
                type: string
              description: >-
                Environment variables passed to the MCP server process at spawn
                time. Use this for credentials the server needs (e.g.
                `OPENAI_API_KEY`, `GITHUB_TOKEN`). Values are strings only. When
                omitted, the server inherits the gateway's environment subject
                to the sandbox `allowed_env` allowlist.
              example:
                OPENAI_API_KEY: sk-...
                LOG_LEVEL: info
        oauth_config:
          $ref: '#/components/schemas/MCPGatewayOAuthConfig'
        tools:
          type: object
          additionalProperties: true
          description: >-
            Tool restrictions and per-tool overrides. Empty object means no
            per-tool customisation.
        denied_tools:
          type: array
          description: >-
            Tools to deny. Each entry is either a tool-name string supporting
            fnmatch globs (e.g. `"delete_*"`, `"*"`) or an object with `name`,
            `reason`, and optional `description` fields. The wildcard `"*"`
            denies everything **not** explicitly listed in `tools` (deny-all
            with allow-list exemption). Denied tools are filtered out before
            being exposed to LLMs and rejected at execution time.
          items:
            $ref: '#/components/schemas/MCPGatewayDenyToolEntry'
          example:
            - delete_*
            - name: write_file
              reason: destructive
        input_guardrails_config:
          $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
        output_guardrails_config:
          $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
    MCPGatewayOAuthConfig:
      type: object
      description: >-
        OAuth 2.0/2.1 configuration for MCP server with support for PKCE, mTLS,
        and advanced security features
      properties:
        enabled:
          type: boolean
          description: Enable OAuth authentication
        is_remote:
          type: boolean
          description: Whether OAuth service is remote
        OAUTH_VERSION:
          type: string
          description: OAuth version (2.0 or 2.1)
          example: '2.1'
        OAUTH_GRANT_TYPE:
          type: string
          description: OAuth grant type
          example: authorization_code
        OAUTH_CLIENT_ID:
          type: string
          description: OAuth client identifier
        OAUTH_CLIENT_SECRET:
          type: string
          description: OAuth client secret
        OAUTH_TOKEN_URL:
          type: string
          format: uri
          description: OAuth token endpoint URL
        OAUTH_AUTHORIZATION_URL:
          type: string
          format: uri
          description: OAuth authorization endpoint URL
        OAUTH_REDIRECT_URI:
          type: string
          format: uri
          description: OAuth redirect URI for callbacks
        OAUTH_AUDIENCE:
          type: string
          description: OAuth audience parameter
        OAUTH_ORGANIZATION:
          type: string
          description: OAuth organization identifier
        OAUTH_SCOPE:
          type: string
          description: Space-separated OAuth scopes
          example: read write
        OAUTH_RESOURCE:
          type: string
          format: uri
          description: OAuth resource parameter
        OAUTH_USE_PKCE:
          type: boolean
          description: Enable Proof Key for Code Exchange (PKCE)
        OAUTH_CODE_CHALLENGE_METHOD:
          type: string
          description: PKCE code challenge method
          example: S256
        OAUTH_TOKEN_EXPIRY_BUFFER:
          type: integer
          description: Token expiry buffer in seconds
          example: 300
        OAUTH_USE_BASIC_AUTH:
          type: boolean
          description: Use HTTP Basic Auth for token requests
        OAUTH_ENFORCE_HTTPS:
          type: boolean
          description: Enforce HTTPS for OAuth endpoints
        OAUTH_TOKEN_IN_HEADER_ONLY:
          type: boolean
          description: Only send tokens in Authorization header
        OAUTH_VALIDATE_SCOPES:
          type: boolean
          description: Validate OAuth scopes
        OAUTH_USE_MTLS:
          type: boolean
          description: Enable mutual TLS (mTLS)
        OAUTH_CLIENT_CERT_PATH:
          type: string
          nullable: true
          description: Path to client certificate for mTLS
        OAUTH_CLIENT_KEY_PATH:
          type: string
          nullable: true
          description: Path to client private key for mTLS
        OAUTH_CA_BUNDLE_PATH:
          type: string
          nullable: true
          description: Path to CA certificate bundle
        OAUTH_REVOCATION_URL:
          type: string
          format: uri
          nullable: true
          description: OAuth token revocation endpoint
        OAUTH_ADDITIONAL_PARAMS:
          type: object
          additionalProperties: true
          description: Additional OAuth parameters
        OAUTH_CUSTOM_HEADERS:
          type: object
          additionalProperties: true
          description: Custom headers for OAuth requests
    MCPGatewayDenyToolEntry:
      description: >-
        A deny-list entry. Either a bare tool-name string (supports fnmatch
        globs like `"tool_a_*"` or `"*"`), or an object with at least a `name`
        field plus optional `reason` and `description`. The wildcard `"*"`
        denies all tools **not** explicitly listed in the `tools` allow-list.
      oneOf:
        - type: string
          description: Tool name or fnmatch glob pattern
          example: delete_*
        - type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Tool name or fnmatch glob pattern
              example: delete_file
            reason:
              type: string
              description: Human-readable reason surfaced to LLMs, callers, and audit logs
              example: destructive operation, denied by policy
            description:
              type: string
              description: Optional longer description for documentation purposes
    MCPGatewayGuardrailsPolicy:
      type: object
      description: Guardrails configuration
      properties:
        enabled:
          type: boolean
          description: Enable guardrails enforcement
        guardrail_name:
          type: string
          description: Guardrail identifier
        additional_config:
          type: object
          additionalProperties: true
          description: Detector-specific settings
        block:
          type: array
          items:
            type: string
            enum:
              - policy_violation
              - injection_attack
              - topic_detector
              - nsfw
              - toxicity
              - pii
              - keyword_detector
              - bias
              - sponge_attack
              - adherence
              - relevancy
              - hallucination
          description: >-
            Violation types triggering rejection. Note - adherence, relevancy,
            and hallucination are typically used for output guardrails only.
  responses:
    MCPGatewayBadRequest:
      description: Bad request - invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayUnauthorized:
      description: Unauthorized - invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayForbidden:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayNotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayInternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````