fix: web-fetch MCP server generates container format instead of command/args#17822
fix: web-fetch MCP server generates container format instead of command/args#17822
Conversation
Replace command/args Docker format with container key in renderMCPFetchServerConfig for both JSON (Gemini, Claude, Codex) and TOML (Codex) output formats. This fixes schema validation failures: - missing properties: 'container' - additionalProperties 'command', 'args' not allowed Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot add add |
…smoke-copilot - smoke-codex.md: add web-fetch tool + test step 4 (Web Fetch Testing) - smoke-gemini.md: add web-fetch tool + test step 2 (Web Fetch Testing) - smoke-copilot.md: add web-fetch test step 5 (already had web-fetch tool) - Recompile lock files with correct container format for web-fetch MCP server Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in d9b5066:
All three lock files now contain |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🤖 Smoke test 22292196548 results for PR #17822:
Overall: PR author:
|
There was a problem hiding this comment.
This PR adds web-fetch MCP server support to the smoke-codex workflow, enabling the web_fetch tool test. Changes look correct — the container image is properly registered in both the download list and MCP server config. Minor suggestion: consider pinning the mcp/fetch image to a specific version for reproducibility.
📰 BREAKING: Report filed by Smoke Copilot
| "${GITHUB_WORKSPACE}" | ||
| ] | ||
| mounts = ["${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:rw"] | ||
|
|
There was a problem hiding this comment.
The mcp/fetch container image is included in the download list and wired up correctly in the MCP server config. One minor note: the image mcp/fetch doesn't specify a version tag — consider pinning to a specific version (e.g., mcp/fetch:latest or a digest) for reproducibility.
|
Smoke test results:
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
✅ Commit pushed: |
|
Smoke Test Results - Run §22292196576
Overall: PARTIAL (2 skipped/fallback)
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
💥 [THE END] — Illustrated by Smoke Claude
There was a problem hiding this comment.
Pull request overview
Fixes invalid MCP Gateway configuration generation for tools: web-fetch by emitting a gateway-schema-compliant container server shape (instead of command/args), and updates tests and smoke workflows/locks accordingly.
Changes:
- Update
renderMCPFetchServerConfigto render"container": "mcp/fetch"for JSON andcontainer = "mcp/fetch"for TOML. - Adjust unit/integration tests to assert the new
containershape. - Extend Gemini/Codex/Copilot smoke workflows and regenerated lock files to exercise
web-fetchand include themcp/fetchimage/config.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/fetch.go | Emit gateway-compliant container config for the web-fetch MCP server. |
| pkg/workflow/fetch_test.go | Update assertions for the new JSON/TOML rendering shape. |
| pkg/workflow/fetch_integration_test.go | Update integration assertions to check container = "mcp/fetch" / "container": "mcp/fetch". |
| .github/workflows/smoke-gemini.md | Add web-fetch tool + a dedicated smoke step to validate it. |
| .github/workflows/smoke-gemini.lock.yml | Regenerate lock to include mcp/fetch image download and web-fetch MCP server config. |
| .github/workflows/smoke-codex.md | Add web-fetch tool + a dedicated smoke step to validate it. |
| .github/workflows/smoke-codex.lock.yml | Regenerate lock to include mcp/fetch image download and web-fetch MCP server config (TOML + JSON). |
| .github/workflows/smoke-copilot.md | Add a dedicated web-fetch smoke step (tool already present). |
| smoke-test-claude-22292196576.md | Add smoke-test run marker file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Add the web-fetch server configuration | ||
| // Note: The "container" key marks this as an MCP server with stdio transport. | ||
| // The actual rendering is done by renderMCPFetchServerConfig() which uses | ||
| // the standardized Docker command format for all engines. | ||
| webFetchConfig := map[string]any{ |
There was a problem hiding this comment.
The comment above webFetchConfig says renderMCPFetchServerConfig() uses a “standardized Docker command format”, but the renderer now emits a gateway-schema container key (no docker command/args). Please update the comment to reflect the container-based MCP Gateway shape to avoid misleading future changes.
See below for a potential fix:
// The actual rendering is done by renderMCPFetchServerConfig(), which emits
// the MCP Gateway container-based schema (using the \"container\" field) for all engines.
tools: web-fetchwas compiling to acommand/argsDocker exec shape that fails MCP Gateway schema validation (missing properties: 'container',additionalProperties 'command', 'args' not allowed). Affected engines:gemini,codex.Changes
pkg/workflow/fetch.go—renderMCPFetchServerConfignow emits the gateway-compliantcontainerkey instead ofcommand/args:TOML output (Codex) similarly changes from
command = "docker"+argstocontainer = "mcp/fetch".pkg/workflow/fetch_test.go/fetch_integration_test.go— Updated assertions to match the newcontainershape.smoke-codex.md— Addedweb-fetch:to thetoolssection and a new "Web Fetch Testing" step to exercise the MCP server.smoke-gemini.md— Addedweb-fetch:to thetoolssection and a new "Web Fetch Testing" step to exercise the MCP server.smoke-copilot.md— Already hadweb-fetch:in thetoolssection; added a "Web Fetch Testing" step to exercise it.All three smoke test lock files now emit
"container": "mcp/fetch"in the generated MCP server config.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
✨ PR Review Safe Output Test - Run 22292196576