MCP Directory

MCP AI Server for Visual Studio

Give AI assistants Roslyn semantic analysis and the Visual Studio Debugger via MCP — 41 tools.

Unverified
HTTP (remote)
No auth
C#

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)

FindSymbols

Find classes, methods, properties by name — semantic, not text matching.

FindSymbolDefinition

Go to definition (F12 equivalent).

FindSymbolUsages

Find all references, compiler-verified (Shift+F12 equivalent).

GetSymbolAtLocation

Identify the symbol at a specific line and column.

GetDocumentOutline

Semantic structure of a document: classes, methods, properties, fields.

GetInheritance

Full type hierarchy: base types, derived types, interfaces.

GetMethodCallers

Which methods call this method (call graph, upward).

GetMethodCalls

Which methods this method calls (call graph, downward).

GetDiagnostics

Compiler errors and warnings without building, via Roslyn background analysis.

RenameSymbol

Safe rename across the entire solution — compiler-verified.

FormatDocument

Run Visual Studio's native code formatter on a document.

ExecuteCommand

Build or clean a solution/project with structured diagnostics.

ExecuteAsyncTest

Run tests asynchronously with real-time status.

GetSolutionTree

Return the solution and project structure.

GetProjectReferences

Return the project dependency graph.

LoadSolution

Open a .sln/.slnx file — the server stays on the same port.

TranslatePath

Convert paths between Windows and WSL formats.

GetActiveFile

Return the current file and cursor position.

GetSelection / CheckSelection

Read the active text selection in the editor.

GetLoggingStatus / SetLogLevel

Read and set extension diagnostics/log level.

debug_start

Start debugging (F5), fire-and-forget. (Preview)

debug_stop

Stop the debugging session. (Preview)

debug_get_mode

Report current mode: Design, Running, or Break. (Preview)

debug_break

Pause the running application. (Preview)

debug_continue

Resume execution. (Preview)

debug_step

Step over / into / out. (Preview)

immediate_execute

Execute an expression with side effects in the immediate window. (Preview)

debug_list_transports

List debug transports (Default, Docker, WSL, SSH...). (Preview)

debug_list_processes

List processes on a transport. (Preview)

debug_attach

Attach to a running process. (Preview)

debug_get_callstack

Get the call stack of the current thread. (Preview)

debug_get_locals

Get local variables, tree-navigable. (Preview)

debug_evaluate

Evaluate an expression or drill into a variable tree. (Preview)

output_read

Read the VS Output window (Build, Debug, Tests). (Preview)

error_list_get

Get errors and warnings from the VS Error List. (Preview)

breakpoint_set

Set a breakpoint by file+line or function name. (Preview)

breakpoint_remove

Remove a breakpoint. (Preview)

breakpoint_list

List all breakpoints. (Preview)

exception_settings_set

Configure 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).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 21 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 25 days agoRepo

Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.

Unverified
stdio (local)
No auth
C
14 tools
Updated 11 hours agoRepo