-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
Currently, MCP server definitions don't support environment variable references, making it difficult to handle sensitive data like API keys and secrets in project-level configurations. This forces developers to hardcode sensitive information in mcp.json files.
Describe the solution you'd like
Implement an injectEnv utility that supports environment variable references in MCP configurations using VSCode's env ref syntax (${env:VAR_NAME}). This would allow:
- Secure handling of sensitive data
- Dynamic configuration based on environment
- Consistent with VSCode's environment variable reference syntax
~/.cursor/mcp.json:
{
"mcpServers": {
"kibela": {
"command": "npx",
"args": ["-y", "@kiwamizamurai/mcp-kibela-server"],
"env": {
"KIBELA_TEAM": "${env:KIBELA_TEAM}",
"KIBELA_TOKEN": "${env:KIBELA_TOKEN}"
}
}
}
}Describe alternatives you've considered
- Hardcoding values in
mcp.json(current approach, not secure) - Using external configuration management tools (see forum post)
Additional context
- Similar functionality has been implemented in Roo-Code (see PR #2679)
- Community discussion on Cursor forum shows demand for this feature (see forum post)
- VSCode already supports environment variable references (see issue 243709_1)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request