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

# Unpublish an MCP server from the portal



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /mcp-servers/{id}/deactivate
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /mcp-servers/{id}/deactivate:
    post:
      tags:
        - TykMCP
      summary: Unpublish an MCP server from the portal
      parameters:
        - name: id
          in: path
          description: Server ID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/models.MCPServerResponse'
components:
  schemas:
    models.MCPServerResponse:
      type: object
      properties:
        allow_internal_host:
          type: boolean
          description: |-
            AllowInternalHost is the server's admin-only "Allow internal host"
            switch (w4e); this is the administrator API shape.
        auth_details:
          $ref: '#/components/schemas/models.MCPAuthDetails'
        auth_mode:
          type: string
        brokerable:
          type: boolean
        bundle:
          type: array
          items:
            $ref: '#/components/schemas/models.MCPServerPolicyPinView'
        community_submitted:
          type: boolean
        connection_id:
          type: integer
        connection_name:
          type: string
        created_at:
          type: string
        dashboard_state:
          type: string
        definition:
          type: string
          description: Detail-only fields.
        definition_hash:
          type: string
        description:
          type: string
        endpoint_url:
          type: string
        endpoint_urls:
          type: object
          additionalProperties:
            type: string
        gateway_coverage:
          type: string
        gateway_partial:
          type: boolean
        gateway_tags:
          $ref: '#/components/schemas/models.MCPGatewayTags'
        id:
          type: integer
        is_active:
          type: boolean
        key_access:
          $ref: '#/components/schemas/models.MCPKeyAccess'
        kind:
          type: string
        last_seen_at:
          type: string
        last_synced_at:
          type: string
        listen_path:
          type: string
        lock_version:
          type: integer
        logo_url:
          type: string
        long_description:
          type: string
        name:
          type: string
        name_overridden:
          type: boolean
        origin:
          type: string
        owner_user_id:
          type: integer
        primitives:
          type: array
          items:
            $ref: '#/components/schemas/models.MCPPrimitive'
        privacy_score:
          type: integer
        slug:
          type: string
        source_api_id:
          type: string
        submission_id:
          type: integer
        tags:
          type: array
          items:
            type: string
        tool_catalogue_ids:
          type: array
          items:
            type: integer
        tool_catalogues:
          type: array
          items:
            $ref: '#/components/schemas/models.MCPServerCatalogueView'
        transport_path:
          type: string
        tyk_api_id:
          type: string
        updated_at:
          type: string
        upstream_url:
          type: string
        workspace_id:
          type: integer
          description: |-
            WorkspaceID is the Workspace that owns the server (Enterprise
            Workspaces); a stored 0 reads as the Default.
    models.MCPAuthDetails:
      type: object
      properties:
        cookie_name:
          type: string
        header_name:
          type: string
          description: >-
            Header, Query or Cookie name the token scheme reads (auth_token,
            basic, jwt).
        prm:
          type: object
          description: PRM is the OAuth 2.1 protected resource metadata when advertised.
          allOf:
            - $ref: '#/components/schemas/models.MCPProtectedResourceMetadata'
        query_name:
          type: string
        schemes:
          type: array
          description: Schemes lists every enabled scheme name with its resolved type.
          items:
            $ref: '#/components/schemas/models.MCPAuthScheme'
    models.MCPServerPolicyPinView:
      type: object
      properties:
        id:
          type: integer
        invalid_reason:
          type: string
        policy:
          $ref: '#/components/schemas/models.TykPolicyResponse'
        position:
          type: integer
        role:
          type: string
    models.MCPGatewayTags:
      type: object
      properties:
        enabled:
          type: boolean
        tags:
          type: array
          items:
            type: string
    models.MCPKeyAccess:
      type: object
      properties:
        allowed_tools:
          type: array
          description: |-
            AllowedTools narrows the tools a key may list and call; empty means
            every tool the proxy exposes.
          items:
            type: string
        per:
          type: number
        quota_max:
          type: integer
          description: QuotaMax requests per QuotaRenewalRate seconds; 0 means no quota.
        quota_renewal_rate:
          type: integer
        rate:
          type: number
          description: Rate requests per Per seconds; 0 means no rate limit.
    models.MCPPrimitive:
      type: object
      properties:
        annotations:
          type: object
          additionalProperties: true
        auth:
          type: object
          description: Auth records per-primitive overrides from the definition.
          allOf:
            - $ref: '#/components/schemas/models.MCPPrimitiveAuth'
        description:
          type: string
        name:
          type: string
        source:
          type: string
          description: Source names the REST operation behind a REST-to-MCP tool.
        type:
          type: string
          description: tool | resource | prompt
    models.MCPServerCatalogueView:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    models.MCPProtectedResourceMetadata:
      type: object
      properties:
        authorization_servers:
          type: array
          items:
            type: string
        auto_derive_scopes:
          type: boolean
        resource:
          type: string
        scopes_supported:
          type: array
          items:
            type: string
        url:
          type: string
          description: URL is the absolute metadata URL when the endpoint URL is known.
        well_known_path:
          type: string
    models.MCPAuthScheme:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          description: an MCPAuth* value
    models.TykPolicyResponse:
      type: object
      properties:
        active:
          type: boolean
        api_ids:
          type: array
          items:
            type: string
        connection_id:
          type: integer
        dashboard_state:
          type: string
        id:
          type: integer
        is_inactive:
          type: boolean
        is_partitioned:
          type: boolean
        key_expires_in:
          type: integer
        last_seen_at:
          type: string
        mcp_api_ids:
          type: array
          items:
            type: string
        name:
          type: string
        partitions:
          $ref: '#/components/schemas/models.TykPolicyPartitions'
        raw:
          type: object
          properties: {}
        studio_managed:
          type: boolean
        tags:
          type: array
          items:
            type: string
        tyk_policy_id:
          type: string
    models.MCPPrimitiveAuth:
      type: object
      properties:
        ignore_authentication:
          type: boolean
        scopes:
          type: array
          items:
            type: string
    models.TykPolicyPartitions:
      type: object
      properties:
        acl:
          type: boolean
        complexity:
          type: boolean
        per_api:
          type: boolean
        quota:
          type: boolean
        rate_limit:
          type: boolean

````