-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support of ${} environment variable in mcp-config #1232
Copy link
Copy link
Closed
Labels
area:configurationConfig files, instruction files, settings, and environment variablesConfig files, instruction files, settings, and environment variablesarea:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryMCP server configuration, discovery, connectivity, OAuth, policy, and registry
Description
Describe the feature or problem you'd like to solve
Support of environment variable in MCP-Config
Proposed solution
Simply supports that. It is major I think because it forces us to add our secrets into the MCP config (which I am not a fan of ;) )
best regards
Example prompts or workflows
in $HOME/.copilot/mcp-config.json
"${COPI_COAIAN_MCP_NAME}": {
"type": "local",
"command": "npx",
"tools": [ "*" ],
"args": ["-y", "${CNCV}", "--memory-path", "${COPI_COAIAN_MCP_MF}"]
}
{
"mcpServers": {
"github_mcp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
}
}
}
}
Additional context
- Gemini-cli, claude-code supports that...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:configurationConfig files, instruction files, settings, and environment variablesConfig files, instruction files, settings, and environment variablesarea:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryMCP server configuration, discovery, connectivity, OAuth, policy, and registry
Type
Fields
Give feedbackNo fields configured for Feature.