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.
- 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 — either use Tools → Launch Copilot CLI from the menu bar, or 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.
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, and exposes VS services over StreamJsonRpc. - 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