NetVsMcp is a local MCP bridge for Visual Studio. It gives AI agents and MCP clients access to the live IDE: editor buffers, Roslyn navigation, build diagnostics, debugger control, test execution, and UI/browser automation.
This extension includes the NetVsMcp Broker, a lightweight local app that exposes a standard MCP endpoint on loopback (http://127.0.0.1:5050/mcp). Your MCP client (Claude, Copilot, or any agent) talks to the broker; the broker routes tool calls through to the right Visual Studio instance. IDE requests run locally. Optional aggregate usage analytics stay on your machine and are disabled by default. Your MCP client's data handling still applies.
NetVsMcp does not use repo-local configuration files and does not require separate MCP client configuration for each Visual Studio instance. Register the broker once, then target open Visual Studio sessions by session ID, solution path, or solution name.
Broker included - installing this extension also installs the local broker payload. The first Visual Studio instance that loads the extension connects to an existing broker if one is already running; otherwise it starts the bundled broker and shows it in the Windows tray. If no detected MCP client is already registered for the broker endpoint and setup has not already been shown, the status window opens on Agents so you can register or copy configuration. If the bundled broker cannot be used on a machine, the GitHub release assets include a standalone broker MSI that the extension can connect to instead.
Broker setup
The broker hosts MCP and routes requests; the extension executes IDE operations inside its Visual Studio instance. The extension ships the broker and starts it locally when needed.
- Install the NetVsMcp Visual Studio extension.
- Open Visual Studio. The extension connects to an already-running broker, or starts the bundled tray broker if no compatible broker is running. For fallback/manual deployments, install and start the standalone broker MSI first.
- Register your MCP client from the broker status window's Agents tab. The broker opens this tab automatically when none of the detected MCP clients are already registered for the endpoint and setup has not already been shown; later launches stay in the tray once setup is complete. You can also configure HTTP manually with the endpoint shown there, usually
http://127.0.0.1:5050/mcp.
- For better results, use the agent-neutral NetVsMcp best-practices guides when an agent is about to use a matching tool family. The broker exposes small entrypoints as MCP resources such as
guide://netvsmcp/manage-visual-studio.md, and tool-only clients can call netvs_get_best_practices to list and read entrypoints or focused references.
The VSIX-bundled broker exits after all Visual Studio sessions are gone, and Visual Studio starts a replacement broker if the bundled broker process is killed while Visual Studio is still running. Standalone broker MSI runs remain user-managed.
Project source, documentation, issues, and release assets are available in the NetVsMcp GitHub repository.
What your agent can do
Edit & navigate
Read and write documents, apply edits to the live in-memory buffer, go to definition or implementation, find all references, search symbols across the workspace. A safe-edit workflow lets the agent queue a preview diff that you review and approve inside Visual Studio before anything lands in the editor.
Build & diagnose
Trigger solution or project builds, read the live error list and output panes, cancel in-progress builds, switch build configurations, and restore NuGet packages - all from the agent.
Debug
Full debugger control: start, stop, attach, step (into/over/out), set and manage conditional breakpoints, read locals and the call stack, evaluate expressions in a chosen thread and frame, manage watches, switch threads, freeze/thaw threads, inspect parallel stacks, and take structured snapshots of debugger state.
Solution, projects & tests
Query solution structure, project dependencies, and NuGet packages. Discover and run tests, debug a filtered test under the Visual Studio debugger, and read results.
| Area |
Example tools |
| Documents |
document_read, document_write, document_outline, editor_goto_line |
| Safe edits |
edit_preview, edit_approve, edit_reject |
| Navigation |
code_go_to_definition, code_find_references, code_workspace_symbols, rename_symbol_apply |
| Build |
build_solution, build_and_get_errors, errors_list, output_read |
| Debugger |
debug_start, debug_step, debug_evaluate, debug_get_locals, debug_snapshot |
| Breakpoints |
breakpoint_set, breakpoint_enable, breakpoint_group_list |
| Threads |
thread_switch, thread_set_frozen, parallel_stacks |
| Tests |
test_discover, test_run_and_get_results, test_debug |
| NuGet |
nuget_search, nuget_install, nuget_update |
See the current tool list in the project README, or call get_help from your MCP client.
Project
Source, documentation, issue tracker, and releases.