chore(dogfood): add CODER_AGENT_EXP_MCP_CONFIG_FILES env var (#24664)

Set CODER_AGENT_EXP_MCP_CONFIG_FILES to ~/.mcp.json,.mcp.json so the
Coder agent reads both the harness-managed global MCP config and any
project-local .mcp.json. The agent resolves .mcp.json relative to its
manifest Directory (~/coder), so without this env var, a ~/.mcp.json
written by a user harness would be invisible to the agent.

Multiple files are merged by Manager.Connect; first file wins on name
conflicts. Missing files are silently skipped.
This commit is contained in:
Mathias Fredriksson
2026-04-23 13:07:20 +03:00
committed by GitHub
parent 135ab29aa8
commit 7e29a67b50
+1
View File
@@ -501,6 +501,7 @@ resource "coder_agent" "dev" {
env = merge(
{
OIDC_TOKEN : data.coder_workspace_owner.me.oidc_access_token,
CODER_AGENT_EXP_MCP_CONFIG_FILES : "~/.mcp.json,.mcp.json",
},
data.coder_parameter.use_ai_bridge.value ? {
ANTHROPIC_BASE_URL : "https://dev.coder.com/api/v2/aibridge/anthropic",