Skip to content

${VAR} env-var interpolation in MCP server config still not working on v0.5.19 #656

Description

@FrankTub

Follow-up to #635 (closed as resolved in v0.5.19).

Problem

Environment variable interpolation in MCP server environment config is still not working on v0.5.19. The MCP server receives the literal string instead of the resolved value.

Config (~/.config/altimate-code/altimate-code.json)

{
"mcp": {
"gitlab": {
"type": "local",
"command": ["node", ".../gitlab-mcp-server/dist/index.js"],
"environment": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "{env:GITLAB_PERSONAL_ACCESS_TOKEN}",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}

Reproduction steps

  1. Set GITLAB_PERSONAL_ACCESS_TOKEN in the shell environment (confirmed present via echo)
  2. Configure the MCP server in altimate-code.json using {env:GITLAB_PERSONAL_ACCESS_TOKEN} in the environment block
  3. Call any GitLab MCP tool (e.g., gitlab_get_current_user)
  4. Result:MCP error -32603: This operation requires user authentication

Additional findings

  • The ${GITLAB_PERSONAL_ACCESS_TOKEN} syntax was also tested — same failure
  • Passing the token directly via the userCredentials parameter works, confirming the MCP server itself is functional
  • altimate-code --version confirms v0.5.19
  • The fix in v0.5.19 (fix: ${VAR} env-var interpolation for configs (closes #635) (#655)) does not appear to resolve this case

Metadata

FieldValue
CLI Version0.5.19
Platformdarwin
Architecturearm64
OS Release25.3.0
Categorybug
Working Directorydata-warehouse-etl-dbt
Session IDses_2aba8ca90ffeLGmZEZ4sNP90Ng

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