> ## 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.

# Create a target MCP server and discover its tools



## OpenAPI

````yaml /openapi/control-plane-public.json post /api/v1/workspaces/{workspaceId}/targets/{targetId}/mcp/servers
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: 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}/targets/{targetId}/mcp/servers:
    post:
      tags:
        - workspaces
      summary: Create a target MCP server and discover its tools
      parameters:
        - in: path
          name: workspaceId
          required: true
          schema:
            type: string
            format: uuid
            example: 4b930d98-add9-4924-ab26-3c16d96ec373
        - in: path
          name: targetId
          required: true
          schema:
            type: string
            format: uuid
            example: 5b006e4c-509c-458a-9f02-5aafbdc01ade
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - url
              properties:
                name:
                  type: string
                  example: github
                url:
                  type: string
                  format: uri
                  example: https://mcp.example.com/
                enabled:
                  type: boolean
                  default: true
                publicHeaders:
                  type: object
                  additionalProperties:
                    type: string
                auth:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - none
                        - bearer_token
                        - custom_header
                      example: bearer_token
                    secretName:
                      type: string
                      example: mcp_server::github
                    secretValue:
                      type: string
                      example: ghp_example_token
                    headerName:
                      type: string
                      example: Authorization
                    headerPrefix:
                      type: string
                      example: 'Bearer '
              example:
                name: github
                url: https://mcp.example.com/
                enabled: true
                publicHeaders:
                  x-client-version: 2026-05
                auth:
                  type: bearer_token
                  secretName: mcp_server::github
                  headerName: Authorization
                  headerPrefix: 'Bearer '
      responses:
        '201':
          description: MCP server created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpServer'
        '400':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - userSession: []
components:
  schemas:
    McpServer:
      type: object
      required:
        - id
        - name
        - url
        - enabled
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        url:
          type: string
          format: uri
        type:
          type: string
        enabled:
          type: boolean
        isSystem:
          type: boolean
        canDelete:
          type: boolean
        canEditConnection:
          type: boolean
        canToggle:
          type: boolean
        authType:
          type: string
          enum:
            - none
            - bearer_token
            - custom_header
        publicHeaders:
          type: object
          additionalProperties:
            type: string
        connectionStatus:
          type: string
        lastDiscoveryAt:
          type: string
          format: date-time
        lastDiscoveryError:
          type: string
      additionalProperties: true
    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.
  securitySchemes:
    userSession:
      type: apiKey
      in: cookie
      name: acornops_cp_session

````