Currently, VS Code only supports a single command to launch an MCP server.
https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_configuration-format
It would be great if the server JSON object supported a commands property, instead of a single command + args + env + envFile. This would allow a setup command first, and then a start command after.
For a .NET based MCP server, this could look:
{
"mcp": {
"servers": {
"my-mcp-server": {
"type": "stdio",
"commands": [
{
"command": "dotnet",
"args": [ "tool", "install", "--global", "Knapcode.PirateMcp", "--version", "2.0.0" ]
},
{
"command": "piratemcp", // should not need PATH reloaded, global tools go to an existing PATH dir
"args": [ ]
}
]
}
}
}
}
This would also allow npx (or similar) commands to separate the setup from the install command to provide a better UI or debugging experience.
Related request on the MCP registry: modelcontextprotocol/registry#124
Currently, VS Code only supports a single command to launch an MCP server.
https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_configuration-format
It would be great if the server JSON object supported a
commandsproperty, instead of a singlecommand+args+env+envFile. This would allow a setup command first, and then a start command after.For a .NET based MCP server, this could look:
{ "mcp": { "servers": { "my-mcp-server": { "type": "stdio", "commands": [ { "command": "dotnet", "args": [ "tool", "install", "--global", "Knapcode.PirateMcp", "--version", "2.0.0" ] }, { "command": "piratemcp", // should not need PATH reloaded, global tools go to an existing PATH dir "args": [ ] } ] } } } }This would also allow
npx(or similar) commands to separate the setup from the install command to provide a better UI or debugging experience.Related request on the MCP registry: modelcontextprotocol/registry#124