Skip to content

bug: MCP server config for the custom agent does not support environment variable substitution #2746

@Konippi

Description

@Konippi

Checks

Operating system

macOS 15.6 (24G84)

Expected behaviour

The MCP server configuration loading does not process environment variable substitution in the env section of server configurations. Environment variables specified with ${env:VARIABLE_NAME} syntax are not being replaced with their actual values.

Actual behaviour

Environment variables are not being replace.

Steps to reproduce

No response

Environment

When loading MCP server configuration, environment variables in the env section should be substituted with their actual values. For example:

{
  "mcpServers": {
    "database-server": {
      "command": "node",
      "args": ["server.js"],
      "env": {
        "DATABASE_URL": "${env:DB_URL}",
        "PORT": "${env:SERVER_PORT}"
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions