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

# Toggle MCP server

> Enable or disable an MCP server



## OpenAPI

````yaml /api-reference/openapi.json patch /api/agents/mcp-configs/{name}/toggle
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/agents/mcp-configs/{name}/toggle:
    patch:
      tags:
        - Agents
      summary: Toggle MCP server
      description: Enable or disable an MCP server
      operationId: AgentsController_toggleMCPServer
      parameters:
        - name: name
          required: true
          in: path
          description: MCP server name
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          description: Workspace ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleMCPServerDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPServerResponseDto'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    ToggleMCPServerDto:
      type: object
      properties:
        disabled:
          type: boolean
          example: true
      required:
        - disabled
    MCPServerResponseDto:
      type: object
      properties:
        url:
          type: string
          example: http://localhost:3000/sse
        transport:
          type: string
          enum:
            - sse
            - streamable-http
          example: sse
          default: sse
        headers:
          type: object
          example:
            x-oasm-api-key: sk-...
        disabled:
          type: boolean
          example: false
          default: false
        allowed_tools:
          type: object
          example:
            - tool1
            - tool2
          nullable: true
        timeout:
          type: number
          example: 60
          default: 60
        sse_read_timeout:
          type: number
          example: 300
          default: 300
          description: SSE read timeout in seconds
        name:
          type: string
          example: my-mcp-server
      required:
        - name

````