Skip to content
Discussion options

You must be logged in to vote

For anyone landing here via search, quick consolidation of where this landed and a cleaner variant of LukeSavefrogs's fix.

Three separate things are at play and they don't overlap the way you'd expect:

  • The Bash tool firewall / custom allowlist governs outbound from the bash sandbox. It does not apply to MCP servers.
  • PLAYWRIGHT_MCP_ALLOWED_ORIGINS / PLAYWRIGHT_MCP_ALLOWED_HOSTS env vars are ignored by the default Playwright MCP that Copilot spawns on hosted agent. That's the trap, setting them looks right but has no effect.
  • The Playwright MCP --allowed-hosts CLI flag is the one that actually controls what the MCP visits.

Since the first two don't work on hosted Cloud Agent, the fix is to…

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@LukeSavefrogs
Comment options

@Josverl
Comment options

@LukeSavefrogs
Comment options

@Josverl
Comment options

@LukeSavefrogs
Comment options

This comment was marked as off-topic.

Comment options

You must be logged in to vote
0 replies

This comment was marked as low quality.

@LukeSavefrogs
Comment options

@Josverl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Copilot Cloud Agent Implement a task or issue, run in the background with GitHub Actions, and more
5 participants