Skip to content

Request for copilot mcp add Command to Configure MCP Server #160

@DevelopmentCats

Description

@DevelopmentCats

Describe the feature or problem you'd like to solve

Currently, configuring MCP servers for GitHub Copilot is either manual or requires interactive IDE sessions (e.g., editing .vscode/mcp.json). This is inefficient for developers who prefer CLI workflows or need to automate MCP server setup in CI/CD environments. A CLI-based configuration option would streamline this process, reduce manual effort, and improve integration with other tools and workflows.

Proposed solution

Introduce a new command in the Copilot CLI:

copilot mcp add --server-name <name> --url <server-url> [--type <type>] [--config <path-to-config>

This command would:

  • Register and configure MCP servers directly from the terminal.
  • Support different server types (e.g., SSE, REST).
  • Accept configuration files or inline parameters.
  • Persist configuration in ~/.copilot/mcp_config.json.

This would improve usability for CLI-first developers, support automation, and align with Copilot CLI’s extensibility goals.

Example prompts or workflows

✅ New Project Setup
Quickly configure an MCP server for a new project:

copilot mcp add --server-name my-server --url https://my-server.com/sse --type sse

🌐 Environment-Specific Configuration
Add a production MCP server to an existing project:

copilot mcp add --server-name prod-server --url https://prod-server.com/api --type rest --config ./prod-config.json

🔁 CI/CD Integration
Automate MCP server setup in a deployment or provisioning script:

copilot mcp add --server-name ci-server --url $MCP_URL --type sse

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions