
MCP AI Server for Visual Studio
Give AI assistants Roslyn semantic analysis and the Visual Studio Debugger via MCP — 41 tools.
Add to your client
Copy the config for your MCP client and paste it into its config file.
Paste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-ai-server-for-visual-studio": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:3010/sdk/"
]
}
}
}Claude Desktop connects to remote servers through the `mcp-remote` proxy (installed on first run via npx). Restart Claude Desktop after saving.
Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Visual Studio 2022 (17.13+) or Visual Studio 2026
- Windows (amd64 or arm64)
- The MCP AI Server extension installed from the Visual Studio Marketplace
- An open .NET solution in Visual Studio
- Any MCP-compatible AI client
- npx (Node.js) — only if connecting via the mcp-remote proxy from a client without native HTTP support
About MCP AI Server for Visual Studio
A Visual Studio extension (installed from the VS Marketplace) that bridges AI coding agents to the C# compiler (Roslyn) and the Visual Studio Debugger over the Model Context Protocol. It exposes 41 tools — 13 Roslyn-powered for semantic navigation, code understanding, analysis and refactoring, and 19 debugging tools (preview) for breakpoints, stepping, variable inspection and attaching to Docker/WSL processes. Each Visual Studio instance runs its own MCP server on a configurable HTTP port, enabling multi-solution setups where the AI reasons across your code and cloned library/framework source.
Tools & capabilities (39)
FindSymbolsFind classes, methods, properties by name — semantic, not text matching.
FindSymbolDefinitionGo to definition (F12 equivalent).
FindSymbolUsagesFind all references, compiler-verified (Shift+F12 equivalent).
GetSymbolAtLocationIdentify the symbol at a specific line and column.
GetDocumentOutlineSemantic structure of a document: classes, methods, properties, fields.
GetInheritanceFull type hierarchy: base types, derived types, interfaces.
GetMethodCallersWhich methods call this method (call graph, upward).
GetMethodCallsWhich methods this method calls (call graph, downward).
GetDiagnosticsCompiler errors and warnings without building, via Roslyn background analysis.
RenameSymbolSafe rename across the entire solution — compiler-verified.
FormatDocumentRun Visual Studio's native code formatter on a document.
ExecuteCommandBuild or clean a solution/project with structured diagnostics.
ExecuteAsyncTestRun tests asynchronously with real-time status.
GetSolutionTreeReturn the solution and project structure.
GetProjectReferencesReturn the project dependency graph.
LoadSolutionOpen a .sln/.slnx file — the server stays on the same port.
TranslatePathConvert paths between Windows and WSL formats.
GetActiveFileReturn the current file and cursor position.
GetSelection / CheckSelectionRead the active text selection in the editor.
GetLoggingStatus / SetLogLevelRead and set extension diagnostics/log level.
debug_startStart debugging (F5), fire-and-forget. (Preview)
debug_stopStop the debugging session. (Preview)
debug_get_modeReport current mode: Design, Running, or Break. (Preview)
debug_breakPause the running application. (Preview)
debug_continueResume execution. (Preview)
debug_stepStep over / into / out. (Preview)
immediate_executeExecute an expression with side effects in the immediate window. (Preview)
debug_list_transportsList debug transports (Default, Docker, WSL, SSH...). (Preview)
debug_list_processesList processes on a transport. (Preview)
debug_attachAttach to a running process. (Preview)
debug_get_callstackGet the call stack of the current thread. (Preview)
debug_get_localsGet local variables, tree-navigable. (Preview)
debug_evaluateEvaluate an expression or drill into a variable tree. (Preview)
output_readRead the VS Output window (Build, Debug, Tests). (Preview)
error_list_getGet errors and warnings from the VS Error List. (Preview)
breakpoint_setSet a breakpoint by file+line or function name. (Preview)
breakpoint_removeRemove a breakpoint. (Preview)
breakpoint_listList all breakpoints. (Preview)
exception_settings_setConfigure break-on-exception behavior. (Preview)
What this server can do
MCP AI Server for Visual Studio provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Find the exact definition of a symbol instead of wading through dozens of grep matches.
- Safely rename a class or method across an entire .NET solution with compiler verification.
- Trace call graphs (who calls this, what does this call) and full inheritance hierarchies.
- Get compiler diagnostics without running a full build.
- Debug at runtime — set breakpoints, step through code, and inspect actual variable values to find why a method returns null.
- Attach the debugger to processes running in Docker containers or WSL.
- Run an AI across multiple solutions at once (your code plus cloned library/framework source) by running each VS instance on its own port.
Security notes
The server binds to localhost only and requires no authentication, so any local process can reach it on the configured port. It exposes powerful capabilities — running builds/tests, executing immediate-window expressions with side effects (immediate_execute), and driving the debugger — against your open solution. Only enable it on machines you trust, and disable tool groups you do not need in MCP Server Settings.
MCP AI Server for Visual Studio FAQ
How do I install it?
Install the 'MCP AI Server' extension from the Visual Studio Marketplace (itemName LadislavSopko.mcpserverforvs), or search for 'MCP AI Server' in the Visual Studio Extensions Manager. It is free.
How does my AI client connect?
Open your .NET solution in Visual Studio, confirm the port in Tools > MCP Server Settings, and add an HTTP MCP server pointing at http://localhost:3010/sdk/. Clients without native HTTP support can connect through the mcp-remote proxy (npx -y mcp-remote http://localhost:3010/sdk/).
Which AI tools are supported?
Any MCP-compatible client — including Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot, Cline, Continue, Gemini CLI, OpenAI Codex CLI, Goose, OpenCode, and Aider.
What are the requirements?
Visual Studio 2022 (17.13+) or Visual Studio 2026 on Windows (amd64 or arm64), plus any MCP-compatible AI tool.
Can I run more than one instance?
Yes. Each Visual Studio instance runs its own MCP server on a configurable port (e.g. 3010, 3011, 3012), so the AI can connect to several solutions simultaneously and reason across them.
Are the debugging tools stable?
22 tools are stable. The 19 debugging tools are currently in Preview.
Alternatives to MCP AI Server for Visual Studio
Compare all alternatives →Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.
Compare MCP AI Server for Visual Studio with: