Skip to content

Enable --enable-host-access when MCP gateway is enabled#9519

Closed
Mossaka with Copilot wants to merge 4 commits into
mainfrom
copilot/enable-host-access-when-mcpg-enabled
Closed

Enable --enable-host-access when MCP gateway is enabled#9519
Mossaka with Copilot wants to merge 4 commits into
mainfrom
copilot/enable-host-access-when-mcpg-enabled

Conversation

Copilot AI commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

AWF containers need --enable-host-access to reach the MCP gateway running on the host via host.docker.internal.

Changes

  • Copilot, Claude, Codex engines: Add --enable-host-access to AWF args when HasMCPServers() returns true
  • Tests: Table-driven tests across all three engines verifying flag presence/absence based on MCP configuration

Example

Before:

sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" ...

After (when MCP tools configured):

sudo -E awf --env-all --enable-host-access --container-workdir "${GITHUB_WORKSPACE}" ...
Original prompt

The awf should enable --enable-host-access when mcpg is enabled


💡 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.

When MCP servers are configured (mcpg is enabled), the AWF (Agent Workflow
Firewall) now includes the --enable-host-access flag. This allows the agent
running inside the firewall container to access services on the host machine
via host.docker.internal, which is required for the MCP gateway to function
properly.

This change affects all three engines that support the firewall:
- Copilot engine
- Claude engine
- Codex engine

The flag is only added when HasMCPServers() returns true, ensuring that
workflows without MCP servers don't unnecessarily enable host access.

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Add host access enabling for mcpg Enable --enable-host-access when MCP gateway is enabled Jan 10, 2026
Copilot AI requested a review from Mossaka January 10, 2026 17:13
@Mossaka Mossaka added the smoke label Jan 10, 2026
@Mossaka Mossaka marked this pull request as ready for review January 10, 2026 17:43
@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@Mossaka Mossaka added smoke and removed smoke labels Jan 10, 2026
@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges...

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions

github-actions Bot commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

@Mossaka Mossaka closed this Jan 12, 2026
@github-actions github-actions Bot deleted the copilot/enable-host-access-when-mcpg-enabled branch April 2, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants