Skip to content

Session-scope MCP configuration #51

@mark-undoio

Description

@mark-undoio

Describe the feature or problem you'd like to solve

Make it possible to extend / override MCP configuration for a single session without destructive edits to user config

Proposed solution

My proposed solution would be something like Claude Code's or Amp's --mcp-config (which takes an MCP config file directly) or Codex CLI's --config (which can override any configuration parameter).

The user would invoke Copilot CLI with their transient config:

copilot --mcp-config my_temporary_config.json

This could be useful:

  • When integrating Copilot CLI with an external tool that can export its functionality over HTTP on a dynamic port (this is my specific use case).
  • To easily switch between different MCP configurations during development, without having to make permanent edits to project- or user-wide config.
  • For automated testing, in which instances MCP servers may be started dynamically (in parallel) on a number of ports.

Example prompts or workflows

My target use case:

  1. My tool (which has its own, user-facing interface) wants to invoke the services of Copilot CLI as an agentic backend.
  2. My tool starts an MCP server to expose its functionality on a dynamically-allocated HTTP port.
  3. My tool invokes Copilot CLI, which takes on its usual configuration for the user / project but also applies the settings passed by --mcp-config so that it can find my tool's MCP server instance and provide user assistance.
  4. Copilot CLI accomplishes agentic work with my tool.
  5. Copilot CLI exits and my tool shuts down its MCP server instance.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions