Skip to content

MCP server env vars with ${VAR} syntax no longer expanded in v0.0.407 #1403

@jamesc

Description

@jamesc

Environment variable references using ${VAR} syntax in mcp-config.json env values stopped being
expanded in Copilot CLI v0.0.407. The literal string (e.g., "${LINEAR_API_TOKEN}") is passed to
the MCP server instead of the resolved value.

This worked in v0.0.406.

Reproduction:

~/.copilot/mcp-config.json:

   {
     "mcpServers": {
       "linear": {
         "type": "stdio",
         "command": "npx",
         "tools": ["*"],
         "args": ["-y", "github:obra/streamlinear"],
         "env": {
           "LINEAR_API_TOKEN": "${LINEAR_API_TOKEN}"
         }
       }
     }
   }

With LINEAR_API_TOKEN set in the shell environment:

  • v0.0.406: MCP server receives the actual token → connects successfully
  • v0.0.407: MCP server receives the literal string ${LINEAR_API_TOKEN} → auth fails

Logs (v0.0.407):

   Starting MCP client for linear with command: npx
   [mcp server linear stderr] Error: Authentication required, not authenticated
       at graphql (streamlinear/mcp/dist/index.js:20858:11)
   MCP transport for linear closed
   Failed to start MCP client for linear: McpError: MCP error -32000: Connection closed

Logs (v0.0.406, same config):

   MCP client for linear connected, took 2188ms
   Started MCP client for linear

Workaround: Hard-code the token value directly in mcp-config.json instead of using ${VAR}
references.

Expected behavior: ${VAR} in env values should be expanded from the current shell environment, as
it was in v0.0.406.

Environment: Linux (devcontainer), Node v24.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions