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

# Create



## OpenAPI

````yaml /openapi.json post /api/mcp/servers
openapi: 3.1.0
info:
  title: Aixy Gateway API
  version: 0.1.0
  description: >-
    Route requests to configured AI providers through OpenAI- and
    Anthropic-compatible APIs. Aixy applies project access, model policies,
    guardrails, routing, budgets, and usage attribution before forwarding
    inference traffic.
servers:
  - url: https://api.aixy-gateway.com
    description: Aixy production gateway
security: []
tags:
  - name: operations
    description: Check process liveness and traffic readiness.
  - name: authentication
    description: Authenticate trusted server-side clients.
  - name: organizations
    description: Manage the organization and its lifecycle.
  - name: projects
    description: Create projects and manage project membership.
  - name: users
    description: Manage organization users, roles, and invitations.
  - name: teams
    description: Manage teams and team membership.
  - name: api-keys
    description: Manage project-scoped gateway API keys.
  - name: provider-credentials
    description: Manage organization and project provider credentials.
  - name: provider-catalog
    description: Discover providers supported by the gateway.
  - name: provider-models
    description: Discover and control models exposed by configured providers.
  - name: routing
    description: Configure stable model aliases, routing strategies, and fallbacks.
  - name: guardrails
    description: Configure prompt and sensitive-data protection policies.
  - name: identity connections
    description: Configure tenant-scoped enterprise identity federation.
  - name: playground
    description: Exercise configured models through the gateway.
  - name: cost-control
    description: Inspect spend and enforce budgets across tenant scopes.
  - name: metrics
    description: Inspect usage, token, latency, and error metrics.
  - name: activity
    description: Diagnose individual model requests and manage opt-in content capture.
  - name: monitors
    description: Configure operational monitors and notification channels.
  - name: audit
    description: Query, verify, and export the organization audit log.
  - name: telemetry exports
    description: Export telemetry to organization-owned destinations.
  - name: billing
    description: Inspect and manage the organization subscription.
  - name: models
    description: List models available to a project-scoped gateway API key.
  - name: inference
    description: Run model inference through the Aixy data plane.
  - name: pricing
    description: Manage versioned pricing attribution rules.
  - name: system
    description: Discover gateway capabilities and providers.
  - name: MCP beta
    description: Mcp beta operations exposed by the gateway.
  - name: cost-optimization
    description: Cost optimization operations exposed by the gateway.
  - name: custom domains
    description: Custom domains operations exposed by the gateway.
  - name: data processing
    description: Data processing operations exposed by the gateway.
  - name: feature flags
    description: Feature flags operations exposed by the gateway.
  - name: privacy
    description: Privacy operations exposed by the gateway.
  - name: roles
    description: Roles operations exposed by the gateway.
paths:
  /api/mcp/servers:
    post:
      tags:
        - MCP beta
      summary: Create
      operationId: create_mcp_server
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpServerRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
                title: Response Create Mcp Server
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '401':
          description: Authentication is required or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '403':
          description: The authenticated account cannot perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '404':
          description: The requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '409':
          description: The request conflicts with the current resource state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '413':
          description: The request body exceeds the endpoint limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '502':
          description: An external dependency returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '503':
          description: The control-plane capability is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        4XX:
          description: The request was rejected by validation or authorization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
      security:
        - BrowserSession: []
components:
  schemas:
    McpServerRequest:
      properties:
        name:
          type: string
          maxLength: 80
          minLength: 1
          pattern: .*\S.*
          title: Name
        url:
          type: string
          maxLength: 2048
          title: Url
        auth_type:
          type: string
          enum:
            - none
            - bearer
            - api_key
            - oauth
          title: Auth Type
          default: bearer
        credential_scope:
          type: string
          enum:
            - personal
            - shared
          title: Credential Scope
          default: personal
        header_name:
          type: string
          maxLength: 64
          title: Header Name
          default: Authorization
        enabled:
          type: boolean
          title: Enabled
          default: true
        allowed_tools:
          anyOf:
            - items:
                type: string
                maxLength: 200
                minLength: 1
              type: array
              maxItems: 512
            - type: 'null'
          title: Allowed Tools
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
        oauth:
          anyOf:
            - $ref: '#/components/schemas/McpOAuthConfiguration'
            - type: 'null'
        oauth_client_secret:
          anyOf:
            - type: string
              maxLength: 16384
            - type: 'null'
          title: Oauth Client Secret
        revision:
          type: integer
          minimum: 1
          title: Revision
          default: 1
      additionalProperties: false
      type: object
      required:
        - name
        - url
      title: McpServerRequest
    GatewayErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/GatewayErrorDetail'
      type: object
      required:
        - error
      title: GatewayErrorResponse
    McpOAuthConfiguration:
      properties:
        managed_provider:
          anyOf:
            - type: string
              enum:
                - github
                - slack
                - jira
                - notion
            - type: 'null'
          title: Managed Provider
        access_mode:
          anyOf:
            - type: string
              const: personal
            - type: 'null'
          title: Access Mode
          description: >-
            Managed OAuth: each user chooses access at the provider. Resource
            and repository restrictions must be empty. Omitted or null preserves
            legacy restrictions.
        github_access:
          anyOf:
            - type: string
              const: all_installations
            - type: 'null'
          title: Github Access
          description: >-
            Legacy GitHub App mode: use access across the app's installations.
            Leave organization and repository restrictions empty in this mode.
            With no access_mode, omitted or null preserves the organization
            restriction.
        resource_id:
          type: string
          maxLength: 128
          title: Resource Id
          description: >-
            Legacy resource restriction; leave empty with personal access_mode.
            GitHub accepts an organization name or numeric ID; names are
            verified with GitHub and saved as stable numeric IDs.
          default: ''
        repository_ids:
          items:
            type: string
            pattern: ^[1-9][0-9]{0,19}$
          type: array
          maxItems: 100
          title: Repository Ids
          description: >-
            Legacy GitHub App repository restriction; leave empty with personal
            access_mode. Omit or leave empty to use the repositories accessible
            to both the GitHub App installation and the user within the
            configured organization.
        authorization_url:
          type: string
          maxLength: 2048
          title: Authorization Url
          default: ''
        token_url:
          type: string
          maxLength: 2048
          title: Token Url
          default: ''
        client_id:
          type: string
          maxLength: 2048
          title: Client Id
          default: ''
        scope:
          type: string
          maxLength: 2048
          title: Scope
          default: ''
        resource:
          type: string
          maxLength: 2048
          title: Resource
          default: ''
        token_auth_method:
          type: string
          enum:
            - none
            - client_secret_post
            - client_secret_basic
          title: Token Auth Method
          default: none
      additionalProperties: false
      type: object
      title: McpOAuthConfiguration
    GatewayErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
      title: GatewayErrorDetail
  securitySchemes:
    BrowserSession:
      type: apiKey
      description: Secure same-origin browser session cookie.
      in: cookie
      name: gateway_session

````

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