altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

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

Open FrankTub opened this issue 8 months ago • 1 comments

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

Field Value
CLI Version 0.5.19
Platform darwin
Architecture arm64
OS Release 25.3.0
Category bug
Working Directory data-warehouse-etl-dbt
Session ID ses_2aba8ca90ffeLGmZEZ4sNP90Ng

FrankTub avatar Apr 05 '26 08:04 FrankTub

Resolved in v0.5.21.

anandgupta42 avatar Apr 13 '26 07:04 anandgupta42