CLI should inherit MCP tools from connected VS Code instance
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the feature or problem you'd like to solve
When Copilot CLI is connected to a VS Code instance that has MCP extensions installed (e.g., MSSQL Agent, Anthropic Tools, etc.), the CLI session should inherit access to those MCP tools. Currently, MCP tools available in VS Code are not accessible to CLI sub-agents or custom agents spawned via the task tool.
Proposed solution
Extend the CLI-to-VSCode connection to propagate MCP server configurations and tool availability so that:
- CLI sub-agents spawned via
tasktool receive MCP tools from the VS Code connection - Custom agents (
taskwithagent_type) can declare MCP tool dependencies and receive them from VS Code - The CLI session inherits the full MCP toolset that VS Code has loaded
Use case / example workflow
- Developer opens VS Code with MSSQL MCP extension installed
- Developer opens Copilot CLI and connects it to the running VS Code instance
- Developer asks CLI to spawn a custom MSSQL Agent sub-agent:
"help me write an SQL migration" - Expected: MSSQL Agent has access to MSSQL MCP tools (database introspection, query execution, etc.)
- Actual: MSSQL Agent receives no MCP tools (see #2630)
This pattern applies to any VS Code MCP extension (Teams calendar, mail, Notion databases, Azure resources, etc.).
Why this matters
- Leverages existing ecosystem: VS Code has mature MCP integrations already working well
- Unifies tool access: No need to duplicate MCP server configurations between VS Code and CLI
- Enables specialization: Allows agents to inherit capability from the IDE's MCP environment
- Reduces friction: Developers can use the same MCP tools in CLI workflows that they already have in VS Code
Related issues
- #2630 — Custom agent
mcp-serversnot connected in CLI sub-agent or--promptcontexts - #2716 — Custom agents in
.claude/agents/don't receive MCP tools when spawned as sub-agents viatasktool - #4076 — Make the built-in research agent's MCP tools configurable
Additional context
The CLI now has a connection mechanism to VS Code (detected and used for model selection, environment context). This connection should be extended to include MCP tool propagation so that the CLI truly inherits the full IDE capability, not just partial settings.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、既存の CLI と VS Code 間の接続、およびサブエージェントとカスタムエージェント向けのタスクツールの経路を追跡します。関連する Issue #2630、#2716、#4076 を確認して、既存の MCP の制限を理解します。MCP の設定と VS Code から利用できるツールが CLI セッションと起動されたエージェントに届けば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- vscode
- 領域
- cli, developer-experience
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100