github / github/copilot-cli

feat: Plugin dependency/companion MCP server declaration in plugin.json

Offen
#2,113 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:mcp area:plugins
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

## Problem

When building a Copilot CLI plugin, there's no way to declare dependencies on external MCP servers that the plugin's skills need. A plugin can register its own MCP servers via `.mcp.json`, but it can't express "this plugin works best when WorkIQ / Fabric Power BI / Azure DevOps MCP servers are also available."

This creates a fragmented experience where users install a plugin but then need to manually configure companion MCP servers in `~/.copilot/mcp-config.json` to get the full value.

## Context

I maintain [MSX-MCP](https://github.com/mcaps-microsoft/MSX-MCP), a plugin with 29 MCP tools and 15 skills for Microsoft Sales data. Several of our skills would benefit from M365 data (emails, meetings, Teams messages) via the [WorkIQ MCP server](https://www.npmjs.com/package/@microsoft/workiq), and we already bundle the [Fabric Power BI MCP server](https://api.fabric.microsoft.com/v1/mcp/powerbi) in our `.mcp.json`.

A related project ([MCAPS-IQ](https://github.com/microsoft/mcaps-iq)) solves this by putting everything in `.vscode/mcp.json` -- but that's a VS Code workspace config, not a portable plugin. Users who want the same experience in Copilot CLI have to manually configure each companion server.

## Current state

**What plugins CAN do:**
- Register their own MCP servers in `.mcp.json` (stdio or http)
- Bundle skills and agents

**What plugins CANNOT do:**
- Declare optional/required companion MCP servers (e.g., "also install WorkIQ")
- Declare dependencies on other plugins
- Suggest user-level `mcp-config.json` additions at install time

## Additional complexity: config format divergence

The CLI and VS Code use different MCP config formats, making it harder to share configurations:

| Surface | File | Root Key | Type Values |
|---------|------|----------|-------------|
| Copilot CLI (user-level) | `~/.copilot/mcp-config.json` | `mcpServers` | `local`, `http` |
| Copilot CLI (plugin) | `.mcp.json` | `mcpServers` | `stdio`, `http` |
| VS Code | `.vscode/mcp.json` | `servers` | `stdio`, `http` |

A plugin author can't provide one config that works for both CLI and VS Code.

## Possible solutions

1. **`companionServers` in plugin.json** -- optional array of MCP server configs that get merged into the user's `mcp-config.json` at `copilot plugin install` time (with user confirmation)

2. **`dependencies` in plugin.json** -- declare other plugins or npm packages that should be installed alongside (similar to npm `peerDependencies`)

3. **Post-install hook** -- let plugins run a setup script that can suggest or configure companion servers

4. **Unified MCP config format** -- converge CLI and VS Code on a single schema so configurations are portable

## Impact

This affects any plugin that needs to compose multiple MCP servers into a coherent experience -- not just MSX tools. AI agent plugins that combine domain-specific servers (CRM, analytics) with general-purpose ones (calendar, email, file storage) all face this packaging gap.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.