A Visual Studio extension that enables GitHub Copilot CLI to interact with Visual Studio via the /ide command — the same way it works with VS Code.
The MCP server uses ModelContextProtocol.AspNetCore with Kestrel hosting over a Windows named pipe — ASP.NET Core handles all HTTP and SSE transport.
Copilot CLI running in an external terminal, connected to Visual Studio via /ide
Copilot CLI embedded directly inside Visual Studio as a dockable tool window
- Visual Studio 2022 (v17.x) or Visual Studio 2026 (v18.x)
- GitHub Copilot CLI installed
- An active Copilot subscription
- .NET 10.0 SDK (for the MCP server process)
# Clone and build (requires MSBuild from VS — not dotnet build)
git clone https://github.com/sailro/CopilotCliIde
msbuild /restore src/CopilotCliIde/CopilotCliIde.csproj /p:Configuration=Debug
# The .vsix is produced at:
# src/CopilotCliIde/bin/Debug/CopilotCliIde.vsixNote: The MCP server is automatically published and bundled into the VSIX during the build.
Double-click the .vsix to install, or use F5 in Visual Studio to debug in the experimental instance.
- Open a solution in Visual Studio — the extension activates automatically
- Launch Copilot CLI using one of:
- Tools → Copilot CLI (Embedded Terminal) — opens a dockable terminal inside VS with Copilot CLI running (embedded via WebView2 + xterm.js)
- Tools → Copilot CLI (External Terminal) — opens Copilot CLI in an external terminal window
- Open a terminal manually in the solution folder
- Run
/idein Copilot CLI — it discovers Visual Studio and connects
$ copilot
> /ide
✓ Connected to Visual Studio (CopilotCliIde)
Once connected, the agent can query solution info, see your selection in real time, propose diffs with Accept/Reject, and check diagnostics from the Error List.
Tip: The embedded terminal (Tools → Copilot CLI (Embedded Terminal)) is dockable — position it alongside your editor for a side-by-side workflow.
The extension logs all bridge activity to a dedicated "Copilot CLI IDE" pane in the VS Output Window (View → Output). Each log entry is timestamped and includes:
- MCP tool calls received from Copilot CLI (e.g.,
get_selection,open_diff,read_file) - Push notifications sent to the CLI (e.g., selection changes, diagnostics updates)
This real-time log is useful for debugging connectivity issues, verifying that the CLI can see your edits, and monitoring the bridge during active sessions.
Copilot CLI ──(Streamable HTTP over named pipe)──▶ CopilotCliIde.Server (net10.0)
│
(StreamJsonRpc over named pipe)
│
CopilotCliIde (VS extension, net472)
- CopilotCliIde.Server (
net10.0) — ASP.NET Core (Kestrel) process hosting the MCP server on a Windows named pipe viaModelContextProtocol.AspNetCore. Handles Streamable HTTP transport (POST/GET/DELETE), SSE push notifications, and session tracking. Contains 7 MCP tools in theTools/folder. - CopilotCliIde (
net472) — The VS extension package. Manages the connection lifecycle, subscribes to editor events, exposes VS services over StreamJsonRpc, and hosts an embedded terminal (WebView2 + ConPTY) for running Copilot CLI inside VS. - CopilotCliIde.Shared (
netstandard2.0) — Shared RPC contracts and DTOs.
For full protocol details — discovery, transport, MCP tools, push notifications, and schemas — see doc/protocol.md.
See CHANGELOG.md for a detailed history of changes.
MIT