aws / aws/amazon-q-developer-cli

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

Open
#2,746 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### 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:

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.