github / github/copilot-cli

Lazy-load MCP servers on first tool invocation

Aberta
#2,901 2 comentários 18 reações 0 responsáveis Ver no GitHub
area:mcp
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### Describe the feature or problem you'd like to solve

Currently, all MCP servers configured in mcp-config.json are connected at CLI startup. As users add more MCP servers (ADO, GitHub, Work IQ, custom agents, etc.), this increases startup time even when most servers won't be used in a given session.

### Proposed solution

Add a lazy-loading option so MCP servers connect on-demand — only when a tool from that server is first invoked. This could be a per-server config flag like "lazy": true, or a global setting.

Benefits:

- Faster startup time, especially for users with many configured servers
- Reduced resource usage for servers that aren't needed in every session
- Better scalability as the MCP ecosystem grows

### Example prompts or workflows

_No response_

### Additional context

_No response_

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by tracing how mcp-config.json is read and how all MCP servers are connected during CLI startup. Then follow the path from the first tool invocation to the selected server. Done means a per-server or global lazy-loading setting connects only the needed server on first use while preserving configured server behavior.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
shell
Domínio
cli, tooling
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.