Skip to content

MCP: support an array of commands (multiple commands) to start an MCP server #249370

@joelverhagen

Description

@joelverhagen

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

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions