{
  "$id": "https://docs.kadmo.ai/schemas/kadmo-mcp.json",
  "title": "Kadmo hosted MCP server manifest (kadmo-mcp.json)",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "maxLength": 500
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "runtime": {
      "type": "string",
      "enum": [
        "node22"
      ]
    },
    "root": {
      "type": "string"
    },
    "install": {
      "type": "string",
      "maxLength": 500,
      "default": ""
    },
    "build": {
      "type": "string",
      "maxLength": 500,
      "default": ""
    },
    "start": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "port": {
      "type": "integer",
      "minimum": 1024,
      "maximum": 65535,
      "default": 8000
    },
    "path": {
      "type": "string",
      "maxLength": 200,
      "pattern": "^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$",
      "default": "/mcp"
    },
    "health": {
      "type": "string",
      "maxLength": 200,
      "pattern": "^\\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]*$"
    },
    "repositories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "repo": {
            "type": "string",
            "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9._-]{1,100}$"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "contents": {
                "type": "string",
                "enum": [
                  "read",
                  "write"
                ]
              },
              "pull_requests": {
                "type": "string",
                "enum": [
                  "read",
                  "write"
                ]
              },
              "issues": {
                "type": "string",
                "enum": [
                  "read",
                  "write"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "repo",
          "permissions"
        ],
        "additionalProperties": false
      },
      "maxItems": 20,
      "default": []
    },
    "env": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
      },
      "maxItems": 64,
      "default": []
    }
  },
  "required": [
    "runtime",
    "start"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
