Skip to content

Support of ${} environment variable in mcp-config #1232

@miadisabelle

Description

@miadisabelle

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationConfig files, instruction files, settings, and environment variablesarea:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions