Lazy-load MCP servers on first tool invocation
- 主要語言
- Shell
- 星號
- 11.2k
- 分支
- 1.9k
- 平均合併
- 14 小時 16 分鐘
- 30 天內合併 PR
- 6
描述
### 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_
貢獻指南
研究方向
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.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- shell
- 領域
- cli, tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100