Skip to content

Copilot CLI Does Not Respect MCP Timeouts #172

@Cobular

Description

@Cobular

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

  1. Setup an STDIO MCP server that takes a long time to return - upwards of 5 minutes.
  2. Configure it in copilot CLI
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions