Lazy-load MCP servers on first tool invocation
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 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_
コントリビューションガイド
調査の方向性
まず、mcp-config.json がどのように読み込まれ、CLI の起動時にすべての MCP サーバーがどのように接続されるかを追跡します。次に、最初のツール呼び出しから選択されたサーバーまでの経路を追います。サーバーごとまたはグローバルな遅延読み込み設定によって、初回使用時に必要なサーバーだけが接続され、設定済みのサーバーの動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100