Fix Playwright MCP --allowed-hosts to use comma separator per spec#13667
Fix Playwright MCP --allowed-hosts to use comma separator per spec#13667
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🔍 PR Triage ResultsCategory: bug | Risk: low | Priority: 68/100 Scores Breakdown
📋 Recommended Action: fast_trackThis is a critical bug fix that corrects Playwright MCP configuration to match the official specification. The PR has excellent documentation showing the issue and fix. While in draft and CI is pending, the change is small, focused, and addresses a real spec violation that could cause runtime issues. Should be fast-tracked for review once CI passes and draft is removed. Triaged by PR Triage Agent on 2026-02-04T06:24:15Z
|
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
Agent Container Tool Check ✅
Result: 10/12 tools available Missing tools: Java and .NET runtimes are not installed in the container environment.
|
|
PRs: [WIP] Investigate failure in install.sh script for Copilot agent | Fix Playwright MCP --allowed-hosts to use comma separator per spec
|
Smoke Test Results✅ GitHub MCP | ✅ Safe Inputs | ✅ Serena | ✅ Playwright | ✅ File I/O | ✅ Bash | ✅ Discussion | ✅ Build | ✅ Dispatch Status: ✅ PASS @pelikhan Last 2 PRs:
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
There was a problem hiding this comment.
Pull request overview
Updates Playwright MCP configuration generation to comply with the documented separators for --allowed-hosts (comma-separated) vs --allowed-origins (semicolon-separated), and regenerates workflow lockfiles accordingly.
Changes:
- Adjust Playwright MCP JSON config rendering to use comma-separated
--allowed-hostsand semicolon-separated--allowed-origins. - Regenerate workflow
.lock.ymlfiles to reflect the corrected--allowed-hostsformatting. - Remove several entries from the agent factory status table.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/mcp_config_playwright_renderer.go | Splits domain string generation so --allowed-hosts uses commas and --allowed-origins uses semicolons. |
| docs/src/content/docs/agent-factory-status.mdx | Removes several workflow rows from the status table. |
| .github/workflows/unbloat-docs.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format. |
| .github/workflows/smoke-copilot.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format (inline JSON array). |
| .github/workflows/smoke-codex.lock.yml | Updates Playwright --allowed-hosts in the JSON config block (but TOML block still has semicolons). |
| .github/workflows/smoke-claude.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format. |
| .github/workflows/slide-deck-maintainer.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format (inline JSON array). |
| .github/workflows/docs-noob-tester.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format (inline JSON array). |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format. |
| .github/workflows/cloclo.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format. |
| .github/workflows/blog-auditor.lock.yml | Updates Playwright --allowed-hosts value to comma-separated format. |
Comments suppressed due to low confidence (2)
pkg/workflow/mcp_config_playwright_renderer.go:140
- Tests should explicitly validate the different separators now required by the Playwright MCP spec (comma-separated
--allowed-hostsvs semicolon-separated--allowed-origins). Current assertions in unit/integration tests appear to only check for the semicolon-joined domain string somewhere in the rendered output, which would miss regressions where--allowed-hostsis still semicolon-separated.
allowedHostsStr := strings.Join(allowedDomains, ",")
allowedOriginsStr := strings.Join(allowedDomains, ";")
entrypointArgs = append(entrypointArgs, "--allowed-hosts", allowedHostsStr)
entrypointArgs = append(entrypointArgs, "--allowed-origins", allowedOriginsStr)
docs/src/content/docs/agent-factory-status.mdx:122
- Similarly, this hunk removes additional workflow entries (Secret Scanning Triage / Security Alert Burndown) without any mention in the PR description. If these rows are being removed because the underlying workflows were deleted, it would help to call that out explicitly or split it into a separate change to keep this PR focused on the Playwright separator fix.
| [Safe Output Health Monitor](https://github.com/github/gh-aw/blob/main/.github/workflows/safe-output-health.md) | claude | [](https://github.com/github/gh-aw/actions/workflows/safe-output-health.lock.yml) | - | - |
| [Schema Consistency Checker](https://github.com/github/gh-aw/blob/main/.github/workflows/schema-consistency-checker.md) | claude | [](https://github.com/github/gh-aw/actions/workflows/schema-consistency-checker.lock.yml) | - | - |
| [Scout](https://github.com/github/gh-aw/blob/main/.github/workflows/scout.md) | claude | [](https://github.com/github/gh-aw/actions/workflows/scout.lock.yml) | - | `/scout` |
| [Security Compliance Campaign](https://github.com/github/gh-aw/blob/main/.github/workflows/security-compliance.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/security-compliance.lock.yml) | - | - |
| [Security Fix PR](https://github.com/github/gh-aw/blob/main/.github/workflows/security-fix-pr.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/security-fix-pr.lock.yml) | - | - |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Per Playwright MCP documentation: | ||
| // --allowed-hosts expects comma-separated list | ||
| // --allowed-origins expects semicolon-separated list | ||
| allowedHostsStr := strings.Join(allowedDomains, ",") | ||
| allowedOriginsStr := strings.Join(allowedDomains, ";") |
There was a problem hiding this comment.
This change fixes JSON config rendering, but the TOML renderer still appears to generate a single semicolon-joined domainsStr for both --allowed-hosts and --allowed-origins (see renderPlaywrightTOML in pkg/workflow/mcp_renderer.go). That means codex/TOML-based configs will continue to emit an invalid --allowed-hosts value. Please apply the same split (comma for hosts, semicolon for origins) to the TOML path as well to keep formats consistent.
| "localhost;localhost:*;127.0.0.1;127.0.0.1:*;github.com", | ||
| "localhost,localhost:*,127.0.0.1,127.0.0.1:*,github.com", | ||
| "--allowed-origins", | ||
| "localhost;localhost:*;127.0.0.1;127.0.0.1:*;github.com" |
There was a problem hiding this comment.
This file still contains a TOML MCP config earlier that sets --allowed-hosts to a semicolon-separated string (e.g. in the [mcp_servers.playwright] block). With this change, the JSON config uses commas but the TOML config remains inconsistent/invalid per spec. After updating the TOML renderer, please re-generate this lock file so both config formats use the correct separators.
| "localhost;localhost:*;127.0.0.1;127.0.0.1:*;github.com" | |
| "localhost,localhost:*,127.0.0.1,127.0.0.1:*,github.com" |
| | [Daily Workflow Updater](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-workflow-updater.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/daily-workflow-updater.lock.yml) | - | - | | ||
| | [DeepReport - Intelligence Gathering Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/deep-report.md) | codex | [](https://github.com/github/gh-aw/actions/workflows/deep-report.lock.yml) | `0 15 * * 1-5` | - | | ||
| | [Delight](https://github.com/github/gh-aw/blob/main/.github/workflows/delight.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/delight.lock.yml) | - | - | | ||
| | [Dependabot Bundler](https://github.com/github/gh-aw/blob/main/.github/workflows/dependabot-bundler.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/dependabot-bundler.lock.yml) | - | - | | ||
| | [Dependabot Burner](https://github.com/github/gh-aw/blob/main/.github/workflows/dependabot-burner.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/dependabot-burner.lock.yml) | - | - | | ||
| | [Dependabot Dependency Checker](https://github.com/github/gh-aw/blob/main/.github/workflows/dependabot-go-checker.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/dependabot-go-checker.lock.yml) | `0 9 * * 1,3,5` | - | | ||
| | [Dev](https://github.com/github/gh-aw/blob/main/.github/workflows/dev.md) | copilot | [](https://github.com/github/gh-aw/actions/workflows/dev.lock.yml) | - | - | |
There was a problem hiding this comment.
This PR also removes several workflow entries from the agent status table (e.g. Dependabot Bundler/Burner). That change isn’t mentioned in the PR description and makes the PR scope broader. Please either (1) update the PR description to explain why these entries are being removed, or (2) move the doc cleanup to a separate PR.
Playwright MCP configuration was using semicolons for both
--allowed-hostsand--allowed-origins. Per Playwright MCP documentation,--allowed-hostsexpects comma-separated values while--allowed-originsexpects semicolon-separated values.Changes
pkg/workflow/mcp_config_playwright_renderer.go: Split domain string generation to use correct separators:allowedHostsStrwith comma separatorallowedOriginsStrwith semicolon separator.lock.ymlfiles with corrected formatBefore/After
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.