From 7d3f08fe8b783c007e10379a57de46486fc122f8 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 11:57:56 +0000
Subject: [PATCH 1/4] Initial plan
From 634df49ae1f1d8d7f297fd573aca92f6384eda8d Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 12:30:46 +0000
Subject: [PATCH 2/4] fix: correct double-npx entrypointArgs in MCP
auto-containerization and update sentry.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Fix getMCPConfig() in mcp_config_custom.go: when auto-assigning a container
for well-known commands like 'npx'/'uvx', the command was incorrectly
prepended to entrypointArgs (e.g. ["npx", "@sentry/mcp-server"]) causing
the container to run 'npx npx @sentry/mcp-server' instead of the correct
'npx @sentry/mcp-server'. Since the command is already set as the
container entrypoint, it must not also appear in entrypointArgs.
- Fix sentry.md: correct malformed 'allowed' entry
'search_docs requires SENTRY_OPENAI_API_KEY' → 'search_docs' (with comment),
and update @sentry/mcp-server from 0.32.0 to 0.33.0 (latest).
- Add TestNpxCommandAutoContainerization regression test to prevent recurrence.
- Recompile all workflow lock files with the fix applied.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/48310ee3-7b7c-429f-b427-d13a881a63cc
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
---
.../daily-token-consumption-report.lock.yml | 35 +++---
.github/workflows/mcp-inspector.lock.yml | 32 +++---
.github/workflows/shared/mcp/sentry.md | 4 +-
pkg/workflow/mcp_config_compilation_test.go | 103 ++++++++++++++++++
pkg/workflow/mcp_config_custom.go | 10 +-
5 files changed, 142 insertions(+), 42 deletions(-)
diff --git a/.github/workflows/daily-token-consumption-report.lock.yml b/.github/workflows/daily-token-consumption-report.lock.yml
index 7c8de381cad..f0ec4ac528c 100644
--- a/.github/workflows/daily-token-consumption-report.lock.yml
+++ b/.github/workflows/daily-token-consumption-report.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"b59b803d0c292f7cee6d8c1510af3c1404975f87c7dbb1c1765cbe7481dcf9e8","strict":true,"agent_id":"claude"}
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"4b4116ab371749cd0f03d811cee69873be5b2e57857cf38c16ce53b865301b7c","strict":true,"agent_id":"claude"}
# gh-aw-manifest: {"version":1,"secrets":["ANTHROPIC_API_KEY","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_ENDPOINT","GH_AW_OTEL_HEADERS","GITHUB_TOKEN","SENTRY_ACCESS_TOKEN","SENTRY_OPENAI_API_KEY"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28","digest":"sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28@sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28","digest":"sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28@sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28","digest":"sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28@sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.0","digest":"sha256:9c2228324fb1f26f39dc9471612e530ae3efc3156dac05efb2e8d212878d454d","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.0@sha256:9c2228324fb1f26f39dc9471612e530ae3efc3156dac05efb2e8d212878d454d"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]}
# ___ _ _
# / _ \ | | (_)
@@ -194,20 +194,20 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_c2d8a7429accdae8_EOF'
+ cat << 'GH_AW_PROMPT_1fb32aaa17158702_EOF'
- GH_AW_PROMPT_c2d8a7429accdae8_EOF
+ GH_AW_PROMPT_1fb32aaa17158702_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_c2d8a7429accdae8_EOF'
+ cat << 'GH_AW_PROMPT_1fb32aaa17158702_EOF'
Tools: create_issue, create_discussion, missing_tool, missing_data, noop
- GH_AW_PROMPT_c2d8a7429accdae8_EOF
+ GH_AW_PROMPT_1fb32aaa17158702_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_c2d8a7429accdae8_EOF'
+ cat << 'GH_AW_PROMPT_1fb32aaa17158702_EOF'
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -236,15 +236,15 @@ jobs:
{{/if}}
- GH_AW_PROMPT_c2d8a7429accdae8_EOF
+ GH_AW_PROMPT_1fb32aaa17158702_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_c2d8a7429accdae8_EOF'
+ cat << 'GH_AW_PROMPT_1fb32aaa17158702_EOF'
{{#runtime-import .github/workflows/shared/mcp/sentry.md}}
{{#runtime-import .github/workflows/shared/reporting.md}}
{{#runtime-import .github/workflows/shared/observability-otlp.md}}
{{#runtime-import .github/workflows/daily-token-consumption-report.md}}
- GH_AW_PROMPT_c2d8a7429accdae8_EOF
+ GH_AW_PROMPT_1fb32aaa17158702_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
@@ -444,9 +444,9 @@ jobs:
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
- cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_b6ef83b3ab8c9dd7_EOF'
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_2199e27042573ee0_EOF'
{"create_discussion":{"category":"audits","close_older_discussions":true,"expires":24,"fallback_to_issue":true,"max":1,"title_prefix":"[token-consumption] "},"create_issue":{"close_older_issues":true,"expires":24,"labels":["automation","observability","telemetry"],"max":1,"title_prefix":"[token-consumption] "},"create_report_incomplete_issue":{},"mentions":{"enabled":false},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}}
- GH_AW_SAFE_OUTPUTS_CONFIG_b6ef83b3ab8c9dd7_EOF
+ GH_AW_SAFE_OUTPUTS_CONFIG_2199e27042573ee0_EOF
- name: Write Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -674,7 +674,7 @@ jobs:
export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -e GITHUB_AW_OTEL_TRACE_ID -e GITHUB_AW_OTEL_PARENT_SPAN_ID -e SENTRY_ACCESS_TOKEN -e SENTRY_HOST -e SENTRY_OPENAI_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.3.0'
GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
- cat << GH_AW_MCP_CONFIG_9394d128fa8e66dd_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_ddfc84f75adf8397_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"github": {
@@ -711,8 +711,7 @@ jobs:
"container": "node:lts-alpine",
"entrypoint": "npx",
"entrypointArgs": [
- "npx",
- "@sentry/mcp-server@0.32.0"
+ "@sentry/mcp-server@0.33.0"
],
"tools": [
"whoami",
@@ -727,7 +726,7 @@ jobs:
"search_issues",
"find_dsns",
"analyze_issue_with_seer",
- "search_docs requires SENTRY_OPENAI_API_KEY",
+ "search_docs",
"get_doc"
],
"env": {
@@ -757,7 +756,7 @@ jobs:
}
}
}
- GH_AW_MCP_CONFIG_9394d128fa8e66dd_EOF
+ GH_AW_MCP_CONFIG_ddfc84f75adf8397_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
@@ -856,7 +855,7 @@ jobs:
# - mcp__sentry__get_event_attachment
# - mcp__sentry__get_issue_details
# - mcp__sentry__get_trace_details
- # - mcp__sentry__search_docs requires SENTRY_OPENAI_API_KEY
+ # - mcp__sentry__search_docs
# - mcp__sentry__search_events
# - mcp__sentry__search_issues
# - mcp__sentry__whoami
@@ -867,7 +866,7 @@ jobs:
(umask 177 && touch /tmp/gh-aw/agent-stdio.log)
# shellcheck disable=SC1003
sudo -E awf --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" --tty --env-all --exclude-env ANTHROPIC_API_KEY --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --allow-domains '*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --image-tag 0.25.28,squid=sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474,agent=sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a,api-proxy=sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb,cli-proxy=sha256:fdf310e4678ce58d248c466b89399e9680a3003038fd19322c388559016aaac7 --skip-pull --enable-api-proxy \
- -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --no-chrome --mcp-config "${{ runner.temp }}/gh-aw/mcp-config/mcp-servers.json" --allowed-tools '\''Bash,BashOutput,Edit,ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,NotebookEdit,NotebookRead,Read,Task,TodoWrite,Write,mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__safeoutputs,mcp__sentry__analyze_issue_with_seer,mcp__sentry__find_dsns,mcp__sentry__find_organizations,mcp__sentry__find_projects,mcp__sentry__find_releases,mcp__sentry__find_teams,mcp__sentry__get_doc,mcp__sentry__get_event_attachment,mcp__sentry__get_issue_details,mcp__sentry__get_trace_details,mcp__sentry__search_docs requires SENTRY_OPENAI_API_KEY,mcp__sentry__search_events,mcp__sentry__search_issues,mcp__sentry__whoami'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log
+ -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --no-chrome --mcp-config "${{ runner.temp }}/gh-aw/mcp-config/mcp-servers.json" --allowed-tools Bash,BashOutput,Edit,ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,NotebookEdit,NotebookRead,Read,Task,TodoWrite,Write,mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__safeoutputs,mcp__sentry__analyze_issue_with_seer,mcp__sentry__find_dsns,mcp__sentry__find_organizations,mcp__sentry__find_projects,mcp__sentry__find_releases,mcp__sentry__find_teams,mcp__sentry__get_doc,mcp__sentry__get_event_attachment,mcp__sentry__get_issue_details,mcp__sentry__get_trace_details,mcp__sentry__search_docs,mcp__sentry__search_events,mcp__sentry__search_issues,mcp__sentry__whoami --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
BASH_DEFAULT_TIMEOUT_MS: 60000
diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml
index fc2a997c489..af79fec33be 100644
--- a/.github/workflows/mcp-inspector.lock.yml
+++ b/.github/workflows/mcp-inspector.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"b751a226d62b7369f05b1e8f290de3d6304bfb3516451276e6710881734c1481","agent_id":"copilot"}
+# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"2bc8fcf2885cb191557b096663b387ccd62820e80f9adb83cf151e1f7987d4a0","agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["AZURE_CLIENT_ID","AZURE_CLIENT_SECRET","AZURE_TENANT_ID","BRAVE_API_KEY","CONTEXT7_API_KEY","COPILOT_GITHUB_TOKEN","DD_API_KEY","DD_APPLICATION_KEY","DD_SITE","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_ENDPOINT","GH_AW_OTEL_HEADERS","GITHUB_TOKEN","NOTION_API_TOKEN","SENTRY_ACCESS_TOKEN","SENTRY_OPENAI_API_KEY","SLACK_BOT_TOKEN","TAVILY_API_KEY"],"actions":[{"repo":"actions/cache/restore","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/cache/save","sha":"27d5ce7f107fe9357f9df03efb73ab90386fccae","version":"v5.0.5"},{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-go","sha":"4a3601121dd01d1626a1e23e37211e3254c1c06c","version":"v6.4.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/setup-python","sha":"a309ff8b426b58ec0e2a45f0f869d46889d02405","version":"v6.2.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"astral-sh/setup-uv","sha":"08807647e7069bb48b6ef5acd8ec9567f424441b","version":"v8.1.0"},{"repo":"docker/build-push-action","sha":"bcafcacb16a39f128d818304e6c9c0c18556b85f","version":"v7.1.0"},{"repo":"docker/setup-buildx-action","sha":"4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd","version":"v4"}],"containers":[{"image":"docker.io/mcp/brave-search","digest":"sha256:ca96b8acb27d8cf601a8faef86a084602cffa41d8cb18caa1e29ba4d16989d22","pinned_image":"docker.io/mcp/brave-search@sha256:ca96b8acb27d8cf601a8faef86a084602cffa41d8cb18caa1e29ba4d16989d22"},{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28","digest":"sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28@sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28","digest":"sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28@sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28","digest":"sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28@sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.0","digest":"sha256:9c2228324fb1f26f39dc9471612e530ae3efc3156dac05efb2e8d212878d454d","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.0@sha256:9c2228324fb1f26f39dc9471612e530ae3efc3156dac05efb2e8d212878d454d"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"ghcr.io/github/serena-mcp-server:latest","digest":"sha256:bf343399e3725c45528f531a230f3a04521d4cdef29f9a5af6282ff0d3c393c5","pinned_image":"ghcr.io/github/serena-mcp-server:latest@sha256:bf343399e3725c45528f531a230f3a04521d4cdef29f9a5af6282ff0d3c393c5"},{"image":"mcp/arxiv-mcp-server","digest":"sha256:6dc6bba6dfed97f4ad6eb8d23a5c98ef5b7fa6184937d54b2d675801cd9dd29e","pinned_image":"mcp/arxiv-mcp-server@sha256:6dc6bba6dfed97f4ad6eb8d23a5c98ef5b7fa6184937d54b2d675801cd9dd29e"},{"image":"mcp/ast-grep:latest","digest":"sha256:5fc3f2e9dcf2c019e92662f608b8d89e12134ed6d91e6f5461de6efd506a1e72","pinned_image":"mcp/ast-grep:latest@sha256:5fc3f2e9dcf2c019e92662f608b8d89e12134ed6d91e6f5461de6efd506a1e72"},{"image":"mcp/context7","digest":"sha256:1174e6a29634a83b2be93ac1fefabf63265f498c02c72201fe3464e687dd8836","pinned_image":"mcp/context7@sha256:1174e6a29634a83b2be93ac1fefabf63265f498c02c72201fe3464e687dd8836"},{"image":"mcp/markitdown","digest":"sha256:1cef3bf502503310ed0884441874ccf6cdaac20136dc1179797fa048269dc4cb","pinned_image":"mcp/markitdown@sha256:1cef3bf502503310ed0884441874ccf6cdaac20136dc1179797fa048269dc4cb"},{"image":"mcp/memory","digest":"sha256:db0c2db07a44b6797eba7a832b1bda142ffc899588aae82c92780cbb2252407f","pinned_image":"mcp/memory@sha256:db0c2db07a44b6797eba7a832b1bda142ffc899588aae82c92780cbb2252407f"},{"image":"mcp/notion","digest":"sha256:4de8eb0de33402fcbd3740b4f4039918e4893155c7ea833c7a0c472001b88367","pinned_image":"mcp/notion@sha256:4de8eb0de33402fcbd3740b4f4039918e4893155c7ea833c7a0c472001b88367"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"},{"image":"python:alpine","digest":"sha256:6f873e340e6786787a632c919ecfb1d2301eb33ccfbe9f0d0add16cbc0892116","pinned_image":"python:alpine@sha256:6f873e340e6786787a632c919ecfb1d2301eb33ccfbe9f0d0add16cbc0892116"}]}
# ___ _ _
# / _ \ | | (_)
@@ -236,22 +236,22 @@ jobs:
run: |
bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
{
- cat << 'GH_AW_PROMPT_18842998a3b04ffc_EOF'
+ cat << 'GH_AW_PROMPT_d3811a010e7a75bc_EOF'
- GH_AW_PROMPT_18842998a3b04ffc_EOF
+ GH_AW_PROMPT_d3811a010e7a75bc_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/agentic_workflows_guide.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/cache_memory_prompt.md"
cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
- cat << 'GH_AW_PROMPT_18842998a3b04ffc_EOF'
+ cat << 'GH_AW_PROMPT_d3811a010e7a75bc_EOF'
Tools: create_discussion, missing_tool, missing_data, noop, notion_add_comment, post_to_slack_channel
- GH_AW_PROMPT_18842998a3b04ffc_EOF
+ GH_AW_PROMPT_d3811a010e7a75bc_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
- cat << 'GH_AW_PROMPT_18842998a3b04ffc_EOF'
+ cat << 'GH_AW_PROMPT_d3811a010e7a75bc_EOF'
The following GitHub context information is available for this workflow:
{{#if __GH_AW_GITHUB_ACTOR__ }}
@@ -280,9 +280,9 @@ jobs:
{{/if}}
- GH_AW_PROMPT_18842998a3b04ffc_EOF
+ GH_AW_PROMPT_d3811a010e7a75bc_EOF
cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
- cat << 'GH_AW_PROMPT_18842998a3b04ffc_EOF'
+ cat << 'GH_AW_PROMPT_d3811a010e7a75bc_EOF'
## Serena Code Analysis
@@ -333,7 +333,7 @@ jobs:
{{#runtime-import .github/workflows/shared/reporting.md}}
{{#runtime-import .github/workflows/shared/observability-otlp.md}}
{{#runtime-import .github/workflows/mcp-inspector.md}}
- GH_AW_PROMPT_18842998a3b04ffc_EOF
+ GH_AW_PROMPT_d3811a010e7a75bc_EOF
} > "$GH_AW_PROMPT"
- name: Interpolate variables and render templates
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
@@ -619,9 +619,9 @@ jobs:
mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
mkdir -p /tmp/gh-aw/safeoutputs
mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
- cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_960aed403ba3de7d_EOF'
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_015830158ad6d21c_EOF'
{"create_discussion":{"category":"audits","close_older_discussions":true,"expires":24,"fallback_to_issue":true,"max":1,"title_prefix":"[mcp-inspector] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"notion-add-comment":{"description":"Add a comment to a Notion page","inputs":{"comment":{"default":null,"description":"The comment text to add","required":true,"type":"string"}},"output":"Comment added to Notion successfully!"},"post-to-slack-channel":{"description":"Post a message to a Slack channel. Message must be 200 characters or less. Supports basic Slack markdown: *bold*, _italic_, ~strike~, `code`, ```code block```, \u003equote, and links \u003curl|text\u003e. Requires GH_AW_SLACK_CHANNEL_ID environment variable to be set.","inputs":{"message":{"default":null,"description":"The message to post (max 200 characters, supports Slack markdown)","required":true,"type":"string"}},"output":"Message posted to Slack successfully!"},"report_incomplete":{}}
- GH_AW_SAFE_OUTPUTS_CONFIG_960aed403ba3de7d_EOF
+ GH_AW_SAFE_OUTPUTS_CONFIG_015830158ad6d21c_EOF
- name: Write Safe Outputs Tools
env:
GH_AW_TOOLS_META_JSON: |
@@ -864,7 +864,7 @@ jobs:
mkdir -p /home/runner/.copilot
GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
- cat << GH_AW_MCP_CONFIG_a6405b85ec3cb7c2_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
+ cat << GH_AW_MCP_CONFIG_e262e4beb7fa1e28_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
{
"mcpServers": {
"agenticworkflows": {
@@ -999,7 +999,6 @@ jobs:
"container": "python:alpine",
"entrypoint": "uvx",
"entrypointArgs": [
- "uvx",
"microsoft-fabric-rti-mcp"
],
"tools": [
@@ -1134,8 +1133,7 @@ jobs:
"container": "node:lts-alpine",
"entrypoint": "npx",
"entrypointArgs": [
- "npx",
- "@sentry/mcp-server@0.32.0"
+ "@sentry/mcp-server@0.33.0"
],
"tools": [
"whoami",
@@ -1150,7 +1148,7 @@ jobs:
"search_issues",
"find_dsns",
"analyze_issue_with_seer",
- "search_docs requires SENTRY_OPENAI_API_KEY",
+ "search_docs",
"get_doc"
],
"env": {
@@ -1229,7 +1227,7 @@ jobs:
}
}
}
- GH_AW_MCP_CONFIG_a6405b85ec3cb7c2_EOF
+ GH_AW_MCP_CONFIG_e262e4beb7fa1e28_EOF
- name: Mount MCP servers as CLIs
id: mount-mcp-clis
continue-on-error: true
diff --git a/.github/workflows/shared/mcp/sentry.md b/.github/workflows/shared/mcp/sentry.md
index 276838c9ca5..b65f17775be 100644
--- a/.github/workflows/shared/mcp/sentry.md
+++ b/.github/workflows/shared/mcp/sentry.md
@@ -2,7 +2,7 @@
mcp-servers:
sentry:
command: "npx"
- args: ["@sentry/mcp-server@0.32.0"]
+ args: ["@sentry/mcp-server@0.33.0"]
allowed:
- whoami
- find_organizations
@@ -16,7 +16,7 @@ mcp-servers:
- search_issues
- find_dsns
- analyze_issue_with_seer
- - search_docs requires SENTRY_OPENAI_API_KEY
+ - search_docs # requires SENTRY_OPENAI_API_KEY
- get_doc
env:
SENTRY_ACCESS_TOKEN: ${{ secrets.SENTRY_ACCESS_TOKEN }}
diff --git a/pkg/workflow/mcp_config_compilation_test.go b/pkg/workflow/mcp_config_compilation_test.go
index caf15796e40..5f75734603d 100644
--- a/pkg/workflow/mcp_config_compilation_test.go
+++ b/pkg/workflow/mcp_config_compilation_test.go
@@ -522,3 +522,106 @@ This workflow tests that agentic-workflows uses the correct container in dev mod
})
}
}
+
+// TestNpxCommandAutoContainerization verifies that `command: "npx"` with args is auto-converted to a
+// containerized stdio server without duplicating the command in entrypointArgs.
+// Regression test for https://github.com/github/gh-aw/issues/NNN — "npx npx" double-command bug.
+func TestNpxCommandAutoContainerization(t *testing.T) {
+ tests := []struct {
+ name string
+ command string
+ args string
+ wantImage string
+ wantEntry string
+ wantFirstArg string
+ }{
+ {
+ name: "npx command with package arg",
+ command: "npx",
+ args: `["@sentry/mcp-server@0.33.0"]`,
+ wantImage: "node:lts-alpine",
+ wantEntry: "npx",
+ wantFirstArg: "@sentry/mcp-server@0.33.0",
+ },
+ {
+ name: "npx command with -y flag and package",
+ command: "npx",
+ args: `["-y", "@modelcontextprotocol/server-memory"]`,
+ wantImage: "node:lts-alpine",
+ wantEntry: "npx",
+ wantFirstArg: "-y",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ workflowContent := `---
+on:
+ workflow_dispatch:
+strict: false
+permissions:
+ contents: read
+engine: copilot
+mcp-servers:
+ my-server:
+ command: "` + tt.command + `"
+ args: ` + tt.args + `
+---
+
+# Test workflow
+`
+ tmpFile, err := os.CreateTemp("", "test-npx-container-*.md")
+ if err != nil {
+ t.Fatalf("Failed to create temp file: %v", err)
+ }
+ defer os.Remove(tmpFile.Name())
+
+ if _, err := tmpFile.WriteString(workflowContent); err != nil {
+ t.Fatalf("Failed to write workflow content: %v", err)
+ }
+ tmpFile.Close()
+
+ compiler := NewCompiler()
+ compiler.SetSkipValidation(true)
+
+ workflowData, err := compiler.ParseWorkflowFile(tmpFile.Name())
+ if err != nil {
+ t.Fatalf("Failed to parse workflow file: %v", err)
+ }
+
+ yamlContent, _, _, err := compiler.generateYAML(workflowData, tmpFile.Name())
+ if err != nil {
+ t.Fatalf("Failed to generate YAML: %v", err)
+ }
+
+ serverIdx := strings.Index(yamlContent, `"my-server"`)
+ if serverIdx == -1 {
+ t.Fatal("Could not find my-server block in generated YAML")
+ }
+ endIdx := min(serverIdx+800, len(yamlContent))
+ serverBlock := yamlContent[serverIdx:endIdx]
+
+ // container must be auto-assigned
+ if !strings.Contains(serverBlock, `"container": "`+tt.wantImage+`"`) {
+ t.Errorf("Expected container=%q in server block; got:\n%s", tt.wantImage, serverBlock)
+ }
+
+ // entrypoint must be the command
+ if !strings.Contains(serverBlock, `"entrypoint": "`+tt.wantEntry+`"`) {
+ t.Errorf("Expected entrypoint=%q in server block; got:\n%s", tt.wantEntry, serverBlock)
+ }
+
+ // entrypointArgs must NOT start with the command itself (no double "npx"/"uvx")
+ badPattern := `"entrypointArgs":\s*\[\s*"` + tt.command + `"`
+ if matched, _ := regexp.MatchString(badPattern, serverBlock); matched {
+ t.Errorf("entrypointArgs must NOT begin with %q (the command is already the entrypoint and must not be duplicated); got:\n%s",
+ tt.command, serverBlock)
+ }
+
+ // entrypointArgs must start with the first actual arg
+ if !strings.Contains(serverBlock, `"`+tt.wantFirstArg+`"`) {
+ t.Errorf("Expected first entrypointArg %q in server block; got:\n%s", tt.wantFirstArg, serverBlock)
+ }
+ })
+ }
+}
diff --git a/pkg/workflow/mcp_config_custom.go b/pkg/workflow/mcp_config_custom.go
index 2b827e9f021..6941eac35cc 100644
--- a/pkg/workflow/mcp_config_custom.go
+++ b/pkg/workflow/mcp_config_custom.go
@@ -759,11 +759,11 @@ func getMCPConfig(toolConfig map[string]any, toolName string) (*parser.RegistryM
mcpCustomLog.Printf("Auto-assigning container for command '%s': %s", result.Command, containerConfig.Image)
result.Container = containerConfig.Image
result.Entrypoint = containerConfig.Entrypoint
- // Move command to entrypointArgs and preserve existing args after it
- if result.Command != "" {
- result.EntrypointArgs = append([]string{result.Command}, result.Args...)
- result.Args = nil // Clear args since they're now in entrypointArgs
- }
+ // The command becomes the container entrypoint; original args become entrypointArgs.
+ // Do NOT prepend the command to entrypointArgs — the entrypoint field already carries it,
+ // and prepending would cause it to appear twice (e.g. "npx npx @sentry/mcp-server").
+ result.EntrypointArgs = result.Args
+ result.Args = nil // Clear args since they're now in entrypointArgs
result.Command = "" // Clear command since it's now the entrypoint
}
}
From bb9435e86dd900a62a3bf774703c196e5b4d6ecc Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Apr 2026 12:35:40 +0000
Subject: [PATCH 3/4] fix: remove placeholder issue reference in test comment
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/48310ee3-7b7c-429f-b427-d13a881a63cc
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
---
pkg/workflow/mcp_config_compilation_test.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pkg/workflow/mcp_config_compilation_test.go b/pkg/workflow/mcp_config_compilation_test.go
index 5f75734603d..dc3fe88b725 100644
--- a/pkg/workflow/mcp_config_compilation_test.go
+++ b/pkg/workflow/mcp_config_compilation_test.go
@@ -525,7 +525,9 @@ This workflow tests that agentic-workflows uses the correct container in dev mod
// TestNpxCommandAutoContainerization verifies that `command: "npx"` with args is auto-converted to a
// containerized stdio server without duplicating the command in entrypointArgs.
-// Regression test for https://github.com/github/gh-aw/issues/NNN — "npx npx" double-command bug.
+// Regression test: the auto-containerization previously prepended the command (e.g. "npx") to
+// entrypointArgs, which caused Docker to run "npx npx @sentry/mcp-server" instead of the correct
+// "npx @sentry/mcp-server", resulting in the MCP server exposing 0 tools.
func TestNpxCommandAutoContainerization(t *testing.T) {
tests := []struct {
name string
From 345247f632d9f6fa49fac8cffeb2b34f076fdd5e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 28 Apr 2026 14:24:40 +0000
Subject: [PATCH 4/4] docs: add draft ADR-28930 for MCP auto-containerization
entrypoint/arg separation
Generated by Design Decision Gate workflow. Documents the contract that
the command field becomes the container entrypoint, not the first element
of entrypointArgs, when auto-containerizing npx/uvx-based MCP servers.
Co-Authored-By: Claude Sonnet 4.6
---
...tainerization-entrypoint-arg-separation.md | 67 +++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 docs/adr/28930-mcp-server-auto-containerization-entrypoint-arg-separation.md
diff --git a/docs/adr/28930-mcp-server-auto-containerization-entrypoint-arg-separation.md b/docs/adr/28930-mcp-server-auto-containerization-entrypoint-arg-separation.md
new file mode 100644
index 00000000000..3d5a8608d81
--- /dev/null
+++ b/docs/adr/28930-mcp-server-auto-containerization-entrypoint-arg-separation.md
@@ -0,0 +1,67 @@
+# ADR-28930: MCP Server Auto-Containerization — Entrypoint/Arg Separation Contract
+
+**Date**: 2026-04-28
+**Status**: Draft
+**Deciders**: pelikhan, copilot-swe-agent
+
+---
+
+## Part 1 — Narrative (Human-Friendly)
+
+### Context
+
+The agentic workflow compiler auto-containerizes MCP servers whose `command` field matches a known package-manager binary (`npx`, `uvx`). When no explicit `container` is specified in the workflow frontmatter, `getMCPConfig()` selects an appropriate container image and rewrites the server config so that Docker can run it. A container launch requires two distinct pieces of configuration: the `entrypoint` (the executable the container starts with) and `entrypointArgs` (the arguments passed to that executable). An earlier implementation conflated these by prepending the command to `entrypointArgs` after also assigning it to `entrypoint`, causing Docker to receive `npx npx @sentry/mcp-server` instead of `npx @sentry/mcp-server` — which exposed zero tools and silently broke any workflow that relied on Sentry MCP.
+
+### Decision
+
+We will maintain a strict separation between the container `entrypoint` and `entrypointArgs` during auto-containerization: the `command` field is moved to `entrypoint` as-is, and the original `args` are assigned to `entrypointArgs` unchanged without any prepending of the command. Both `command` and `args` are then cleared on the result struct to prevent double-interpretation downstream. This contract makes the relationship between the source workflow config and the generated Docker invocation unambiguous and testable.
+
+### Alternatives Considered
+
+#### Alternative 1: Keep command as process command, not container entrypoint
+
+Instead of setting a container `entrypoint`, leave the command as the process command and pass `[command, ...args]` as the arguments to the default container entrypoint (e.g., `sh -c`). This would avoid the entrypoint/arg split entirely. It was not chosen because the container images used (`node:lts-alpine`, `python:alpine`) do not default to a shell entrypoint suitable for running npm packages — setting `entrypoint: npx` directly is the intended usage pattern for these images.
+
+#### Alternative 2: Require explicit container configuration for all MCP servers
+
+Remove auto-containerization entirely and require workflow authors to specify `container`, `entrypoint`, and `entrypointArgs` explicitly when they want containerized stdio servers. This would eliminate the implicit rewriting that caused the bug. It was not chosen because auto-containerization is a significant developer-experience feature that reduces boilerplate for the common case of `npx`- and `uvx`-based MCP servers; the correct fix is to make the implicit behavior correct, not to remove it.
+
+### Consequences
+
+#### Positive
+- Docker receives the correct invocation (`npx @sentry/mcp-server`) and all declared MCP tools are exposed to the agent.
+- The auto-containerization contract is now covered by a regression test (`TestNpxCommandAutoContainerization`) that explicitly asserts the command is not duplicated in `entrypointArgs`.
+
+#### Negative
+- All compiled lock files that referenced servers with `command: npx` or `command: uvx` must be recompiled to remove the erroneously prepended command argument; this is a one-time migration cost.
+
+#### Neutral
+- The `command` and `args` fields are both cleared to empty/nil after the rewrite; downstream code must not assume they retain their original values after `getMCPConfig()` runs for an auto-containerized server.
+- The `@sentry/mcp-server` dependency was bumped from `0.32.0` to `0.33.0` as part of this fix; the version change is incidental to the architectural contract.
+
+---
+
+## Part 2 — Normative Specification (RFC 2119)
+
+> The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this section are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
+
+### MCP Auto-Containerization Entrypoint Contract
+
+1. When `getMCPConfig()` auto-assigns a container for a well-known command (e.g., `npx`, `uvx`), implementations **MUST** set `result.Entrypoint` to the value of `result.Command` and **MUST NOT** also include that command value as the first element of `result.EntrypointArgs`.
+2. Implementations **MUST** set `result.EntrypointArgs` to `result.Args` directly (the original args from the workflow config), without prepending the command.
+3. Implementations **MUST** set `result.Command` to the empty string after assigning it to `result.Entrypoint`, so that the command is not interpreted twice by downstream config serialization.
+4. Implementations **MUST** set `result.Args` to `nil` after assigning it to `result.EntrypointArgs`, so that args are not serialized in both fields.
+5. Implementations **SHOULD** include a regression test that asserts the first element of `entrypointArgs` in generated YAML is not the well-known command itself when that command is used as the `entrypoint`.
+
+### Conformance Testing
+
+1. Implementations **MUST** provide at least one test case per supported well-known command (`npx`, `uvx`) that parses a workflow with `command: ` and verifies the generated YAML `entrypointArgs` does not begin with the command string.
+2. Test cases **SHOULD** cover both bare package arguments (e.g., `["@sentry/mcp-server@0.33.0"]`) and flag-prefixed arguments (e.g., `["-y", "@modelcontextprotocol/server-memory"]`).
+
+### Conformance
+
+An implementation is considered conformant with this ADR if it satisfies all **MUST** and **MUST NOT** requirements above. Any implementation where the container entrypoint and the first element of `entrypointArgs` are identical (both equal to the well-known command) is non-conformant.
+
+---
+
+*This is a DRAFT ADR generated by the [Design Decision Gate](https://github.com/github/gh-aw/actions/runs/25058262146) workflow. The PR author must review, complete, and finalize this document before the PR can merge.*