Sponsored by Deepsite.site

Visual Studio Mcp Server

Created By
Ladislav Sopko2 months ago
MCP Server for Visual Studio bridges your IDE with AI coding assistants like Claude Code, Cursor, Windsurf, and Cline. Unlike file-based tools, this extension provides what AI agents CAN'T do alone: • IntelliSense & semantic code understanding (powered by Roslyn) • Symbol search - definitions, usages, inheritance hierarchies • Solution/project navigation and document outlines • Build execution with clean, structured error output • Async test execution with progress tracking • Solution-wide refactoring (rename symbols across all files) 20 tools designed for AI consumption with token-efficient output. Windows only. Supports VS 2022 (17.13+) and VS 2026.
Content

VS-MCP: Roslyn-Powered MCP Server for Visual Studio

Other tools read your files. VS-MCP understands your code.

VS 2022 Free Tools Website

The first and only Visual Studio extension that gives AI assistants access to the C# compiler (Roslyn) through the Model Context Protocol. 20 tools. 12 powered by Roslyn. Semantic understanding, not text matching.

🎬 See VS-MCP in Action

Watch Demo Video

Click to watch on YouTube


Why VS-MCP?

AI coding tools (Claude Code, Codex CLI, Gemini CLI, OpenCode, Cursor, Copilot, Windsurf...) operate at the filesystem level — they read text, run grep, execute builds. They don't understand your code the way Visual Studio does.

VS-MCP bridges this gap by exposing IntelliSense-level intelligence as MCP tools. Your AI assistant gets the same semantic understanding that powers F12 (Go to Definition), Shift+F12 (Find All References), and safe refactoring.

What becomes possible:

You askWithout VS-MCPWith VS-MCP
"Find WhisperFactory"grep returns 47 matchesClass, Whisper.net, line 16 — one exact answer
"Rename ProcessDocument"sed breaks ProcessDocumentAsyncRoslyn renames 23 call sites safely
"What implements IDocumentService?"Impossible via grepFull inheritance tree with interfaces
"What calls AuthenticateUser?"Text matches, can't tell directionPrecise call graph: callers + callees

20 Tools

🔍 Semantic Navigation (Roslyn-powered)

ToolDescription
FindSymbolsFind classes, methods, properties by name — semantic, not text
FindSymbolDefinitionGo to definition (F12 equivalent)
FindSymbolUsagesFind all references, compiler-verified (Shift+F12 equivalent)
GetSymbolAtLocationIdentify the symbol at a specific line and column
GetDocumentOutlineSemantic structure: classes, methods, properties, fields

🌳 Code Understanding (Roslyn-powered)

ToolDescription
GetInheritanceFull type hierarchy: base types, derived types, interfaces
GetMethodCallersWhich methods call this method (call graph UP)
GetMethodCallsWhich methods this method calls (call graph DOWN)

✏️ Refactoring (Roslyn-powered)

ToolDescription
RenameSymbolSafe rename across the entire solution — compiler-verified
FormatDocumentVisual Studio's native code formatter

🏗️ Project & Build

ToolDescription
ExecuteCommandBuild or clean solution/project with structured diagnostics
ExecuteAsyncTestRun tests asynchronously with real-time status
GetSolutionTreeSolution and project structure
GetProjectReferencesProject dependency graph
TranslatePathConvert paths between Windows and WSL formats

📝 Editor Integration

ToolDescription
GetActiveFileCurrent file and cursor position
GetSelection / CheckSelectionRead active text selection
GetLoggingStatus / SetLogLevelExtension diagnostics

Compatible Clients

Works with any MCP-compatible AI tool:

CLI Agents:

  • Claude Code — Anthropic's terminal AI coding agent
  • Codex CLI — OpenAI's terminal coding agent
  • Gemini CLI — Google's open-source terminal agent
  • OpenCode — Open-source AI coding agent (45k+ GitHub stars)
  • Goose — Block's open-source AI agent
  • Aider — AI pair programming in terminal

Desktop & IDE:

  • Claude Desktop — Anthropic's desktop app
  • Cursor — AI-first code editor
  • Windsurf — Codeium's AI IDE
  • VS Code + Copilot — GitHub Copilot with MCP
  • Cline — VS Code extension
  • Continue — Open-source AI assistant

Any MCP client — open protocol, universal compatibility


Quick Start

  1. Install this extension from Visual Studio Marketplace
  2. Open your .NET solution in Visual Studio
  3. Configure port in MCP Server Settings (default: 3010)
  4. Add to your MCP client:
"vs-mcp": {
  "type": "http",
  "url": "http://localhost:3010/sdk/"
}
  1. Start asking your AI semantic questions about your code

Works With Any MCP Client

AI ToolTypeConfig File
Claude CodeCLICLAUDE.md
Claude DesktopAppclaude_desktop_config.json
CursorIDE.cursor/rules/*.mdc or .cursorrules
WindsurfIDE.windsurfrules
ClineVS Code Extension.clinerules/ directory
VS Code + CopilotIDE.github/copilot-instructions.md
ContinueIDE Extension.continue/config.json
Gemini CLICLIGEMINI.md
OpenAI Codex CLICLIAGENTS.md
GooseCLI.goose/config.yaml

Any tool supporting Model Context Protocol will work.


Add these instructions to your project's AI config file (see table above) to ensure your AI automatically prefers MCP tools:

## MCP Tools - ALWAYS PREFER

When `mcp__vs-mcp__*` tools are available, ALWAYS use them instead of Grep/Glob/LS:

| Instead of | Use |
|------------|-----|
| `Grep` for symbols | `FindSymbols`, `FindSymbolUsages` |
| `LS` to explore projects | `GetSolutionTree` |
| Reading files to find code | `FindSymbolDefinition` then `Read` |
| Searching for method calls | `GetMethodCallers`, `GetMethodCalls` |

**Why?** MCP tools use Roslyn semantic analysis - 10x faster, 90% fewer tokens.

This ensures your AI uses the semantic tools without needing to say "use vs-mcp" in every prompt.


Multi-Solution: Understand Your Dependencies

Need the AI to understand a library you depend on? Clone the source from GitHub, open it in a second Visual Studio — each instance runs its own MCP server on a configurable port.

Your project                          → port 3010
Library source (cloned from GitHub)   → port 3011
Framework source                      → port 3012

Your AI connects to all of them. It can trace calls, find usage patterns, and understand inheritance across your code and library code. No more guessing how a dependency works — the AI reads its source with compiler-level understanding.

MCP client configuration — three options depending on your client:

Clients with native HTTP support (Claude Desktop, Claude Code):

{
  "mcpServers": {
    "vs-mcp": {
      "type": "http",
      "url": "http://localhost:3010/sdk/"
    },
    "vs-mcp-whisper": {
      "type": "http",
      "url": "http://localhost:3011/sdk/"
    }
  }
}

Clients without HTTP support (via mcp-remote proxy):

{
  "mcpServers": {
    "vs-mcp": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://localhost:3010/sdk/"]
    },
    "vs-mcp-whisper": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://localhost:3011/sdk/"]
    }
  }
}

Codex CLI (TOML):

[mcp_servers.vs-mcp]
type = "stdio"
command = "npx"
args = ["mcp-remote", "http://localhost:3010/sdk/"]

[mcp_servers.vs-mcp-whisper]
type = "stdio"
command = "npx"
args = ["mcp-remote", "http://localhost:3011/sdk/"]

Each name tells the AI what codebase it's connecting to. Simple, explicit, powerful.


Settings

ToolsMCP Server Settings

VS-MCP Settings

SettingDefaultDescription
Port3001Server port (configurable per VS instance)
Path FormatWSLOutput as /mnt/c/... or C:\...
ToolsAll enabledEnable/disable individual tool groups

Changes apply on next server start.


Example Prompts

Once connected, just ask naturally. Add (vs-mcp) to hint which server to use — after the first time, AI gets it:

Find all usages of UserService (vs-mcp)
Rename ProcessOrder to HandleOrderAsync across the solution
Show me the inheritance hierarchy of BaseController
What methods call ValidateUser?
Run the tests in PaymentTests and tell me what's failing

If you have multiple MCP servers connected (e.g., vs-mcp + vs-mcp-whisper), specify which one when needed.


Who Is This For?

Enterprise .NET developers working on solutions with:

  • Multiple projects and complex architectures
  • Inheritance hierarchies and interface implementations
  • Dependency injection (where grep can't find implementations)
  • Large codebases where text search produces too much noise

If your AI assistant keeps saying "I found 47 matches for that method name" — you need VS-MCP.


vs. Other Approaches

ApproachSymbol SearchInheritanceCall GraphSafe Rename
VS-MCP (Roslyn)✅ Semantic✅ Full tree✅ Callers + Callees✅ Compiler-verified
AI Agent (grep/fs)⚠️ Text match❌ Text replace
Other MCP servers

Requirements

  • Visual Studio 2022 (17.13+) or Visual Studio 2026
  • Windows (amd64 or arm64)
  • Any MCP-compatible AI tool

Support


About

0ics srl — Italian software company specializing in AI-powered development tools.

Built by Ladislav Sopko — 30 years of software development, from assembler to enterprise .NET.


VS-MCP: Because your AI deserves the same intelligence as your IDE.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Amap Maps高德地图官方 MCP Server
CursorThe AI Code Editor
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server