Home/Wiki Errors/GitHub Copilot
GitHub Copilot / MCP

MCP server slow to connect - GitHub Copilot coding agent

A repository-configured MCP server is available to the coding agent, but startup or discovery is too slow or fails.

GitHub Copilot MCP slow to connectCopilot coding agent MCP unavailableCopilot MCP server failed to start
Paste an error to match it against the wiki. / 粘贴报错后自动匹配。

Error text / 报错原文

  • MCP servers that are slow to connect
  • MCP server unavailable
  • server failed to start

What it means

A repository-configured MCP server is available to the coding agent, but startup or discovery is too slow or fails.

Most common causes

  • MCP server installs dependencies at startup
  • Network dependency blocks discovery
  • Repository config references a missing command
  • The coding agent environment differs from local VS Code

Fastest fix

  • Keep MCP startup lightweight
  • Test the command in a clean shell
  • Remove unused tools from the repo config
  • Retry the task after the server finishes starting

Safe fix

  • Preinstall dependencies in the agent environment when possible
  • Use pinned package versions
  • Keep MCP permissions narrow
  • Document required secrets for repository maintainers

What not to do

  • Do not rely on local-only paths in repository MCP config
  • Do not expose broad write tools to every task
  • Do not store secrets in the repo

How to confirm the fix

Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.

node --version
npm --version
cat .github/copilot-instructions.md

Related errors

Related tools

Sources