From 49fc7c2924e2047eecac2fbffe4b5446e745af50 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Dec 2025 01:17:20 +0000 Subject: [PATCH 1/2] Initial plan From 4d388ea71946b26470cb9fe3b2db5409db6de8e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Dec 2025 01:24:23 +0000 Subject: [PATCH 2/2] Add comprehensive examples to MCP configuration schema - Add 6 root-level examples covering stdio and http configurations - Add examples to 13 property fields (type, url, command, container, args, entrypointArgs, env, headers, network, network.allowed, network.proxy-args, allowed, version) - Include common patterns: npx, docker, container images, HTTP headers, env vars, network configs - All examples are valid according to schema constraints - Build and tests pass successfully Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> --- pkg/parser/schemas/mcp_config_schema.json | 118 +++++++++++++++++++--- 1 file changed, 105 insertions(+), 13 deletions(-) diff --git a/pkg/parser/schemas/mcp_config_schema.json b/pkg/parser/schemas/mcp_config_schema.json index 6d2207ff06..caf8008642 100644 --- a/pkg/parser/schemas/mcp_config_schema.json +++ b/pkg/parser/schemas/mcp_config_schema.json @@ -1,11 +1,47 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "examples": [ + { + "type": "stdio", + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] + }, + { + "type": "stdio", + "command": "docker", + "args": ["run", "-i", "my-mcp-server"] + }, + { + "type": "http", + "url": "http://localhost:8765" + }, + { + "type": "http", + "url": "https://api.example.com/mcp", + "headers": { + "Authorization": "Bearer ${{ secrets.API_TOKEN }}" + } + }, + { + "container": "docker.io/mcp/brave-search", + "env": { + "BRAVE_API_KEY": "${{ secrets.BRAVE_API_KEY }}" + }, + "allowed": ["*"] + }, + { + "container": "mcp/memory", + "entrypointArgs": ["-v", "/tmp/gh-aw/cache-memory:/app/dist"], + "allowed": ["store_memory", "retrieve_memory", "list_memories"] + } + ], "properties": { "type": { "type": "string", "enum": ["stdio", "http", "local"], - "description": "MCP connection type (local is an alias for stdio)" + "description": "MCP connection type (local is an alias for stdio)", + "examples": ["stdio", "http"] }, "registry": { "type": "string", @@ -14,31 +50,43 @@ "url": { "type": "string", "minLength": 1, - "description": "URL for HTTP MCP connections" + "description": "URL for HTTP MCP connections", + "examples": ["http://localhost:8765", "https://api.example.com/mcp"] }, "command": { "type": "string", "minLength": 1, - "description": "Command for stdio MCP connections" + "description": "Command for stdio MCP connections", + "examples": ["npx", "docker", "python", "node"] }, "container": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9/:_.-]*$", - "description": "Container image for stdio MCP connections (alternative to command)" + "description": "Container image for stdio MCP connections (alternative to command)", + "examples": ["docker.io/mcp/brave-search", "mcp/memory", "ghcr.io/github/github-mcp-server:latest"] }, "args": { "type": "array", "items": { "type": "string" }, - "description": "Arguments for command or container execution" + "description": "Arguments for command or container execution", + "examples": [ + ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"], + ["-y", "@modelcontextprotocol/server-github"], + ["run", "-i", "my-mcp-server"] + ] }, "entrypointArgs": { "type": "array", "items": { "type": "string" }, - "description": "Arguments to add after the container image (container entrypoint arguments)" + "description": "Arguments to add after the container image (container entrypoint arguments)", + "examples": [ + ["-v", "/tmp/gh-aw/cache-memory:/app/dist"], + ["--port", "8080", "--debug"] + ] }, "env": { "type": "object", @@ -48,7 +96,19 @@ } }, "additionalProperties": false, - "description": "Environment variables for MCP server" + "description": "Environment variables for MCP server", + "examples": [ + { + "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" + }, + { + "API_KEY": "${{ secrets.CUSTOM_API_KEY }}", + "LOG_LEVEL": "debug" + }, + { + "BRAVE_API_KEY": "${{ secrets.BRAVE_API_KEY }}" + } + ] }, "headers": { "type": "object", @@ -58,7 +118,16 @@ } }, "additionalProperties": false, - "description": "HTTP headers for HTTP MCP connections" + "description": "HTTP headers for HTTP MCP connections", + "examples": [ + { + "Authorization": "Bearer ${{ secrets.API_TOKEN }}" + }, + { + "X-API-Key": "${{ secrets.API_KEY }}", + "Content-Type": "application/json" + } + ] }, "network": { "type": "object", @@ -72,29 +141,52 @@ }, "minItems": 1, "uniqueItems": true, - "description": "List of allowed domain names for network access" + "description": "List of allowed domain names for network access", + "examples": [ + ["github.com", "api.github.com"], + ["example.com", "api.example.com", "cdn.example.com"] + ] }, "proxy-args": { "type": "array", "items": { "type": "string" }, - "description": "Custom proxy arguments for container-based MCP servers" + "description": "Custom proxy arguments for container-based MCP servers", + "examples": [ + ["--proxy", "http://proxy.example.com:8080"], + ["--proxy-auth", "user:pass"] + ] } }, "additionalProperties": false, - "description": "Network configuration for container-based MCP servers" + "description": "Network configuration for container-based MCP servers", + "examples": [ + { + "allowed": ["github.com", "api.github.com"] + }, + { + "allowed": ["example.com"], + "proxy-args": ["--proxy", "http://proxy.example.com:8080"] + } + ] }, "allowed": { "type": "array", "items": { "type": "string" }, - "description": "List of allowed tool names for this MCP server" + "description": "List of allowed tool names for this MCP server", + "examples": [ + ["*"], + ["store_memory", "retrieve_memory", "list_memories"], + ["brave_web_search", "brave_local_search"] + ] }, "version": { "type": "string", - "description": "Version or tag for container images" + "description": "Version or tag for container images", + "examples": ["latest", "v1.0.0", "stable"] } }, "anyOf": [{ "required": ["type"] }, { "required": ["url"] }, { "required": ["command"] }, { "required": ["container"] }],