[BUG] Self-defined MCP server names with a "/" are truncated to the last segment in the harness config
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
Direzione di ricerca
Inizia da SafeMCPInstaller.install_servers() e segui come i nomi dei server definiti dall’utente vengono passati all’adattatore dell’harness; secondo l’issue, il fallback ricava la chiave dall’ultimo segmento dell’URL. Controlla la gestione esistente di @scope/name e le correzioni correlate #1693 e #1699. Il lavoro è concluso quando apm install scrive il nome dichiarato con la barra come chiave di configurazione; verificalo con la riproduzione nell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When a self-defined MCP server in apm.yml has a registry-style name containing a / (e.g. com.azure.dev/mcp-remote-azure-devops), apm install writes the harness config entry under the last segment only (mcp-remote-azure-devops).
#1693 / #1699 fixed this for npm-style @scope/name, but only when the name starts with @ and has exactly one /. Reverse-DNS names as used by the official MCP registry (com.example/server, io.github.owner/server) are still truncated.
This matters because Copilot's MCP private registry enforcement matches on the config key. The truncated key is not in the registry, so the server is blocked:
1 MCP server was blocked by policy: 'mcp-remote-azure-devops'
Using the full name com.azure.dev/mcp-remote-azure-devops as the key is allowed. There is no way to get that key through APM today.
This is fully blocking us from setting up MCP servers through APM as this (the fixed MCP server name) is an organization policy.
To Reproduce
- Create
apm.yml:name: repro version: 1.0.0 targets: [copilot] dependencies: apm: [] mcp: - name: com.azure.dev/mcp-remote-azure-devops registry: false transport: http url: https://mcp.dev.azure.com/my-org - Run
apm install -g <path-to-package> --target copilot - Open
~/.copilot/mcp-config.json
Actual:
{
"mcpServers": {
"mcp-remote-azure-devops": {
"type": "http",
"url": "https://mcp.dev.azure.com/my-org",
"tools": ["*"],
"id": ""
}
}
}
Expected behavior
The config key is the declared name, exactly as written: com.azure.dev/mcp-remote-azure-devops.
Environment (please complete the following information):
- OS: Windows 11 Enterprise
- Python Version: 3.14.5 (pip install) / bundled binary
- APM Version: 0.29.0 and 0.35.0 (both reproduce)
- Copilot CLI: 1.0.105
Logs
The install output shows the full name, but the written key is truncated:
| [>] com.azure.dev/mcp-remote-azure-devops (self-defined, http)
+ com.azure.dev/mcp-remote-azure-devops
| [+] com.azure.dev/mcp-remote-azure-devops -> Copilot (configured)
Additional context
- Cause:
SafeMCPInstaller.install_servers()only passesserver_namewhen the name starts with@and contains exactly one/. Otherwise the adapter falls back toserver_url.split("/")[-1]. - Suggested fix (as already proposed in #1693): always pass the declared
dep.nameasserver_namefor self-defined servers.
- Lingua principale
- Python
- Stelle
- 4.2k
- Fork
- 412
- Merge medio
- 23h 11m
- PR unite (30g)
- 63
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/apm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
type/bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
[DOCS] Add a public maintainer roster while preserving author attributionForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertastatus/accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/apm#3488 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
type/automation type/performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Global Codex instruction compilation ignores CODEX_HOMEForse già presa @xubenqiang l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/apm
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
vllm-project/vllm-omni#10051 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SCIInstitute/SCIRun#2931 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 5 giorni
-
Author Page: barom-kangApertaauthor-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
acl-org/acl-anthology#10827 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
marimo-team/marimo#11768 ·
I maintainer di solito rispondono entro 1 giorno