Skip to content

Add --cmd argument to agentic-workflows MCP server in dev mode#13974

Merged
pelikhan merged 4 commits intomainfrom
copilot/update-mcp-server-config
Feb 5, 2026
Merged

Add --cmd argument to agentic-workflows MCP server in dev mode#13974
pelikhan merged 4 commits intomainfrom
copilot/update-mcp-server-config

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

The agentic-workflows MCP server configuration was missing the --cmd flag in dev mode, which specifies the binary path for MCP server subprocess calls.

Changes

  • Added ActionMode propagation: Extended MCPRendererOptions and WorkflowData with ActionMode field, populated from compiler state
  • Updated MCP renderers: Modified renderAgenticWorkflowsMCPConfigWithOptions and renderAgenticWorkflowsMCPConfigTOML to conditionally include --cmd flag
  • Engine integration: Updated all engines (Copilot, Claude, Codex, Custom) to pass action mode when creating MCP renderers

Result

Dev mode now generates:

"entrypointArgs": ["mcp-server", "--cmd", "/opt/gh-aw/gh-aw"]

Release mode remains:

"entrypointArgs": ["mcp-server"]

This ensures the MCP server can execute commands like compile, status, etc. by invoking the correct binary in containerized environments.

Original prompt

When the compiler generates the mcp server configuration for the agentic-workflows tool in dev mode, it must also pass the --cmd argument to the path of the binary executable.

              "agentic_workflows": {
                "container": "alpine:latest",
                "entrypoint": "/opt/gh-aw/gh-aw",
                "entrypointArgs": ["mcp-server"], # MISSING --cmd /opt/gh-aw/gh-aw !
                "mounts": ["/opt/gh-aw:/opt/gh-aw:ro", "/usr/bin/gh:/usr/bin/gh:ro", "${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"],
                "env": {
                  "GITHUB_TOKEN": "$GITHUB_TOKEN"
                }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 5, 2026 18:52
- Add ActionMode field to MCPRendererOptions struct
- Update renderAgenticWorkflowsMCPConfigWithOptions to add --cmd in dev mode
- Update renderAgenticWorkflowsMCPConfigTOML to add --cmd in dev mode
- Add ActionMode to WorkflowData and populate it from compiler
- Update all engines (Copilot, Claude, Codex, Custom) to pass action mode
- Add comprehensive tests for dev and release modes

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Update TestImportAgenticWorkflowsTool to check for the --cmd argument
that is now added in dev mode.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…dev mode

All tests passing, code formatted and linted successfully.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update mcp server configuration to include --cmd argument Add --cmd argument to agentic-workflows MCP server in dev mode Feb 5, 2026
Copilot AI requested a review from pelikhan February 5, 2026 19:04
@pelikhan pelikhan added the smoke label Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Changeset Generator failed. Please review the logs for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

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

@pelikhan pelikhan marked this pull request as ready for review February 5, 2026 19:08
Copilot AI review requested due to automatic review settings February 5, 2026 19:08
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Agent Container Tool Check ✅

Smoke test results for common development tools in agent container:

Tool Status Version
bash 5.2.21
sh available
git 2.52.0
jq 1.7
yq 4.50.1
curl 8.5.0
gh 2.86.0
node 20.20.0
python3 3.12.3
go 1.24.12
java ⚠️ Available but version check fails*
dotnet ⚠️ Available but version check fails*

Result: 10/12 tools fully functional ✅

* Java (21.0.10-7) and .NET binaries are present at their expected paths but cannot be executed directly in this bash environment (possibly a container security restriction or bash tool limitation). The binaries exist and are valid ELF executables.

Test Coverage:

  • ✅ Shell tools (bash, sh)
  • ✅ Version control (git)
  • ✅ Data processing (jq, yq)
  • ✅ HTTP tools (curl)
  • ✅ GitHub CLI (gh)
  • ✅ Scripting runtimes (node, python3, go)
  • ⚠️ Compiled runtimes (java, dotnet) - binaries present but execution restricted

Overall Status: PASS - All critical development tools are accessible ✅

AI generated by Agent Container Smoke Test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🧪 Smoke Test: PARTIAL PASS (8/9)

PRs Reviewed:

Test Results: ✅✅⚠️✅✅✅✅✅✅

⚠️ Serena MCP connection EOF error (minor)

Overall: PARTIAL PASS
Run: §21724735444

cc: @pelikhan @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the --cmd flag to the agentic-workflows MCP server configuration in dev mode, enabling the MCP server to execute workflow commands by specifying the binary path in containerized environments.

Changes:

  • Extended MCPRendererOptions and WorkflowData with ActionMode field to propagate compilation mode
  • Updated MCP renderers to conditionally include --cmd /opt/gh-aw/gh-aw flag in dev mode, omitting it in release mode
  • Integrated ActionMode into all engine MCP renderers (Copilot, Claude, Codex, Custom) with defensive defaults

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/mcp_renderer.go Added ActionMode field to MCPRendererOptions; updated unified renderer to conditionally include --cmd flag in TOML format
pkg/workflow/mcp_config_builtin.go Updated helper functions to accept ActionMode parameter and conditionally render --cmd flag in both JSON and TOML formats
pkg/workflow/compiler_types.go Extended WorkflowData struct with ActionMode field
pkg/workflow/compiler_orchestrator_workflow.go Populated ActionMode from compiler state when building WorkflowData
pkg/workflow/copilot_mcp.go Updated Copilot engine to extract and pass ActionMode to MCP renderer
pkg/workflow/claude_mcp.go Updated Claude engine to extract and pass ActionMode to MCP renderer
pkg/workflow/codex_mcp.go Updated Codex engine to extract and pass ActionMode to MCP renderer (both TOML and JSON renderers)
pkg/workflow/custom_engine.go Updated Custom engine to extract and pass ActionMode to MCP renderer
pkg/workflow/mcp_config_refactor_test.go Added comprehensive tests for dev and release modes in both Copilot and Claude/Custom configurations; updated TOML tests
pkg/workflow/importable_tools_test.go Updated integration test to expect --cmd flag in dev mode
.github/workflows/*.lock.yml Regenerated 20 workflow lock files with --cmd flag in dev mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit ab9e530 into main Feb 5, 2026
172 of 174 checks passed
@pelikhan pelikhan deleted the copilot/update-mcp-server-config branch February 5, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants