Describe the bug
When installing an MCP server via the /mcp command using a registry that follows the MCP Registry schema, Copilot CLI writes the raw variable placeholder (e.g. {ado_org}) literally into ~/.copilot/mcp-config.json instead of substituting the resolved value. This causes the MCP server to fail on startup because npx receives the unsubstituted template string as an argument.
Affected version
GitHub Copilot CLI 1.0.64-3
Steps to reproduce the behavior
-
Have a registry entry that conforms to the MCP Registry schema, with a packageArguments
entry using a value template and a variables block with a default:
"packageArguments": [ {
"type": "positional",
"value": "{my_var}",
"variables": {
"my_var": {
"description": "Some variable",
"default": "some-default-value"
}
}
} ]
-
Install the MCP server via /mcp pointing at the registry URL.
-
Inspect the generated ~/.copilot/mcp-config.json.
Expected behavior
Expected Behavior
Copilot CLI should:
- Parse packageArguments[].variables (and/or inputs) from the registry entry.
- Prompt the user for values that have no default, or apply the default silently.
- Write the resolved value into args in mcp-config.json:
"args": ["-y", "@some/mcp-package", "some-default-value"]
Actual Behavior
The raw template string is written verbatim into the config:
"args": ["-y", "@some/mcp-package", "{my_var}"]
This is passed directly to npx, causing the MCP server to fail or behave incorrectly
at startup.
Additional context
Workaround
Manually edit ~/.copilot/mcp-config.json and replace the placeholder string with the
intended value.
Environment
Describe the bug
When installing an MCP server via the
/mcpcommand using a registry that follows the MCP Registry schema, Copilot CLI writes the raw variable placeholder (e.g.{ado_org}) literally into~/.copilot/mcp-config.jsoninstead of substituting the resolved value. This causes the MCP server to fail on startup becausenpxreceives the unsubstituted template string as an argument.Affected version
GitHub Copilot CLI 1.0.64-3
Steps to reproduce the behavior
Have a registry entry that conforms to the MCP Registry schema, with a
packageArgumentsentry using a
valuetemplate and avariablesblock with adefault:Install the MCP server via /mcp pointing at the registry URL.
Inspect the generated ~/.copilot/mcp-config.json.
Expected behavior
Expected Behavior
Copilot CLI should:
Actual Behavior
The raw template string is written verbatim into the config:
This is passed directly to npx, causing the MCP server to fail or behave incorrectly
at startup.
Additional context
Workaround
Manually edit ~/.copilot/mcp-config.json and replace the placeholder string with the
intended value.
Environment