{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.nylorun.com/schemas/agent-folder/v1/mcp.json",
  "title": "Nylorun agent folder: mcp.json",
  "description": "An agent folder's MCP servers, in Agent Plugins syntax",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "This file's JSON Schema, for editors: ours, or Agent Plugins' MCP schema"
    },
    "mcpServers": {
      "type": "object",
      "propertyNames": {
        "pattern": "^[A-Za-z0-9_-]{1,64}$"
      },
      "additionalProperties": {
        "$ref": "#/$defs/McpServer"
      },
      "description": "The MCP servers, by name"
    }
  },
  "required": [
    "mcpServers"
  ],
  "additionalProperties": false,
  "$defs": {
    "McpServer": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "streamable-http",
            "sse"
          ],
          "description": "The server's transport: the Runtime runs remote servers only"
        },
        "url": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(?!.*\\$\\{)",
          "description": "The server's URL; a credential goes in a header, never here"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Headers sent to the server. \"Bearer ${NAME}\" in Authorization, or \"${NAME}\" alone in another header, names the secret slot the server authenticates with"
        }
      },
      "required": [
        "type",
        "url"
      ],
      "additionalProperties": false
    }
  }
}
