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

# Create or update one admin-managed MCP server

> GoModel API reference for PUT /admin/mcp-servers: Create or update one admin-managed MCP server.



## OpenAPI

````yaml /openapi.json put /admin/mcp-servers
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, Fireworks AI, Meta, OpenRouter, Kilo AI, DeepSeek, Z.ai, xAI,
    MiniMax, Xiaomi MiMo, Mistral AI, OpenCode Go, Oracle, Ollama, Bailian).
    Drop-in OpenAI-compatible API.
  title: GoModel API
  contact: {}
  version: '1.0'
servers:
  - url: '{base_url}'
    description: Edit the base URL to point at your GoModel deployment.
    variables:
      base_url:
        default: http://localhost:8080
        description: Your GoModel deployment URL
security: []
paths:
  /admin/mcp-servers:
    put:
      tags:
        - admin
      summary: Create or update one admin-managed MCP server
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/admin.upsertMCPServerRequest'
        description: MCP server definition
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/admin.mcpServerViewResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.GatewayError'
      security:
        - BearerAuth: []
components:
  schemas:
    admin.upsertMCPServerRequest:
      type: object
      properties:
        allowed_tools:
          type: array
          items:
            type: string
        description:
          type: string
        disallowed_tools:
          type: array
          items:
            type: string
        disallowed_user_paths:
          type: array
          items:
            type: string
        enabled:
          type: boolean
        headers:
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        slug:
          type: string
        tool_timeout_seconds:
          type: integer
        transport:
          type: string
        url:
          type: string
        user_paths:
          type: array
          items:
            type: string
    admin.mcpServerViewResponse:
      type: object
      properties:
        allowed_tools:
          type: array
          items:
            type: string
        auth_required:
          description: >-
            AuthRequired reports that the server answered 401 to the last
            connect.
          type: boolean
        connected_at:
          type: string
        description:
          type: string
        disallowed_tools:
          type: array
          items:
            type: string
        disallowed_user_paths:
          type: array
          items:
            type: string
        enabled:
          type: boolean
        excluded_tool_count:
          type: integer
        headers:
          type: object
          additionalProperties:
            type: string
        last_error:
          type: string
        managed:
          type: boolean
        name:
          type: string
        oauth:
          description: OAuth is the operator sign-in state; absent when never signed in.
          allOf:
            - $ref: '#/components/schemas/admin.mcpOAuthViewResponse'
        prompt_count:
          type: integer
        resource_count:
          type: integer
        slug:
          type: string
        status:
          type: string
        tool_count:
          type: integer
        tool_timeout_seconds:
          type: integer
        transport:
          type: string
        url:
          type: string
        user_paths:
          type: array
          items:
            type: string
    core.GatewayError:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
        param:
          type: string
          nullable: true
        provider:
          type: string
        status_code:
          type: integer
        type:
          $ref: '#/components/schemas/core.ErrorType'
    admin.mcpOAuthViewResponse:
      type: object
      properties:
        expires_at:
          type: string
        issuer:
          type: string
        last_error:
          type: string
        scopes:
          type: array
          items:
            type: string
        signed_in_at:
          type: string
        status:
          type: string
    core.ErrorType:
      type: string
      enum:
        - provider_error
        - rate_limit_error
        - invalid_request_error
        - authentication_error
        - not_found_error
        - permission_error
        - internal_error
      x-enum-varnames:
        - ErrorTypeProvider
        - ErrorTypeRateLimit
        - ErrorTypeInvalidRequest
        - ErrorTypeAuthentication
        - ErrorTypeNotFound
        - ErrorTypePermission
        - ErrorTypeInternal
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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