copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Bug: copilot plugin install does not merge plugin .mcp.json servers into ~/.copilot/mcp-config.json

Open ericchansen opened this issue 7 months ago • 2 comments

Describe the bug

When a plugin is installed via copilot plugin install, the plugin's .mcp.json server definitions are not merged into ~/.copilot/mcp-config.json -- the file the Copilot CLI runtime reads to start MCP servers. This results in the plugin's own tools being completely unavailable, even though the plugin files are correctly installed and the server starts fine when called directly.

Affected version

1.0.25 (also reproduced on earlier versions)

Steps to reproduce the behavior

  1. Create a plugin with a .mcp.json that defines an MCP server:
{
  "mcpServers": {
    "my-plugin": {
      "type": "stdio",
      "command": "node",
      "args": ["scripts/bootstrap.mjs"]
    }
  }
}
  1. Install: copilot plugin install owner/my-plugin

  2. Verify plugin is installed:

ls ~/.copilot/installed-plugins/_direct/owner--my-plugin/
# All files present, server starts correctly when called directly
  1. Start a Copilot CLI session and try to use any tool from the plugin -- tools are unavailable

  2. Inspect ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    // my-plugin entry is MISSING
  }
}

The plugin's plugin.json correctly declares "mcpServers": ".mcp.json" and the .mcp.json file exists with valid server definitions, but the install process does not merge them into the runtime config.

Expected behavior

copilot plugin install should merge the plugin's .mcp.json server definitions into ~/.copilot/mcp-config.json so that the plugin's tools are immediately available in the next session. The plugin.json -> mcpServers -> .mcp.json chain is correctly authored; the install step just doesn't process it.

Workaround

Manually add the server entry to ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "my-plugin": {
      "type": "stdio",
      "command": "node",
      "args": ["scripts/bootstrap.mjs"],
      "cwd": "~/.copilot/installed-plugins/_direct/owner--my-plugin"
    }
  }
}

Additional context

  • OS: Windows 11
  • Shell: PowerShell 7.x
  • Node.js: 22+
  • This is distinct from #1756 (plugin agents not inheriting global MCP servers) -- that issue is about agent-level server access, while this issue is about the install process not registering servers at all.
  • Also related to #2113 (companion server declaration) -- that's about external dependencies, while this is about the plugin's OWN server not being registered.
  • The plugin's server starts and responds correctly when invoked directly via subprocess. Auth, data access, and tool registration all work. The only issue is that copilot plugin install doesn't add the entry to the runtime config.

ericchansen avatar Apr 14 '26 16:04 ericchansen

This should be resolved in v1.0.26 and newer. MCP servers from directly installed plugins should now load correctly. If you still see the issue on v1.0.26 or later, please comment with details and we'll take another look.

examon avatar Apr 22 '26 09:04 examon

https://github.com/github/copilot-cli/issues/4004 -> It's still not working @examon

Sozhan308 avatar Jul 03 '26 12:07 Sozhan308