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

# Update an Agent MCP installation

> Optimistic concurrency uses expectedRevision. manage_agents alone may disable; additions and reconfiguration also require manage_mcp.



## OpenAPI

````yaml /openapi/control-plane-public.json patch /api/v1/workspaces/{workspaceId}/agents/{agentId}/mcp/servers/{serverId}
openapi: 3.1.0
info:
  title: AcornOps Control Plane API
  version: 0.0.1-experimental.1
  description: >-
    Control plane API for workspaces, targets, Kubernetes clusters, virtual
    machines, sessions, runs, auth, and internal execution wiring.
servers:
  - url: https://api.acornops.dev
security: []
tags:
  - name: health
    description: Health and readiness endpoints.
  - name: auth
    description: >-
      OIDC, password, browser session, and external integration account link
      endpoints.
  - name: workspaces
    description: Workspace, target, Kubernetes cluster, and VM management endpoints.
  - name: webhooks
    description: Best-effort webhook subscription and delivery history endpoints.
  - name: sessions
    description: Session and message endpoints.
  - name: runs
    description: Run query, cancel, and stream endpoints.
  - name: workflows
    description: >-
      Workspace workflow definitions, schedules, sessions, and approval inbox
      endpoints.
  - name: catalog
    description: >-
      MCP registries, destination-bound browsing, scoped MCP imports, and
      credential connections.
  - name: agents
    description: >-
      Workspace-scoped custom agent definitions, triggers, versions, tests, and
      activity.
  - name: admin
    description: Operator-only admin API protected exclusively by admin bearer tokens.
  - name: internal
    description: Internal execution endpoints for execution-engine.
paths:
  /api/v1/workspaces/{workspaceId}/agents/{agentId}/mcp/servers/{serverId}:
    patch:
      tags:
        - agents
      summary: Update an Agent MCP installation
      description: >-
        Optimistic concurrency uses expectedRevision. manage_agents alone may
        disable; additions and reconfiguration also require manage_mcp.
      parameters:
        - $ref: '#/components/parameters/PathWorkspaceId'
        - $ref: '#/components/parameters/PathAgentId2'
        - $ref: '#/components/parameters/PathServerId2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              minProperties: 1
              properties:
                name:
                  type: string
                  minLength: 1
                enabled:
                  type: boolean
                expectedRevision:
                  type: integer
                  minimum: 1
                authType:
                  type: string
                  enum:
                    - none
                    - bearer_token
                    - custom_header
                credentialMode:
                  type: string
                  enum:
                    - none
                    - workspace
                    - individual
                authHeaderName:
                  type: string
                  minLength: 1
                authHeaderPrefix:
                  type: string
                targetConstraints:
                  type: object
                  properties:
                    targetTypes:
                      type: array
                      maxItems: 16
                      items:
                        type: string
                        enum:
                          - kubernetes
                          - virtual_machine
                    targetIds:
                      type: array
                      maxItems: 200
                      items:
                        type: string
                        minLength: 1
                  additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          description: Agent MCP installation updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentMcpServerResponse'
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          description: Revision conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
      security:
        - userSession: []
components:
  parameters:
    PathWorkspaceId:
      in: path
      name: workspaceId
      required: true
      schema:
        type: string
        format: uuid
        example: 4b930d98-add9-4924-ab26-3c16d96ec373
    PathAgentId2:
      in: path
      name: agentId
      required: true
      schema:
        type: string
    PathServerId2:
      in: path
      name: serverId
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    AgentMcpServerResponse:
      type: object
      required:
        - server
      properties:
        server:
          $ref: '#/components/schemas/AgentMcpServer'
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
              description: Optional structured error details.
    AgentMcpServer:
      type: object
      required:
        - id
        - name
        - url
        - type
        - enabled
        - isSystem
        - canDelete
        - canEditConnection
        - canToggle
        - authType
        - credentialMode
        - revision
        - targetConstraints
        - publicHeaders
        - connectionStatus
        - tools
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        url:
          type: string
          format: uri
        type:
          type: string
          enum:
            - mcp
        enabled:
          type: boolean
        isSystem:
          type: boolean
        canDelete:
          type: boolean
        canEditConnection:
          type: boolean
        canToggle:
          type: boolean
        authType:
          type: string
          enum:
            - none
            - bearer_token
            - custom_header
        credentialMode:
          type: string
          enum:
            - none
            - workspace
            - individual
        authHeaderName:
          type: string
        authHeaderPrefix:
          type: string
        agentId:
          type: string
          format: uuid
        revision:
          type: integer
        targetConstraints:
          type: object
          additionalProperties: true
        provenance:
          type: object
          additionalProperties: true
        endpointConfiguration:
          type: object
          additionalProperties: true
        integrationProfileId:
          type: string
        integrationProfileVersion:
          type: integer
          minimum: 1
        publicHeaders:
          type: object
          additionalProperties:
            type: string
        connectionStatus:
          type: string
          enum:
            - unknown
            - ok
            - error
        lastDiscoveryAt:
          type: string
          format: date-time
        lastDiscoveryError:
          type: string
          nullable: true
        tools:
          type: array
          items:
            $ref: '#/components/schemas/AgentMcpTool'
      additionalProperties: false
    AgentMcpTool:
      type: object
      required:
        - name
        - serverId
        - alias
        - capability
        - enabled
        - reviewState
        - riskLevel
        - autoAllowed
      properties:
        name:
          type: string
        serverId:
          type: string
          format: uuid
        alias:
          type: string
        description:
          type: string
        capability:
          type: string
          enum:
            - read
            - write
        enabled:
          type: boolean
        reviewState:
          type: string
          enum:
            - pending
            - approved
            - rejected
        riskLevel:
          type: string
          enum:
            - read_only
            - non_destructive_write
            - high_risk
            - destructive
        autoAllowed:
          type: boolean
      additionalProperties: false
  responses:
    Error400:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error401:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error403:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error404:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error429:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error500:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    userSession:
      type: apiKey
      in: cookie
      name: acornops_cp_session

````