Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

The MCP configuration schema (mcp_config_schema.json) had zero inline examples despite being one of the more complex configuration areas, making MCP server setup harder to discover.

Changes

Added 14 example fields across the schema:

  • 6 root-level examples showing complete MCP server configurations:

    • stdio with npx/docker commands
    • http with/without headers
    • Container-based servers with env vars and tool allowlists
  • 13 property-level examples covering:

    • Connection types (type, url, command, container)
    • Arguments (args, entrypointArgs)
    • Security (env, headers, network, allowed)
    • Versioning (version)

Example

{
  "examples": [
    {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
    },
    {
      "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": ["*"]
    }
  ]
}

Examples based on real workflow patterns and include GitHub Actions secret syntax, container configurations, and network access controls.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Add examples to MCP configuration schema</issue_title>
<issue_description>## Objective

Add inline examples to the MCP configuration schema, which currently has zero examples despite being one of the more complex configuration areas.

Context

This is Issue #8 (Medium) from the schema audit. While main_workflow_schema has 76 examples and included_file_schema has 3 examples, mcp_config_schema.json has 0 examples. This makes MCP server configuration harder to discover and use.

Approach

Add examples fields to key MCP configuration properties, focusing on common server types and configurations.

Files to Modify

  • pkg/parser/schemas/mcp_config_schema.json

Key Fields to Add Examples

  1. Root MCP server configuration

    "examples": [
      {"stdio": {"command": "npx", "args": ["-y", "`@modelcontextprotocol/server-filesystem`", "/tmp"]}},
      {"http": {"url": "(redacted), "headers": {"Authorization": "Bearer token"}}}
    ]
  2. stdio configuration

    "examples": [
      {"command": "npx", "args": ["-y", "`@modelcontextprotocol/server-github`"]},
      {"command": "docker", "args": ["run", "-i", "my-mcp-server"]}
    ]
  3. http configuration

    "examples": [
      {"url": "(redacted),
      {"url": "(redacted), "headers": {"X-API-Key": "secret"}}
    ]
  4. env configuration

    "examples": [
      {"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}"},
      {"API_KEY": "${{ secrets.CUSTOM_API_KEY }}", "LOG_LEVEL": "debug"}
    ]

Acceptance Criteria

  • At least 4-5 key configuration areas have examples
  • Examples cover both stdio and http MCP server types
  • Examples demonstrate common patterns (npx, docker, headers, env)
  • Examples are valid according to schema constraints
  • Schema validation still passes
  • Run make build to verify embedded schema compiles

Estimated Effort

30-45 minutes

AI generated by Plan Command for discussion #8130

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- 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>
Copilot AI changed the title [WIP] Add examples to MCP configuration schema Add examples to MCP configuration schema Dec 30, 2025
Copilot AI requested a review from mnkiefer December 30, 2025 01:27
@pelikhan pelikhan marked this pull request as ready for review December 30, 2025 01:37
@pelikhan pelikhan merged commit bfa2710 into main Dec 30, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/add-examples-to-mcp-schema branch December 30, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Add examples to MCP configuration schema

3 participants