Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions