️⃣ 🏠 🪟 - Roslyn-based Visual Studio integration: semantic code navigation, symbol search, inheritance trees,…
MCP AI Server for Visual Studio
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Other tools read your files. MCP AI Server understands your code.**
The first and only Visual Studio extension that gives AI assistants access to the C# compiler (Roslyn) and the Visual Studio Debugger through the Model Context Protocol. 41 tools. 13 powered by Roslyn. 19 debugging tools (Preview). Semantic understanding, not text matching.
Install
**Install from Visual Studio Marketplace**
Or search for **"MCP AI Server"** in Visual Studio Extensions Manager.
See it in Action
*Click to watch on YouTube*
---
Why MCP AI Server?
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.
MCP AI Server bridges this gap by exposing IntelliSense-level intelligence and the Visual Studio Debugger as MCP tools. Your AI assistant gets the same semantic understanding that powers F12 (Go to Definition), Shift+F12 (Find All References), safe refactoring — and now runtime debugging.
What becomes possible:
| You ask | Without MCP AI Server | With MCP AI Server |
|---------|---------------|-------------|
| "Find WhisperFactory" | grep returns 47 matches | Class, Whisper.net, line 16 — one exact answer |
| "Rename ProcessDocument" | sed breaks ProcessDocumentAsync | Roslyn renames 23 call sites safely |
| "What implements IDocumentService?" | Impossible via grep | Full inheritance tree with interfaces |
| "What calls AuthenticateUser?" | Text matches, can't tell direction | Precise call graph: callers + callees |
| "Why is ProcessOrder returning null?" | Reads code, guesses | Sets breakpoint, inspects actual runtime values |
---
22 Stable Tools
Semantic Navigation (Roslyn-powered)
| Tool | Description |
|------|-------------|
| FindSymbols | Find classes, methods, properties by name — semantic, not text |
| 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: classes, methods, properties, fields |
Code Understanding (Roslyn-powered)
| Tool | Description |
|------|-------------|
| GetInheritance | Full type hierarchy: base types, derived types, interfaces |
| GetMethodCallers | Which methods call this method (call graph UP) |
| GetMethodCalls | Which methods this method calls (call graph DOWN) |
Code Analysis (Roslyn-powered)
| Tool | Description |
|------|-------------|
| GetDiagnostics | Compiler errors & warnings without building — Roslyn background analysis |
Refactoring (Roslyn-powered)
| Tool | Description |
|------|-------------|
| RenameSymbol | Safe rename across the entire solution — compiler-verified |
| FormatDocument | Visual Studio's native code formatter |
Project & Build
| Tool | Description |
|------|-------------|
| ExecuteCommand | Build or clean solution/project with structured diagnostics |
| ExecuteAsyncTest | Run tests asynchronously with real-time status |
| GetSolutionTree | Solution and project structure |
| GetProjectReferences | Project dependency graph |
| LoadSolution | Open a .sln/.slnx file — server stays on the same port |
| TranslatePath | Convert paths between Windows and WSL formats |
Editor Integration
| Tool | Description |
|------|-------------|
| GetActiveFile | Current file and cursor position |
| GetSelection / CheckSelection | Read active text selection |
| GetLoggingStatus / SetLogLevel | Extension diagnostics |
---
19 Debugging Tools (Preview)
Your AI assistant can now debug your .NET code at runtime through the Visual Studio Debugger. Set breakpoints, step through code, inspect variables, attach to Docker containers and WSL processes.