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

# Create Mcp Server

> Create a new MCP server row.

Slug is derived from ``name`` and made unique with numeric
suffixes on collision. Empty post normalization slug returns 422.



## OpenAPI

````yaml /standalone/openapi.json post /admin/api/v1/mcp-servers
openapi: 3.1.0
info:
  title: Idun Agent Engine Server
  description: A production-ready server for conversational AI agents
  version: 0.6.1
servers: []
security: []
tags:
  - name: Runtime
    description: >-
      Public agent run endpoints, engine operations, and chat-channel webhooks.
      SSE streaming via the AG-UI protocol.
  - name: Agent Configuration
    description: >-
      Singleton admin endpoints for the agent, prompts, memory, guardrails, and
      onboarding wizard.
  - name: Auth & SSO
    description: >-
      Login, sessions, password change, SSO config, and the public SSO discovery
      endpoint.
  - name: Integrations & Tools
    description: MCP server registry and external integration credentials.
  - name: Observability
    description: Tracing/logging provider configuration.
  - name: Traces
    description: >-
      Trace and span storage admin endpoints — list, detail, delete, and
      pipeline-health for the standalone trace store.
  - name: Dashboard
    description: >-
      Operator dashboard widgets — KPIs, time-series, top errors, and
      configuration summary.
paths:
  /admin/api/v1/mcp-servers:
    post:
      tags:
        - Integrations & Tools
      summary: Create Mcp Server
      description: |-
        Create a new MCP server row.

        Slug is derived from ``name`` and made unique with numeric
        suffixes on collision. Empty post normalization slug returns 422.
      operationId: create_mcp_server_admin_api_v1_mcp_servers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StandaloneMCPServerCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StandaloneMutationResponse_StandaloneMCPServerRead_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StandaloneMCPServerCreate:
      properties:
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
          default: true
        mcpServer:
          $ref: '#/components/schemas/MCPServer'
      type: object
      required:
        - name
        - mcpServer
      title: StandaloneMCPServerCreate
      description: Body for POST /admin/api/v1/mcp-servers.
    StandaloneMutationResponse_StandaloneMCPServerRead_:
      properties:
        data:
          $ref: '#/components/schemas/StandaloneMCPServerRead'
        reload:
          $ref: '#/components/schemas/StandaloneReloadResult'
      type: object
      required:
        - data
        - reload
      title: StandaloneMutationResponse[StandaloneMCPServerRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MCPServer:
      properties:
        name:
          type: string
          title: Name
          description: Unique identifier for this MCP server.
        transport:
          type: string
          enum:
            - stdio
            - sse
            - streamable_http
            - websocket
          title: Transport
          description: Transport type used to reach the MCP server.
          default: streamable_http
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: >-
            Endpoint URL for HTTP/S based transports (SSE, streamable_http,
            websocket).
        command:
          anyOf:
            - type: string
            - type: 'null'
          title: Command
          description: Executable to run when using stdio transport.
        args:
          items:
            type: string
          type: array
          title: Args
          description: Arguments to pass to the command for stdio transport.
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
          description: Optional headers for HTTP/S transports.
        env:
          additionalProperties:
            type: string
          type: object
          title: Env
          description: Environment variables to set when spawning stdio servers.
        cwd:
          anyOf:
            - type: string
            - type: 'null'
          title: Cwd
          description: Working directory for stdio transports.
        encoding:
          anyOf:
            - type: string
            - type: 'null'
          title: Encoding
          description: Encoding used for stdio transport.
        encodingErrorHandler:
          anyOf:
            - type: string
              enum:
                - strict
                - ignore
                - replace
            - type: 'null'
          title: Encodingerrorhandler
          description: Encoding error handler for stdio transport.
        timeoutSeconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Timeoutseconds
          description: Timeout in seconds for HTTP/S transports (maps to `timeout`).
        sseReadTimeoutSeconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Ssereadtimeoutseconds
          description: >-
            Timeout in seconds waiting for SSE events (maps to
            `sse_read_timeout`).
        terminateOnClose:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Terminateonclose
          description: Whether to terminate Streamable HTTP sessions on close.
        sessionKwargs:
          additionalProperties: true
          type: object
          title: Sessionkwargs
          description: Extra keyword arguments forwarded to MCP ClientSession.
      type: object
      required:
        - name
      title: MCPServer
      description: Configuration for a single MCP server connection.
    StandaloneMCPServerRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        slug:
          type: string
          title: Slug
        name:
          type: string
          title: Name
        enabled:
          type: boolean
          title: Enabled
        mcpServer:
          $ref: '#/components/schemas/MCPServer'
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - slug
        - name
        - enabled
        - mcpServer
        - createdAt
        - updatedAt
      title: StandaloneMCPServerRead
      description: GET response and the data payload of POST/PATCH/DELETE responses.
    StandaloneReloadResult:
      properties:
        status:
          $ref: '#/components/schemas/StandaloneReloadStatus'
        message:
          type: string
          title: Message
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - status
        - message
      title: StandaloneReloadResult
      description: |-
        Reload outcome attached to every admin mutation response.

        ``reloaded`` means DB committed and runtime now uses the new config.
        ``restart_required`` means DB committed and process restart is needed.
        ``reload_failed`` means DB rolled back and runtime is unchanged.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    StandaloneReloadStatus:
      type: string
      enum:
        - reloaded
        - restart_required
        - reload_failed
      title: StandaloneReloadStatus
      description: Outcome of a reload triggered by an admin mutation.

````