Workspace .mcp.json detected by 'mcp list'/'mcp get' but not connected in actual agent session (interactive/-i/-p)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
Bug Report
Summary
Workspace .mcp.json MCP servers are correctly detected by copilot mcp list / copilot mcp get <name> (shown as Status: Enabled, Source: Workspace), but are not actually connected/available inside an agent session (interactive default session, -i auto-prompt, or -p non-interactive prompt) unless the same config is re-passed explicitly via --additional-mcp-config @.mcp.json.
This looks like a regression of #2198 (closed as fixed in 1.0.12) — the config-loading layer (mcp list/mcp get) now works, but the session-bootstrapping layer that actually wires servers into the running agent still doesn't pick up workspace config without an explicit flag.
Version
1.0.80 (macOS 26.5 / Sequoia, arm64, terminal-only workflow, no IDE attached)
Steps to Reproduce
- In a project directory, create
.mcp.json:{ "mcpServers": { "my-server": { "type": "http", "url": "https://example.com/mcp", "oauth": { "clientId": "example-client" } } } } - From that directory, run
copilot mcp get my-server→ showsStatus: Enabled,Source: Workspace (.../.mcp.json). - From the same directory, start a session and ask it to list available MCP servers, e.g.:
or interactively withcopilot --allow-all-tools -p "List the MCP servers currently available in this session (just names)."copilot(no extra flags). my-serveris missing from the tools/servers actually available to the agent.- Re-run with the config re-passed explicitly:
→copilot --allow-all-tools --additional-mcp-config @.mcp.json -p "List the MCP servers currently available in this session (just names)."my-servernow appears correctly.
Expected Behavior
If copilot mcp get <name> reports a workspace server as Status: Enabled, that server should be connected and its tools available in the actual agent session (interactive, -i, and -p) without needing to duplicate the same file via --additional-mcp-config.
Actual Behavior
copilot mcp list/copilot mcp get— correctly detect and report the workspace server as enabled.- Interactive session (no flags) — workspace server not available to the agent.
-i "<prompt>"(interactive with auto-prompt) — workspace server not available.-p "<prompt>"(non-interactive) — workspace server not available.- Adding
--additional-mcp-config @.mcp.jsonon the command line — workspace server becomes available (redundant since the CLI already found the same file via workspace discovery).
Impact
This makes committed, repo-scoped .mcp.json files (the main use case — e.g. an internal MCP server URL with repo-specific query parameters scoping it to that project) effectively non-functional out of the box for terminal workflows. Users have to manually pass --additional-mcp-config @.mcp.json every single invocation, or write a shell wrapper to auto-detect and inject it — defeating the purpose of committing project-scoped MCP config to the repo for the whole team to use transparently.
Workaround
Manually pass --additional-mcp-config @.mcp.json on every invocation (or wrap copilot in a shell function that auto-detects .mcp.json in the cwd and injects the flag).
Related
- #2198 (closed as fixed in 1.0.12) — appears to have regressed, or only fixed the
mcp list/mcp getdiscovery layer without fixing actual session wiring.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el descubrimiento de .mcp.json del espacio de trabajo, tal como se prueba con copilot mcp list y copilot mcp get, y luego sigue el inicio de sesión para los puntos de entrada default, -i y -p. Compara esas rutas con una ejecución usando --additional-mcp-config @.mcp.json; se considera terminado cuando un servidor del espacio de trabajo está disponible en los tres modos de sesión sin el flag adicional.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 52/100