Skip to content

Add entrypoint and mounts fields to MCP server configs (breaking change)#9405

Merged
pelikhan merged 7 commits intomainfrom
copilot/fix-mcp-gateway-spec-bugs
Jan 8, 2026
Merged

Add entrypoint and mounts fields to MCP server configs (breaking change)#9405
pelikhan merged 7 commits intomainfrom
copilot/fix-mcp-gateway-spec-bugs

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

The MCP gateway spec had two bugs: missing optional entrypoint field for container entrypoint overrides, and mounts configured at gateway level instead of per-server.

Changes

Schema & Types

  • Added entrypoint (string) and mounts (array) fields to BaseMCPServerConfig
  • Updated mcp_config_schema.json with new field definitions and validation patterns
  • Removed mounts field from MCPGatewayRuntimeConfig (breaking change)

Parsing & Transformation

  • Enhanced parser.ParseMCPConfig and workflow.ParseMCPConfigFromMap to parse new fields
  • Transform entrypointdocker run --entrypoint <value>
  • Transform mountsdocker run -v <source>:<dest>:<mode> (sorted for deterministic output)
  • Removed all gateway-level mounts extraction, validation, and docker command generation

Breaking Change

  • Gateway-level mounts configuration is no longer supported
  • Users must migrate to per-server mounts configuration
  • Migration: Move sandbox.mcp.mounts to tools.<server-name>.mounts

Example

tools:
  custom-mcp:
    container: ghcr.io/org/server:latest
    entrypoint: /custom/entrypoint.sh
    entrypointArgs: ["--config", "/app/config.json"]
    mounts:
      - "/host/data:/data:ro"
      - "/host/cache:/cache:rw"

Generates: docker run --rm -i -v /host/cache:/cache:rw -v /host/data:/data:ro --entrypoint /custom/entrypoint.sh ghcr.io/org/server:latest --config /app/config.json

Original prompt

This section details on the original issue you should resolve

<issue_title>Bug in mcp gateway spec</issue_title>
<issue_description>The current mcp gateway spec has two bugs

  • while mcp servers can be configured with "entrypointArgs" it needs an optional "entrypoint" option too
  • the "mounts" option should not be part of the "gateway" object, but should be an option for individual mcp server configurations under "mcpServers"</issue_description>

<agent_instructions>Please update the spec and make sure that all tests reflect the changes.</agent_instructions>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits January 8, 2026 18:30
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
- Add entrypoint field to BaseMCPServerConfig for container entrypoint override
- Add mounts field to BaseMCPServerConfig for container volume mounts
- Update mcp_config_schema.json with new fields
- Update parsing and validation logic to handle new fields
- Transform entrypoint to docker --entrypoint flag
- Transform mounts to docker -v flags

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
- Add entrypoint and mounts handling in parser.ParseMCPConfig
- Transform entrypoint to docker --entrypoint flag
- Transform mounts to docker -v flags with sorted order
- Fix duplicate mounts extraction bug
- Add comprehensive integration tests for entrypoint and mounts

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
- Add entrypoint and mounts fields to server configuration table
- Mark gateway-level mounts as deprecated
- Update configuration structure examples
- Add new example A.2 showing per-server mounts and entrypoint
- Renumber existing examples (A.3, A.4, A.5)
- Add deprecation note for legacy gateway-level mounts

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
- Replace assert.Greater(x, 0) with assert.Positive(x)
- All MCP-related tests passing

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bugs in mcp gateway specification Add entrypoint and mounts fields to MCP server configs Jan 8, 2026
Copilot AI requested a review from lpcox January 8, 2026 18:56
@pelikhan
Copy link
Contributor

pelikhan commented Jan 8, 2026

@copilot do not care about backward compatibility. Match the spec as it is.

Remove deprecated Gateway-level mounts marked deprecated

- Remove Mounts field from MCPGatewayRuntimeConfig
- Remove extraction logic for gateway-level mounts
- Remove validation for gateway-level mounts
- Remove docker command generation for gateway-level mounts
- Delete mcp_gateway_config_test.go (tests for deprecated feature)
- Remove TestGatewayMountsDeprecation test
- Update documentation to remove deprecated mounts field
- Remove deprecated A.3 example from spec
- Update example file to show mounts on individual MCP servers
- Update main_workflow_schema.json to remove gateway mounts
- All MCP-related tests passing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 8, 2026

@copilot do not care about backward compatibility. Match the spec as it is.

Remove deprecated Gateway-level mounts marked deprecated

Removed all backward compatibility for gateway-level mounts. The mounts field has been completely removed from the gateway configuration and is now only supported on individual MCP server configurations.

Changes in commit 1460127:

  • Removed Mounts field from MCPGatewayRuntimeConfig
  • Removed gateway mounts extraction, validation, and docker command generation
  • Deleted tests for deprecated feature
  • Updated schema and documentation to match the spec

The example file now demonstrates per-server mounts configuration instead of gateway-level mounts.

Copilot AI changed the title Add entrypoint and mounts fields to MCP server configs Add entrypoint and mounts fields to MCP server configs (breaking change) Jan 8, 2026
Copilot AI requested a review from pelikhan January 8, 2026 19:19
@pelikhan pelikhan marked this pull request as ready for review January 8, 2026 19:25
@pelikhan pelikhan merged commit 49cb767 into main Jan 8, 2026
@pelikhan pelikhan deleted the copilot/fix-mcp-gateway-spec-bugs branch January 8, 2026 19:25
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.

Bug in mcp gateway spec

3 participants