From 57ce876bea570d95cc029abc8f7b5523b728c5bf Mon Sep 17 00:00:00 2001 From: POWERFULMOVES <142271328+POWERFULMOVES@users.noreply.github.com> Date: Mon, 6 Jul 2026 08:37:56 -0400 Subject: [PATCH 1/3] =?UTF-8?q?fix(compose):=20drop=20MCP=5FSERVER=5FTOKEN?= =?UTF-8?q?=20hard-require=20per=20CANONICAL=5FNAMES=20=C2=A75?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ${MCP_SERVER_TOKEN:?...} interpolation hard-require on agent-zero's env list made every compose invocation against the shared file fail on nodes without the var — blocking bring-up of unrelated services (model-registry on Knuckles, 2026-07-06). §5 canon: compose omits the var entirely; env.tier-agent provides A0_SET_mcp_server_token when the operator pins one, else Agent Zero auto-generates at startup. Documents the slot in env.tier-agent.example. Co-Authored-By: Claude Fable 5 --- pmoves/docker-compose.yml | 7 ++++++- pmoves/env.tier-agent.example | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pmoves/docker-compose.yml b/pmoves/docker-compose.yml index cb4030f721..037342327b 100644 --- a/pmoves/docker-compose.yml +++ b/pmoves/docker-compose.yml @@ -2643,7 +2643,12 @@ services: - A0_SET_browser_model_name=tensorzero::function_name::agent_zero - A0_SET_browser_model_api_base=http://tensorzero-gateway:3000/openai/v1 - A0_SET_a2a_server_enabled=true - - A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:?MCP_SERVER_TOKEN must be set when a2a_server_enabled=true} + # A0_SET_mcp_server_token intentionally NOT set here (CANONICAL_NAMES.md §5): + # env_file env.tier-agent provides it when the operator has pinned a token; + # otherwise Agent Zero auto-generates one at startup. The previous + # ${MCP_SERVER_TOKEN:?...} hard-require made *every* compose invocation on + # the shared file fail interpolation on nodes without the var — blocking + # bring-up of unrelated services (hit on Knuckles 2026-07-06). # Host environment leak guard (see x-host-leak-guard docs above) - SSL_CERT_FILE= - SSL_CERT_DIR= diff --git a/pmoves/env.tier-agent.example b/pmoves/env.tier-agent.example index 94bf57382d..91721aa87f 100644 --- a/pmoves/env.tier-agent.example +++ b/pmoves/env.tier-agent.example @@ -74,3 +74,11 @@ DEEPRESEARCH_NOTEBOOK_EMBED=true # Discord Publisher (optional) # --------------------------------------------------------------------------- DISCORD_WEBHOOK_URL= # Optional: Discord webhook for notifications + +# --------------------------------------------------------------------------- +# Agent Zero MCP server token (CANONICAL_NAMES.md §5) +# --------------------------------------------------------------------------- +# Canonical home for the MCP/a2a token. Compose intentionally does NOT set +# A0_SET_mcp_server_token in its env list — pin it here to make it durable, +# or leave unset and Agent Zero auto-generates one at startup. +# A0_SET_mcp_server_token= From 91dd40012a29dfda511f6e33155626c7584c1638 Mon Sep 17 00:00:00 2001 From: POWERFULMOVES <142271328+POWERFULMOVES@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:47:13 -0400 Subject: [PATCH 2/3] fix(compose): preserve pinned MCP_SERVER_TOKEN (soft default, not full removal) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex P2 on #1977: dropping the A0_SET_mcp_server_token mapping entirely means nodes that pinned MCP_SERVER_TOKEN lose it — Agent Zero reads A0_SET_* (not the plain env var), so it auto-generates instead of honoring the pin. Restore the mapping with a soft default ${MCP_SERVER_TOKEN:-} (not the old :? hard-require), keeping the Knuckles bring-up fix (no interpolation hard-fail) while bridging a pinned token to Agent Zero's setting. Co-Authored-By: Claude Opus 4.8 --- pmoves/docker-compose.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pmoves/docker-compose.yml b/pmoves/docker-compose.yml index 037342327b..c44130c3de 100644 --- a/pmoves/docker-compose.yml +++ b/pmoves/docker-compose.yml @@ -2643,12 +2643,14 @@ services: - A0_SET_browser_model_name=tensorzero::function_name::agent_zero - A0_SET_browser_model_api_base=http://tensorzero-gateway:3000/openai/v1 - A0_SET_a2a_server_enabled=true - # A0_SET_mcp_server_token intentionally NOT set here (CANONICAL_NAMES.md §5): - # env_file env.tier-agent provides it when the operator has pinned a token; - # otherwise Agent Zero auto-generates one at startup. The previous - # ${MCP_SERVER_TOKEN:?...} hard-require made *every* compose invocation on - # the shared file fail interpolation on nodes without the var — blocking - # bring-up of unrelated services (hit on Knuckles 2026-07-06). + # A0_SET_mcp_server_token: soft default (CANONICAL_NAMES.md §5). The previous + # ${MCP_SERVER_TOKEN:?...} hard-require made *every* compose invocation on the + # shared file fail interpolation on nodes without the var — blocking bring-up + # of unrelated services (hit on Knuckles 2026-07-06). Use ${...:-} not :? — + # a pinned MCP_SERVER_TOKEN is STILL bridged to Agent Zero's setting (Codex + # #1977: AZ reads A0_SET_* not the plain env var, so the pin must be mapped); + # unset → empty, no hard-fail, Agent Zero auto-generates at startup. + - A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:-} # Host environment leak guard (see x-host-leak-guard docs above) - SSL_CERT_FILE= - SSL_CERT_DIR= From 7d872ac5f28993b3271aafd0bb7927614c989b8e Mon Sep 17 00:00:00 2001 From: POWERFULMOVES <142271328+POWERFULMOVES@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:48:10 -0400 Subject: [PATCH 3/3] fix(compose): regenerate agents overlay after MCP token soft-default --- pmoves/docker-compose.agents.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pmoves/docker-compose.agents.yml b/pmoves/docker-compose.agents.yml index 1c31c87ae0..dbcb342d35 100644 --- a/pmoves/docker-compose.agents.yml +++ b/pmoves/docker-compose.agents.yml @@ -85,7 +85,14 @@ services: - A0_SET_browser_model_name=tensorzero::function_name::agent_zero - A0_SET_browser_model_api_base=http://tensorzero-gateway:3000/openai/v1 - A0_SET_a2a_server_enabled=true - - A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:?MCP_SERVER_TOKEN must be set when a2a_server_enabled=true} + # A0_SET_mcp_server_token: soft default (CANONICAL_NAMES.md §5). The previous + # ${MCP_SERVER_TOKEN:?...} hard-require made *every* compose invocation on the + # shared file fail interpolation on nodes without the var — blocking bring-up + # of unrelated services (hit on Knuckles 2026-07-06). Use ${...:-} not :? — + # a pinned MCP_SERVER_TOKEN is STILL bridged to Agent Zero's setting (Codex + # #1977: AZ reads A0_SET_* not the plain env var, so the pin must be mapped); + # unset → empty, no hard-fail, Agent Zero auto-generates at startup. + - A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:-} # Host environment leak guard (see x-host-leak-guard docs above) - SSL_CERT_FILE= - SSL_CERT_DIR=