github / github/copilot-cli

Add support for an MCP server package type that resolves to a local executable

Aperta
#4,634 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

triage
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

Describe the feature or problem you'd like to solve

When using an MCP registry that includes an MCP server pointing to a local exe, there is no way to have Copilot install it correctly. Only npm, pypi, oci and docker are supported as "registry type"

Proposed solution

We have MCP servers served as simple binaries. Those are documented in our MCP registry (configured in Azure API Center and enforced through GitHub Copilot Enterprise).

To be able to install those MCP servers using copilot (eg /mcp search ...) correctly, copilot should support a new "registryType" in addition to the existing ones (npm, pypi, oci, docker).

This could be something like "none" or "executable", etc.

The expected behavior would be that if the MCP registry lists an MCP server with the new registry type (none, executable, etc), copilot would add the MCP server in mcp-config.json, fully respecting the MCP registry definition and thus pointing to the executable and NOT using npx, uvx, etc as it currently does.


For reference, here's the analysis of the problematic part of copilot's codebase:

Analyzed the CLI's bundled  app.js . Found the exact logic (functions  umi / cmi  in the MCP-registry install module):

Root cause: Copilot CLI's registry→launch-config converter only supports 4 hardcoded  registryType s, each mapped to a fixed launcher — there's no "binary/exe" package type at all:

switch (t.registryType) {
  case "npm":    n.push("npx"), ..., n.push("-y"), n.push(identifier[@version]); break;
  case "pypi":   n.push("uvx"), ..., n.push(identifier); break;
  case "oci":
  case "docker": n.push("docker","run","--rm","-i"), ...; break;
  default: throw new Error(`Unsupported package type: ${t.registryType}`);
}

And a supportability gate:  ["npm","pypi","oci","docker"].includes(registryType)  — anything else is rejected as "not yet supported."

What this means for you: if your registry's GitLab MCP entry has  registryType: "npm" , Copilot always synthesizes  npx -y <identifier>@<version>  — it never reads or honors a custom "command/exe path" field from the registry package object, regardless of what your registry intends. There's a separate  commandToRegistryType  map (npx→npm, uvx→pypi, dotnet→nuget, docker→docker, brew→homebrew, mcpb→mcpb) used for fingerprinting, but the actual launch-builder ( umi ) doesn't implement nuget/homebrew/mcpb either — only npm/pypi/oci/docker.

Bottom line: there's currently no supported registry package type that resolves to a raw local executable path. To point at your exe you'd need to bypass  /mcp search / /mcp add -from-registry and instead manually add the server ( /mcp add  with explicit command, or edit the MCP config file directly) with  command: "C:\path\to\gitlab-mcp.exe" 
Example prompts or workflows

No response

Additional context

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia nell’app.js incluso, nelle funzioni di installazione di MCP-registry umi e cmi, includendo il controllo di supportabilità di registryType e lo switch del comando di avvio. Traccia il modo in cui gli entry point /mcp search e /mcp add-from-registry producono mcp-config.json. Il lavoro è completato quando viene accettato un tipo di registry eseguibile e la configurazione risultante punta direttamente all’eseguibile locale del registry invece di usare npx, uvx o Docker.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.