Lazy-load MCP servers on first tool invocation
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
### 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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell
- Domaine
- cli, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100