Add network access to agentic-workflows MCP server container#14201
Add network access to agentic-workflows MCP server container#14201
Conversation
Enable --network host for agentic-workflows stdio container to allow GitHub API access for CLI commands (audit, logs, compile). The container needs to reach api.github.com to execute gh CLI commands. Updated: - mcp_config_builtin.go: Add --network host to Docker args - Documentation: Updated comments to explain network requirement - Tests: Updated test expectations for new args format Fixes issue where daily-cli-tools-tester workflow couldn't access agentic-workflows MCP tools due to network isolation. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
All workflows using agentic-workflows tool now include --network host Docker arg to enable GitHub API access from the MCP server container. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated test assertions in mcp_config_compilation_test.go and importable_tools_test.go to expect --network host flag in args. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
❌ Changeset Generator failed. Please review the logs for details. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Agent Container Tool Check
Result: 10/12 tools available ❌ Issues Found
RecommendationContainer environment needs investigation for Java library paths and .NET execution environment.
|
|
🤖 Beep boop! The smoke test agent just dropped by to say hello! Testing all the things, navigating through your discussions like a digital explorer. Everything's looking good from my automated perspective! Smoke test run §21760895712 was here 👋
|
Smoke Test ResultsPRs Tested:
Results:
Overall Status: ✅ PASS
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
There was a problem hiding this comment.
Pull request overview
Enables outbound network connectivity for the built-in agentic-workflows stdio MCP server container so gh aw-backed tools (e.g., audit, logs, compile) can reach GitHub’s API.
Changes:
- Add
--network hostto the Docker runtime args for the agentic-workflows MCP server config (JSON and TOML render paths). - Update MCP rendering/config tests to assert the new args sequence.
- Regenerate workflow lock files to reflect the updated MCP server container args.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/mcp_config_builtin.go | Adds --network host to agentic-workflows container args in both JSON and TOML renderers; updates inline documentation accordingly. |
| pkg/workflow/mcp_renderer_test.go | Updates renderer assertions to expect --network host + -w ${{ github.workspace }}. |
| pkg/workflow/mcp_config_refactor_test.go | Updates expected rendered MCP config strings (JSON + TOML) to include --network host. |
| pkg/workflow/mcp_config_compilation_test.go | Updates lock-content assertions to match the new args list. |
| pkg/workflow/importable_tools_test.go | Updates imported tool workflow assertion to match the new args list. |
| .github/workflows/workflow-normalizer.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/static-analysis-report.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/smoke-copilot.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/smoke-claude.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/security-review.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/safe-output-health.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/q.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/python-data-charts.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/portfolio-analyst.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/metrics-collector.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/mcp-inspector.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/dev-hawk.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/example-workflow-analyzer.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/deep-report.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/daily-observability-report.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/daily-cli-tools-tester.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/cloclo.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/audit-workflows.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/agent-persona-explorer.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
| .github/workflows/agent-performance-analyzer.lock.yml | Regenerated lock content to include --network host in agenticworkflows args. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🛡️ Security Posture AnalysisThis PR contains changes that may affect the security posture. Please review the following concerns: 🟠 Network boundary: Host network enabled for agentic-workflows containerLocation: Change Detected: - "args": ["-w", "${{ github.workspace }}"],
+ "args": ["--network", "host", "-w", "${{ github.workspace }}"],Security Impact: Switching the stdio container to Recommendation: Keep the container in bridged mode and route only the required outbound traffic, or enforce a more restrictive network policy (e.g., proxy/allowlist for api.github.com) instead of opening the entire host network. Summary
Note: This is an automated analysis. Please verify these findings and determine if the changes are intentional and justified.
|
The agentic-workflows MCP server runs as a stdio server in a Docker container without network access, preventing
ghCLI commands (audit,logs,compile) from reaching GitHub's API atapi.github.com.Changes
--network hostto Docker args for agentic-workflows container (both JSON and TOML renderers)Implementation
This follows the same pattern used by Playwright and Serena MCP servers. The container now has host network access, allowing the gh CLI to function correctly while maintaining workspace isolation through mounts.
Original prompt
This section details on the original issue you should resolve
<issue_title>[cli-tools-test] MCP tools not accessible in daily-cli-tools-tester workflow - blocking exploratory testing</issue_title>
<issue_description>## Problem Description
The daily-cli-tools-tester workflow is designed to perform exploratory testing of
audit,logs, andcompiletools from the agentic-workflows MCP server. However, none of these tools are accessible through any available interface, completely blocking the testing mission.Tool Configuration
The workflow frontmatter correctly declares the agentic-workflows tool:
The MCP configuration is generated correctly:
{ "agenticworkflows": { "headers": { "Authorization": "I7HCampDYk79ahoUDnxdp4RMIMjXKW6V9jHJtdPxmQKjgJ9jB7AzvZLNnk" }, "type": "http", "url": "(host.docker.internal/redacted) "tools": ["*"] } }Steps to Reproduce
daily-cli-tools-testerworkflowagenticworkflows-statustoolagenticworkflows-mcp-inspecttoolExpected Behavior
The agentic-workflows MCP tools should be accessible to the Copilot CLI agent via:
agenticworkflows-status)The workflow prompt explicitly states:
Actual Behavior
Environment
Impact
Diagnostic Information
Available tools in environment:
MCP configuration location:
/home/runner/.copilot/mcp-config.jsonMCP log directory:
/tmp/gh-aw/mcp-logs/Root Cause Hypothesis
Possible causes:
Suggested Investigation Steps
Check if agenticworkflows MCP server is running:
docker ps | grep agenticworkflows curl (host.docker.internal/redacted)Check MCP proxy logs for routing errors:
ls -la /tmp/gh-aw/mcp-logs/ cat /tmp/gh-aw/mcp-logs/agenticworkflows/*.logTest tool discovery via Copilot CLI:
copilot --list-tools | grep agenticTest direct MCP protocol communication:
Compare with working MCP servers (safeoutputs, github):
Related Files
.github/workflows/daily-cli-tools-tester.md/home/runner/.copilot/mcp-config.json(generated)/tmp/gh-aw/agent/testing-log.md(created during this run)Additional Context
This is a brand new testing workflow designed to provide comprehensive exploratory testing of core CLI functionality. It cannot fulfill its purpose without access to the tools it's meant to test.
The workflow was likely created with the assumption that HTTP MCP s...
💡 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.