altimate-code
altimate-code copied to clipboard
MCP server fails to resolve environment variables in config
When I add a MCP server in altimate code that uses an environment variable in the configuration it fails to use it. In the tool itself I can see that it can succesfully connect:
Metadata
| Field | Value |
|---|---|
| CLI Version | 0.5.17 |
| Platform | darwin |
| Architecture | arm64 |
| OS Release | 25.3.0 |
| Category | bug |
| Working Directory | data-warehouse-etl-dbt |
| Session ID | ses_2aba8ca90ffeLGmZEZ4sNP90Ng |
Resolved in v0.5.19.
Technical Findings
The {env:...} syntax in altimate-code.json is not being resolved when passed to MCP servers.
Config tested (~/.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"
}
}
}
}
Observed behavior:
- The MCP server starts successfully but returns:
MCP error -32603: This operation requires user authentication - The env var
GITLAB_PERSONAL_ACCESS_TOKENis set in the shell environment - Passing the token directly via
userCredentialsparameter works — confirming the MCP server itself is functional - The issue is that
{env:GITLAB_PERSONAL_ACCESS_TOKEN}is passed as a literal string instead of being resolved to the actual value