{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sealgate-ai/json-schema/sealgate-ai-create-server-request-schema.json",
  "title": "CreateServerRequest",
  "description": "Body for creating an MCP server.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sealgate-ai-management-openapi.json#/components/schemas/CreateServerRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Server MCP prefix name (alphanumeric only)"
    },
    "display_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Human-readable display name (defaults to name)"
    },
    "command": {
      "type": "string",
      "default": "",
      "description": "Server command (required for local servers)"
    },
    "args": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Command-line arguments"
    },
    "env": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "Environment variables"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Remote server URL (direct mode, no mcp-remote)"
    },
    "headers": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom HTTP headers for remote servers"
    },
    "enabled": {
      "type": "boolean",
      "default": true,
      "description": "Whether to enable the server"
    },
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "Server version"
    },
    "transport_type": {
      "type": "string",
      "default": "http",
      "description": "Transport: 'http' or 'stdio_tunnel'"
    },
    "device_ref_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Target device id, required when transport_type is 'stdio_tunnel'"
    },
    "working_dir": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional working directory for stdio_tunnel subprocesses"
    },
    "icon_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Manual override icon URL"
    }
  },
  "required": [
    "name"
  ]
}