Copilot CLI Does Not Respect MCP Timeouts
Describe the bug
I'm writing an MCP server that has a very long wait in its runtime, and this is intended. However, copilot cli always times out:
● <some stuff>
✗ codebase-analyzer
MCP error -32001: Request timed out
The mcp-config.json timeout field is not respected:
{
"mcpServers": {
"<thing>": {
"type": "local",
"command": "node",
"tools": [
"*"
],
"args": [
"C:/Users/juliecover/Code/<whatever>.js"
],
"timeout": 600000
}
}
}
I haven't quite timed it but it seems to timeout after about 2 minutes or so.
Affected version
0.0.332 Commit: ace227c
Steps to reproduce the behavior
- Setup an STDIO MCP server that takes a long time to return - upwards of 5 minutes.
- Configure it in copilot CLI
- Have the model call the MCP server
It will time out, even with an extended timeout in the mcp-config.json
Expected behavior
The extended timeout in the mcp-config.json should be respected.
Additional context
This is really messing me up - my 1p builds take way longer than the timeout time, so this is really limiting the usefulness of the CLI for me. Please fix soon! Thanks.
+1
I'm working on a fix for this and we should ship it in the next few days. I did want to make you aware in the interm that if you send progress messages from your MCP server while your tool is running, we'll reset our timeout on each progress message we get get, so that's one avenue for a workaround while we work on supporting the timeout parameter here.
hi @ellismg could you please clarify if something was implemented to fix this, and if yes, what? E.g. we noticed that our tool calls which were allowed to run long (we already re-send progress updates every 30 seconds) are now timing out after 360 s (6 min), was some setting introduced to control this? I didn't find anything in the release notes or docs.
Hi team getting this with Work IQ MCP @ellismg
Mind sharing the relevant part of your MCP configuration json file for the workiq server, @garrettlondon1? I assume you're setting an explicit timeout setting in there?
I assume you're setting an explicit
timeoutsetting in there?
There is a bug where timeout is not respected when the MCP server sends tools/list_changed.
We're hitting the same issue. We have an MCP server with tools that run long-running commands (2-5+ minutes) and consistently get -32001 timeouts in Copilot CLI. The same MCP server works fine in VS Code Copilot Chat, no timeouts. So this appears to be CLI-specific.
Setting "timeout": 600000 in the config doesn't help, as others have reported.
cc @JoshLove-msft
Any news regarding this? It's still the issue.
Few weeks ago it worked fine then again it stopped working.
In my mcp-config.json i have set "timeout" for one of my mcps that takes longer to execute but it's still not respected.
EDIT:
I've figured out i had the same mcp in the global config of mcp-config.json and locally in .vscode/mcp.json and i had to add "timeout" to the mcp.json as well since it's picking that one up instead of the global one as a primary mcp configuration
The timeout config field for MCP servers is now supported. One common reason it may not take effect is config precedence: if the same server is defined in both a global MCP config and a workspace .vscode/mcp.json, the workspace config takes precedence -- if the active config does not include timeout, the global value won't apply. Setting timeout in whichever config file is actually active for that server should cover the standard case. If you're still seeing timeout issues after verifying your config, please feel free to reopen.
Still hitting this issue with plugins and the latest version of GHCP CLI (1.0.55).
- I started a session without a workspace, so no mcp.json at workspace level
- The MCP server is configured to with a 300000ms timeout in the .mcp.json
- Copilot CLI times out consistently after 60s
The .mcp.json file of my MCP server