aws / aws/amazon-q-developer-cli
bug: MCP server config for the custom agent does not support environment variable substitution
- 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
Assessment
This issue has not been assessed yet.