You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In non-interactive --prompt (-p) mode, MCP servers declared in the workspace-level .mcp.json are silently skipped at startup — they are never even attempted to start. copilot mcp list reports them as registered, but they do not appear in the agent's tool surface. Adding --yolo does not help (it controls tool-call permission, not server-startup gating).
The exact same configuration works correctly when:
Running in interactive mode, or
The same servers are placed in the user-level ~/.copilot/mcp-config.json, or
The workspace config is passed explicitly via --additional-mcp-config @./.mcp.json.
This may be related to (but is distinct from) #2630, which reports a related-but-different surface: user-level mcp-config.json + custom-agent mcp-servers frontmatter not propagating into sub-agents / --prompt mode in v1.0.23. On v1.0.48-1 the user-level path appears to work in -p; the workspace-.mcp.json path does not.
Affected version
GitHub Copilot CLI 1.0.48-1
Steps to reproduce the behavior
In an empty directory, create ./.mcp.json with at least one stdio and one HTTP MCP server — anything public works, e.g.:
(Reproduced originally with three different servers — one HTTP and two stdio — but the behavior is independent of which servers are listed.)
Verify the CLI sees them:
> copilot mcp list
Workspace servers:
filesystem (local)
fetch (local)
Run a non-interactive prompt with --yolo:
copilot -p "List every MCP tool you can actually call right now, grouped by server." --yolo --log-level info --log-dir ./logs
The agent reports that only github-mcp-server-* tools are available; tools from the workspace servers (filesystem, fetch) are missing.
Inspect the log file — only github-mcp-server is ever started; there is no log line attempting to start the workspace servers:
[ERROR] Skipping disabled MCP server: computer-use
[ERROR] Starting remote MCP client for github-mcp-server with url: https://api.enterprise.githubcopilot.com/mcp/readonly
[ERROR] Creating MCP client for github-mcp-server...
[ERROR] Connecting MCP client for github-mcp-server...
[ERROR] MCP client for github-mcp-server connected, took 1141ms
[ERROR] Started MCP client for remote server github-mcp-server
[ERROR] GitHub MCP server configured after authentication
So this is not a per-server start failure (auth, transport, command-not-found) — the workspace servers are filtered out before the start attempt.
Confirm by repeating step 3 with either workaround — both work end-to-end and all servers come online:
# Workaround A: explicit additional config
copilot -p "..." --yolo --additional-mcp-config "@./.mcp.json"
# Workaround B: move the same content to user-level
cp ./.mcp.json ~/.copilot/mcp-config.json
copilot -p "..." --yolo
Config location
Interactive
-p --yolo
~/.copilot/mcp-config.json (user-level)
✅
✅
./.mcp.json (workspace, documented via copilot mcp --help)
✅
❌
--additional-mcp-config @./.mcp.json
—
✅
Expected behavior
Workspace-level .mcp.json MCP servers should be loaded in -p / --prompt mode, the same way they are loaded in interactive mode and the same way user-level servers are loaded in -p mode. At minimum, if there is an intentional trust gate that interactive mode satisfies via a TUI prompt (and which -p cannot satisfy), then either:
-p should attempt the trust check and fall back to a non-interactive equivalent (e.g. honor --yolo / --allow-all-tools / a dedicated --trust-workspace-mcp flag), and/or
A warning should be logged (Skipping workspace MCP server X: workspace not trusted in non-interactive mode) so the silent-skip behavior is at least diagnosable from the logs.
Today the only signal is that the agent reports the tools as missing — there is nothing in the logs naming the skipped servers.
Additional context
OS: Windows 11 (10.0.26200), PowerShell 7
Node: v24.3.0
copilot mcp --help documents .mcp.json as a supported workspace config source:
Configuration is loaded from multiple sources:
User ~/.copilot/mcp-config.json
Workspace .mcp.json
Plugin Installed plugins with MCP servers
Repro is reliable: same .mcp.json, same cwd, same --yolo, only difference is interactive vs -p.
Describe the bug
In non-interactive
--prompt(-p) mode, MCP servers declared in the workspace-level.mcp.jsonare silently skipped at startup — they are never even attempted to start.copilot mcp listreports them as registered, but they do not appear in the agent's tool surface. Adding--yolodoes not help (it controls tool-call permission, not server-startup gating).The exact same configuration works correctly when:
~/.copilot/mcp-config.json, or--additional-mcp-config @./.mcp.json.This may be related to (but is distinct from) #2630, which reports a related-but-different surface: user-level
mcp-config.json+ custom-agentmcp-serversfrontmatter not propagating into sub-agents /--promptmode in v1.0.23. On v1.0.48-1 the user-level path appears to work in-p; the workspace-.mcp.jsonpath does not.Affected version
Steps to reproduce the behavior
In an empty directory, create
./.mcp.jsonwith at least one stdio and one HTTP MCP server — anything public works, e.g.:{ "mcpServers": { "filesystem": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] }, "fetch": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-fetch"] } } }(Reproduced originally with three different servers — one HTTP and two stdio — but the behavior is independent of which servers are listed.)
Verify the CLI sees them:
Run a non-interactive prompt with
--yolo:The agent reports that only
github-mcp-server-*tools are available; tools from the workspace servers (filesystem,fetch) are missing.Inspect the log file — only
github-mcp-serveris ever started; there is no log line attempting to start the workspace servers:So this is not a per-server start failure (auth, transport, command-not-found) — the workspace servers are filtered out before the start attempt.
Confirm by repeating step 3 with either workaround — both work end-to-end and all servers come online:
-p --yolo~/.copilot/mcp-config.json(user-level)./.mcp.json(workspace, documented viacopilot mcp --help)--additional-mcp-config @./.mcp.jsonExpected behavior
Workspace-level
.mcp.jsonMCP servers should be loaded in-p/--promptmode, the same way they are loaded in interactive mode and the same way user-level servers are loaded in-pmode. At minimum, if there is an intentional trust gate that interactive mode satisfies via a TUI prompt (and which-pcannot satisfy), then either:-pshould attempt the trust check and fall back to a non-interactive equivalent (e.g. honor--yolo/--allow-all-tools/ a dedicated--trust-workspace-mcpflag), and/orSkipping workspace MCP server X: workspace not trusted in non-interactive mode) so the silent-skip behavior is at least diagnosable from the logs.Today the only signal is that the agent reports the tools as missing — there is nothing in the logs naming the skipped servers.
Additional context
copilot mcp --helpdocuments.mcp.jsonas a supported workspace config source:.mcp.json, same cwd, same--yolo, only difference is interactive vs-p.mcp-serversnot connected in CLI sub-agent or--promptcontexts #2630 — that issue is about user-level config + custom-agentmcp-serversfrontmatter not propagating to sub-agents /--prompt-as-primary on v1.0.23. The user-level path appears fixed on v1.0.48-1; the workspace path reported here is a separate gap.