|
| Criteria | RoslynMCP | Grep/Glob |
|---|---|---|
| Symbol search accuracy | ✅ 100% (semantic) | ⚠️ ~80% (text-based) |
| Distinguishes overloads | ✅ Yes | ❌ No |
| Understands types | ✅ Yes | ❌ No |
| Call hierarchy | ✅ Callers/Callees | ❌ No |
| Interface implementations | ✅ Yes | ⚠️ Regex hacks |
| Method overrides | ✅ Yes | ⚠️ Regex hacks |
| False positives | ✅ 0% | ⚠️ Possible (comments, strings) |
When to Use
Use RoslynMCP for:
- Find all usages of a symbol (class, method, property)
- Refactoring - find all places that need to change
- Code understanding - type hierarchy, call graphs
- Analyze method overloads
- Find interface implementations
- Impact analysis - what breaks if I change this?
Use Grep/Glob for:
- Quick text search - strings, comments, TODO
- Non-C# files - XML, JSON, config
- Regex patterns
- Multi-file-type search
Installation
- Install RoslynMCP from Visual Studio Marketplace
- Open your C# solution in Visual Studio
- Go to View → Other Windows → RoslynMCP
- Copy the configuration for your AI assistant
Features
v1.11.0
- New:
get_completions- Get code completion suggestions at any position (like IntelliSense) - New:
get_signature_help- Get method signature and parameter info during calls - New:
apply_rename- Rename symbols across entire solution with Roslyn accuracy
v1.10.0
- Fixed:
reload_filenow works correctly (was failing with "TryApplyChanges cannot be called from a background thread")
RoslynMCP provides 49 Roslyn-powered tools including:
- Navigation: Find references, definitions, implementations, callers/callees
- Analysis: Type info, class hierarchy, code metrics, data flow
- Diagnostics: Real-time errors, warnings, async issues, performance problems
- Refactoring: Rename preview, apply rename, impact analysis, extract method feasibility
- Code Intelligence: Completions, signature help
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 tool window (View → Other Windows → RoslynMCP)
- Verify the server status shows "Running"
No tools available
- Make sure you copied the correct configuration for your AI assistant
- Restart your AI assistant after configuration changes
License
MIT