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

# Create MCP Box

> Creates an MCP Box that serves an MCP Box Snapshot's tools over MCP in front of an API Box, and starts it. The API Box must be in the workspace and started from the API Box Snapshot the MCP Box Snapshot was built against. It returns at once with status starting and the MCP Box's token; get the MCP Box until it is running. Send MCP requests to its endpoint followed by /mcp, with the token in X-Continuous-MCPBox-Token. The MCP Box keeps no state: its tools read and change the API Box, and a tool call while the API Box is stopped returns the API Box's refusal as a tool error.



## OpenAPI

````yaml /openapi/simulation.yaml post /v1/mcpbox
openapi: 3.1.0
info:
  description: >-
    Start API Boxes, Web Boxes, MCP Boxes and Cloud Boxes from Snapshots.
    Authenticate every request with an API key sent as a Bearer token.
  title: Continuous API
  version: v1
servers:
  - description: Continuous production API.
    url: https://api.continuouslabs.ai
security: []
tags:
  - description: >-
      Start API Boxes from API Box Snapshots. Each API Box serves its Snapshot's
      API at its own endpoint, with its own state, in real time. Stop, start and
      delete them.
    name: apibox
    x-group: API Boxes
  - description: >-
      Build API Box Snapshots from an OpenAPI, WSDL or GraphQL document, or use
      the catalog's. API Boxes start from a ready Snapshot.
    name: apibox-snapshots
    x-group: API Box Snapshots
  - description: >-
      Start Web Boxes from Web Box Snapshots. Each Web Box serves its Snapshot's
      web app at a host of its own, with its own state, in real time. Stop,
      start and delete them.
    name: webbox
    x-group: Web Boxes
  - description: >-
      Build Web Box Snapshots from a vendor's live web app, or use the
      catalog's. Web Boxes start from a ready Snapshot.
    name: webbox-snapshots
    x-group: Web Box Snapshots
  - description: >-
      Start MCP Boxes from MCP Box Snapshots. Each MCP Box serves its Snapshot's
      tools over MCP in front of an API Box. Stop, start and delete them.
    name: mcpbox
    x-group: MCP Boxes
  - description: >-
      List, rename and delete the MCP Box Snapshots that Continuous publishes
      into your workspace. Each holds an MCP server's tools, built against an
      API Box Snapshot.
    name: mcpbox-snapshots
    x-group: MCP Box Snapshots
  - description: >-
      Create emulated cloud accounts from Cloud Box Snapshots, start and stop
      them, and manage their Keys and connections.
    name: cloudbox
    x-group: Cloud Boxes
  - description: >-
      Save a Cloud Box's state as a Snapshot that new Cloud Boxes start from,
      and inspect, rename or delete Snapshots.
    name: cloudbox-snapshots
    x-group: Cloud Box Snapshots
  - description: >-
      Deprecated. Use API Box for APIs and Web Box for web apps. Build
      Simulators from OpenAPI, WSDL or GraphQL documents, check or cancel a
      build, clone Simulators into other workspaces, and rename and delete
      Simulators.
    name: simulators
    x-group: Simulators
  - description: >-
      Deprecated. Use API Box for APIs and Web Box for web apps. Create
      Simulations from ready Simulators or Snapshots, then rename, stop, start,
      and delete them.
    name: simulations
    x-group: Simulations
  - description: >-
      Deprecated. Use API Box for APIs and Web Box for web apps. Save a running
      Simulation's state as a Snapshot, create Simulations from it, and rename
      and delete it.
    name: simulation-snapshots
    x-group: Simulation Snapshots
  - description: >-
      Store connections to real systems: a base URL, the header that carries the
      credential, and its value. The API never returns a value.
    name: credentials
    x-group: Credentials
paths:
  /v1/mcpbox:
    post:
      tags:
        - mcpbox
      summary: Create MCP Box
      description: >-
        Creates an MCP Box that serves an MCP Box Snapshot's tools over MCP in
        front of an API Box, and starts it. The API Box must be in the workspace
        and started from the API Box Snapshot the MCP Box Snapshot was built
        against. It returns at once with status starting and the MCP Box's
        token; get the MCP Box until it is running. Send MCP requests to its
        endpoint followed by /mcp, with the token in X-Continuous-MCPBox-Token.
        The MCP Box keeps no state: its tools read and change the API Box, and a
        tool call while the API Box is stopped returns the API Box's refusal as
        a tool error.
      operationId: create-mcpbox
      parameters:
        - description: >-
            Optional key for retrying this create safely. A retry with the same
            key and request returns the same MCP Box and token. The same key
            with a different request returns 409 idempotency_conflict.
          in: header
          name: Idempotency-Key
          schema:
            maxLength: 256
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMCPBoxRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpboxTokenResponse'
          description: Accepted
        '400':
          content:
            application/problem+json:
              examples:
                bad_request_body:
                  $ref: '#/components/examples/bad_request_body'
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              examples:
                apibox_not_found:
                  $ref: '#/components/examples/apibox_not_found'
                mcpbox_snapshot_not_found:
                  $ref: '#/components/examples/mcpbox_snapshot_not_found'
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          content:
            application/problem+json:
              examples:
                mcpbox_snapshot_not_ready:
                  $ref: '#/components/examples/mcpbox_snapshot_not_ready'
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          content:
            application/problem+json:
              examples:
                mcpbox_apibox_mismatch:
                  $ref: '#/components/examples/mcpbox_apibox_mismatch'
              schema:
                $ref: '#/components/schemas/Error'
          description: Unprocessable Entity
        '429':
          content:
            application/problem+json:
              examples:
                box_quota_exceeded:
                  $ref: '#/components/examples/box_quota_exceeded'
              schema:
                $ref: '#/components/schemas/Error'
          description: Too Many Requests
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          content:
            application/problem+json:
              examples:
                auth_provider_unavailable:
                  $ref: '#/components/examples/auth_provider_unavailable'
                internal_unavailable:
                  $ref: '#/components/examples/internal_unavailable'
              schema:
                $ref: '#/components/schemas/Error'
          description: Service Unavailable
      security:
        - apiKeyAuth: []
components:
  schemas:
    CreateMCPBoxRequest:
      additionalProperties: false
      examples:
        - apibox_id: abx_01J8Z5X4K70000000000000001
          name: billing-tools
          snapshot_id: mbs_01J8Z5X4K70000000000000007
      properties:
        apibox_id:
          description: >-
            An API Box of the workspace, started from the API Box Snapshot the
            MCP Box Snapshot was built against.
          pattern: ^abx_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
        metadata:
          description: Customer JSON metadata, up to 16 KiB and 64 nesting levels.
        name:
          description: Name for the MCP Box. Omission generates a name.
          maxLength: 128
          type: string
        snapshot_id:
          description: An MCP Box Snapshot of the workspace.
          pattern: ^mbs_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
      required:
        - snapshot_id
        - apibox_id
      type: object
    McpboxTokenResponse:
      additionalProperties: false
      properties:
        mcpbox:
          $ref: '#/components/schemas/MCPBox'
          description: The MCP Box.
        token:
          description: >-
            The MCP Box's token, which lasts until the MCP Box is deleted. It is
            null only on a retried create whose first attempt stored no token; a
            start then issues one.
          type:
            - string
            - 'null'
      required:
        - mcpbox
        - token
      type: object
    Error:
      additionalProperties: false
      properties:
        code:
          description: Stable machine-readable error code.
          minLength: 1
          type: string
        detail:
          description: Safe human-readable error detail.
          minLength: 1
          type: string
        validation:
          $ref: '#/components/schemas/SpecificationValidation'
          description: >-
            Safe specification diagnostics for a rejected build request, when
            available.
      required:
        - validation
        - code
        - detail
      type: object
    MCPBox:
      additionalProperties: false
      properties:
        apibox_id:
          description: The API Box it fronts, whose state its tools read and change.
          pattern: ^abx_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
        created_at:
          description: MCP Box creation time.
          format: date-time
          type: string
        endpoint:
          description: >-
            Base URL of the MCP Box. Send MCP Streamable HTTP requests to it
            followed by /mcp, with the MCP Box's token in
            X-Continuous-MCPBox-Token.
          type: string
        error:
          $ref: '#/components/schemas/SimulatorError'
          description: Why its last run stopped without a stop request, or null.
        id:
          description: MCP Box ID.
          pattern: ^mbx_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
        metadata:
          description: Customer JSON metadata, or null.
        name:
          description: MCP Box name. The ID is its identity, and names need not be unique.
          maxLength: 128
          type: string
        snapshot_id:
          description: The MCP Box Snapshot it serves.
          pattern: ^mbs_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
        status:
          description: >-
            starting while its runtime boots; running while it serves MCP;
            stopping while it releases its runtime; stopped when it holds no
            runtime.
          enum:
            - starting
            - running
            - stopping
            - stopped
          type: string
      required:
        - id
        - name
        - snapshot_id
        - apibox_id
        - status
        - endpoint
        - error
        - metadata
        - created_at
      type: object
    SpecificationValidation:
      additionalProperties: false
      properties:
        issues:
          description: Specification validation problems. At most 20 are returned.
          items:
            $ref: '#/components/schemas/SpecificationIssue'
          maxItems: 20
          type: array
      required:
        - issues
      type:
        - object
        - 'null'
    SimulatorError:
      additionalProperties: false
      properties:
        agent_message:
          description: >-
            Plain-text explanation from the build agent when it could not
            continue, or the problems the check of the build's index found. At
            most 4096 UTF-8 bytes.
          maxLength: 4096
          type:
            - string
            - 'null'
        code:
          description: >-
            Stable Simulator build error code. live_credential_rejected is a
            build that waited at QA for its rejected live credentials and was
            not resumed within 7 days.
          enum:
            - build_failed
            - build_canceled
            - specification_validation_failed
            - live_credential_rejected
          type: string
        detail:
          description: Safe human-readable error detail.
          type: string
        reason:
          description: >-
            Bounded failure reason for selecting recovery guidance, or null when
            unavailable.
          enum:
            - canceled
            - specification_invalid
            - time_limit
            - service_unavailable
            - build_failed
            - null
          type:
            - string
            - 'null'
        validation:
          $ref: '#/components/schemas/SpecificationValidation'
          description: >-
            Specification validation details. Address these issues before
            building again.
      required:
        - agent_message
        - reason
        - validation
        - code
        - detail
      type:
        - object
        - 'null'
    SpecificationIssue:
      additionalProperties: false
      properties:
        code:
          description: Stable validation rule code.
          type: string
        kind:
          description: >-
            Whether the input is invalid, unsupported, incomplete, exceeds a
            build limit, or has no specific diagnosis.
          enum:
            - invalid
            - unsupported
            - incomplete
            - limit
            - unknown
          type: string
        location:
          description: Readable endpoint or field affected by this issue.
          maxLength: 512
          type: string
        message:
          description: What needs attention at this location.
          type: string
        operation:
          description: >-
            Affected operation ID or method and path, when available. Empty for
            document-level issues.
          maxLength: 243
          type: string
        suggestion:
          description: How to correct or address the problem.
          type: string
      required:
        - code
        - operation
        - location
        - kind
        - message
        - suggestion
      type: object
  examples:
    bad_request_body:
      value:
        code: bad_request
        detail: request body is invalid
        validation: null
    apibox_not_found:
      value:
        code: apibox_not_found
        detail: No API Box was found with ID "abx_01J8Z5X4K70000000000000001".
        validation: null
    mcpbox_snapshot_not_found:
      value:
        code: mcpbox_snapshot_not_found
        detail: >-
          No MCP Box Snapshot was found with ID
          "mbs_01J8Z5X4K70000000000000007".
        validation: null
    mcpbox_snapshot_not_ready:
      value:
        code: mcpbox_snapshot_not_ready
        detail: >-
          The MCP Box Snapshot with ID "mbs_01J8Z5X4K70000000000000007" cannot
          start an MCP Box. Ask Continuous to publish it again.
        validation: null
    mcpbox_apibox_mismatch:
      value:
        code: validation
        detail: >-
          The API Box with ID "abx_01J8Z5X4K70000000000000001" started from API
          Box Snapshot "abs_01J8Z5X4K70000000000000002", but the MCP Box
          Snapshot was built against "abs_01J8Z5X4K70000000000000003".
        validation: null
    box_quota_exceeded:
      value:
        code: simulation_quota_exceeded
        detail: >-
          The workspace runs 5 Simulations, API Boxes, Web Boxes and MCP Boxes,
          which share a limit of 5. Stop or delete one, then retry.
        validation: null
    auth_provider_unavailable:
      value:
        code: auth_provider_unavailable
        detail: >-
          The authentication provider is unavailable. Retry the request after a
          short delay.
        validation: null
    internal_unavailable:
      value:
        code: internal_unavailable
        detail: >-
          The service is temporarily unavailable. Retry the request after a
          short delay.
        validation: null
    auth_invalid:
      value:
        code: auth_invalid
        detail: The authentication credential is invalid.
        validation: null
    auth_missing:
      value:
        code: auth_invalid
        detail: Authentication credentials are required.
        validation: null
    request_timeout:
      value:
        code: request_timeout
        detail: >-
          The request body was not received before the timeout. Retry the
          request.
        validation: null
    payload_too_large:
      value:
        code: payload_too_large
        detail: The request body exceeds the maximum allowed size.
        validation: null
    unsupported_media_type:
      value:
        code: unsupported_media_type
        detail: The request Content-Type is not supported.
        validation: null
    internal:
      value:
        code: internal
        detail: The server encountered an unexpected error.
        validation: null
  responses:
    Unauthorized:
      content:
        application/problem+json:
          examples:
            auth_invalid:
              $ref: '#/components/examples/auth_invalid'
            auth_missing:
              $ref: '#/components/examples/auth_missing'
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized
    RequestTimeout:
      content:
        application/problem+json:
          examples:
            request_timeout:
              $ref: '#/components/examples/request_timeout'
          schema:
            $ref: '#/components/schemas/Error'
      description: Request Timeout
    PayloadTooLarge:
      content:
        application/problem+json:
          examples:
            payload_too_large:
              $ref: '#/components/examples/payload_too_large'
          schema:
            $ref: '#/components/schemas/Error'
      description: Request Entity Too Large
    UnsupportedMediaType:
      content:
        application/problem+json:
          examples:
            unsupported_media_type:
              $ref: '#/components/examples/unsupported_media_type'
          schema:
            $ref: '#/components/schemas/Error'
      description: Unsupported Media Type
    InternalServerError:
      content:
        application/problem+json:
          examples:
            internal:
              $ref: '#/components/examples/internal'
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
  securitySchemes:
    apiKeyAuth:
      bearerFormat: Continuous API key
      description: >-
        Use a Continuous API key. Send it in the Authorization header as a
        Bearer token.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.