Give your AI assistant full control over Visual Studio — code analysis, debugging, UI automation, and more.Make AI coding assistants actually useful for professional C# development.
Demo Videohttps://www.youtube.com/watch?v=skvnHbm2lpk https://www.youtube.com/watch?v=6d6Kx-MnXOc https://www.youtube.com/watch?v=b3aIBrVaaQo Quick Start
Multiple VS instances: Each Visual Studio window runs its own MCP server. AI auto-connects to the one matching your working directory. Tip: Create skills (slash commands) for the tools you use most — this dramatically improves tool selection and output quality. Configuration ExamplesOpen the RoslynMCP Dashboard in Visual Studio (View → Other Windows → RoslynMCP Dashboard) and copy the connection command for your AI tool.
Claude Code / Codex:
Works with any AI client that supports the Model Context Protocol. Features
Core FeaturesRoslyn Code Analysis
OOP C# Programming (
|
| Category | Actions |
|---|---|
| Roslyn analysis | inspect (.razor components, events, @bind, state, methods → C# file:line), list_pages |
| UI actions | click, click_by_text, type, press_key, select, hover, scroll, check/uncheck, wait, focus, clear |
| Page observation | accessibility_tree (with HTML snippets), snapshot, screenshot (full page or element) |
| DevTools | console logs, network requests with status codes, cookies, storage |
| CSS & inspection | css (get/set styles), element_state, highlight, count |
| Emulation | viewport (mobile/tablet), emulate (dark/light mode), performance metrics |
| Navigation | navigate, eval (JavaScript), connect, disconnect |
Key capabilities:
- Real browser clicks via CDP — works with Blazor EventCallbacks (not just JS
.click()) click_by_textwith smart overlay/modal detection — finds buttons in popups first- Enhanced
accessibility_treeincludes HTML snippets for interactive elements inspectcombines Roslyn static analysis with runtime browser state — AI sees both the UI and the C# handler behind each buttonconsoleandnetworkcapture logs and HTTP requests in real-time with status codes and errors
Memory & Knowledge Base
memory_*(17 tools) — persistent cross-session memory with vector search (ONNX)kb_*(8 tools) — permanent knowledge base with semantic + full-text search
Dashboard
- Tool window in VS (View → Other Windows → RoslynMCP Dashboard)
- License status with activation (trial countdown, license key input, Buy button)
- Connection configs for Claude Code, Codex, GitHub Copilot, Cursor — copy with one click
- Tabs: Workflows editor, Memory editor, Knowledge Base editor, Debug Monitor (live windows/elements/events)
Experimental Features
These features are functional but still being improved and tested.
Claude Chat Panel
- Built-in Claude Code chat directly in Visual Studio (View → Other Windows → Claude Chat)
- Adapted from Claude Code for VS Code extension — React UI running in WebView2
- RoslynMCP tools are automatically connected via
--mcp-config— no manual setup needed - Bundled Roslyn skills are included with the extension at
Skills/.claude/skills/inside the VSIX. To customize, copy them to your project's.claude/skills/directory or edit them for use with Claude Code in PowerShell
Markdown Tool
md— structured .md editing & multi-file search (18 actions)- Single-file:
toc,tree,read,read_section,search,edit_section,insert_section,append,delete_section,replace - Tree-first creation:
create_doc,add_node,bulk_create,rename_node,move_node— create documents as a tree, auto heading levels - Multi-file index:
index,search_all,stats— hybrid search: SQLite FTS5 (keywords) + ONNX embeddings (semantic) - On-demand indexing: only re-indexes changed files, auto-cleans deleted, auto-reindex on edit
- Single-file:
DevGraph
graph_*(10 tools) — track changes, dependencies, cause-effect during developmentgraph_build_from_type— auto-build dependency graph from Roslyn semantic modelgraph_track_change/graph_track_dependency/graph_track_cause— record changes and relationshipsgraph_get_impact— what breaks if I change X?graph_get_dependencies/graph_get_path/graph_get_history— explore connections and evolutiongraph_visualize— export as Mermaid or DOT diagram
AI Workflow Engine
wf_*(27 tools) — reusable step-by-step instructions for AI- AI follows steps, annotates results, learns from mistakes
- Step types: execute, verify, wait, call_case (nested), ai_freeform
- Background watchers for windows, UI elements, processes
- Progress tracking and run history
Troubleshooting
Extension not loading
- Check Visual Studio Output window for errors
- Verify extension is enabled in Extensions → Manage Extensions
AI assistant not connecting
- Ensure Visual Studio has a solution open
- Open the RoslynMCP Dashboard (View → Other Windows → RoslynMCP Dashboard) — status should show "Running"
- Copy the connection command from the Dashboard for your AI tool
First connection fails (e.g. in VS Copilot logs): This is normal — the MCP server starts before the extension finishes loading. The automatic retry connects successfully. No action needed.
Multiple VS instances or wrong project:
Ask your AI assistant: "List all active RoslynMCP instances and switch to my current project."
The assistant will use list_instances and switch_instance to reconnect to the right Visual Studio instance.
No tools available
- Make sure you copied the correct configuration for your AI assistant
- Restart your AI assistant after configuration changes
Data Storage
RoslynMCP creates databases in .roslyn-mcp/ inside your solution directory:
| File | Contents |
|---|---|
memory.db |
Memory, Knowledge Base, DevGraph, configuration |
testcases.db |
AI Workflow Engine: workflows, steps, run history |
md_index.db |
Markdown multi-file FTS5 index (sections, hierarchy, full-text search) |
License data is stored in %AppData%/RoslynMcp/.
RoslynMCP vs Other AI IDE Integrations
All major AI coding tools (Claude Code, GitHub Copilot, Cursor) provide code understanding, inline diffs, terminal access, and agent capabilities. RoslynMCP is different in two specific ways:
Direct Roslyn Compiler Access
Other tools analyze code through text search or LLM context windows. RoslynMCP connects to the same Roslyn compiler API that powers Visual Studio IntelliSense:
| Capability | Text/LLM-based tools | RoslynMCP |
|---|---|---|
| Find references | Text search — may miss overloads, generics, partial classes | find_references — compiler-resolved, 100% accurate |
| Understand type | LLM reads source text | understand_type — members, hierarchy, callers from compiled model |
| Call graph | Not available | get_full_context — recursive call tree up & down |
| Refactoring | Generate text diff | apply_rename, apply_extract_method, apply_split_class — via Roslyn code actions |
| Edit C# code | Generate text diff, hope it compiles | cs tool — 86 OOP actions with instant Roslyn diagnostics |
| Symbol at cursor | IDE-internal or unavailable | editor_context — resolved type, kind, full name from semantic model |
| Data flow | Not available | analyze_data_flow, analyze_operations |
Full Visual Studio Debugger Control
No other AI tool gives the AI model direct programmatic access to the Visual Studio debugger:
vs start_debug/stop_debug— launch and stop debugging sessionsvs step_over/step_into/step_out— sync stepping, returns new state + locals automaticallyvs breakpoint_add— conditional breakpoints, function breakpointsvs_query locals/callstack/expression— inspect runtime statedebug_monitor— live window/dialog tracking with blockingwaitFor
This enables the self-development loop: code → build → set breakpoint → debug → inspect → fix — all controlled by AI.
Scaffolding vs Refactoring
When creating files from scratch, text-based tools write entire files in one call. RoslynMCP's cs tool trades raw speed for compile-time safety — every operation is validated by Roslyn before saving:
| Task | Text-based tools | RoslynMCP | Faster |
|---|---|---|---|
| Create new class | Write — one call, instant |
cs batch — create + add members + validate diagnostics |
Text-based |
| Create 5 classes | 5 parallel Write calls |
5 parallel cs batch calls — same parallelism, plus compile check |
Text-based |
| Add method to existing class | Edit — text diff, may break syntax |
cs add_method — Roslyn-parsed, guaranteed valid |
~Equal |
| Rename across solution | Edit multiple files, hope nothing breaks |
apply_rename — compiler-resolved, updates all references |
RoslynMCP |
| Move statements inside method | Read → understand nesting → Edit | cs update_statement with block path — precise targeting |
~Equal |
| Find all usages | grep — misses overloads, generics |
find_references — 100% accurate from compiler |
RoslynMCP |
| Refactor + verify no errors | Edit → build → fix errors → repeat | cs edit → instant diagnostics → done in one pass |
RoslynMCP |
Trade-off: Scaffolding from scratch is slightly slower because each cs batch call validates syntax via Roslyn compiler. The payoff: zero broken builds, zero missing references, zero syntax errors in generated code. For refactoring and multi-file changes, RoslynMCP eliminates the trial-and-error cycle that text-based tools require.
License
Starting from v1.18.6, RoslynMCP includes a 30-day free trial. After the trial, a subscription is required.
- Trial: 30 days, full access, no registration needed
- Subscription: available at roslynmcp.lemonsqueezy.com
- License key: enter in RoslynMCP Dashboard (View → Other Windows → RoslynMCP Dashboard)
- Previous versions (v1.18.4 and earlier) remain fully free
For enterprise licensing or questions, contact via Visual Studio Marketplace.
Tired of typing prompts manually? 🎤
Try Murmur — offline voice-to-text for Windows. Fast, private, no cloud. 👉 https://murmurvt.com/