Semantic navigation
Find symbols, references, callers, implementations and overrides across the whole solution — resolved by Roslyn, not text search.
Model Context Protocol · Roslyn · .NET 10
An MCP server that gives Claude, Cursor, and Copilot a semantic, read-only view of your C# solution via Roslyn — so agents navigate by structure instead of re-reading source.
dotnet tool install --global RoslynLensWhat it does
Thirty-four MCP tools built on the Roslyn compiler platform — read-only, token-optimized, and aware of your real project references.
Find symbols, references, callers, implementations and overrides across the whole solution — resolved by Roslyn, not text search.
Namespace communities, god nodes, surprising cross-namespace dependencies, circular dependencies and isolated symbols reveal coupling and layering issues.
18 built-in detectors for async/await, HttpClient, DateTime, EF Core, logging, secrets and more — plus opt-in Roslynator (500+ rules).
Responses are 30–150 tokens of structured JSON. A reproducible, offline benchmark measures 77% pooled / 73% median reduction versus reading source.
BFS auto-discovery finds your .sln/.slnx, with multi-solution switching at runtime. No manual path wiring.
Every tool advertises MCP read-only/idempotent hints. RoslynLens inspects your code; it never edits it.
The toolbox
From single-symbol lookups to whole-solution architecture graphs and batch queries.
find_symbolfind_referencesfind_callersfind_implementationsfind_overridesfind_dead_codeget_symbol_detailget_public_apiget_type_hierarchyget_file_overviewget_type_overviewresolve_external_sourceanalyze_methodanalyze_control_flowanalyze_data_flowget_complexity_metricsdetect_antipatternsdetect_duplicatesget_communitiesfind_god_nodesfind_surprising_dependenciesfind_isolated_symbolsdetect_circular_dependenciesget_dependency_graphget_project_graphget_diagnosticsget_test_coverage_mapget_module_depends_onlist_solutionsswitch_solutionfind_symbols_batchget_symbol_detail_batchget_public_api_batchvalidate_granit_conventionsInstall
Works with Claude Code, Claude Desktop, Cursor and Copilot over stdio.
dotnet tool install --global RoslynLensGlobal .NET tool. Requires the .NET 10 SDK.
claude mcp add --scope user --transport stdio roslyn-lens -- roslyn-lensRegister the stdio server with Claude Code.
npx @anthropic-ai/mcpb pack mcpb roslyn-lens.mcpbPack the bundle, then drag the .mcpb into Settings → Extensions.
docker run --rm -i -v "$PWD":/workspace roslyn-lensSDK-based image; mount the repo to analyse at /workspace.
Read-only, reproducible, and measured — 77% fewer tokens on navigation tasks.