Basic information
About Roslyn Code Lens MCP Server
Roslyn MCP server: semantic .NET/C# intelligence - analysis, refactoring, tests, IL inspection.
Roslyn Code Lens is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by MarcelRoozekrans. Supported transport: stdio. Runtime: C#. License: MIT. The repository has 69 GitHub stars. Source code is hosted on github.com. Related topics: ai-agents, claude-code, code-analysis, code-intelligence, csharp.
Setup
{
"mcpServers": {
"roslyn-codelens": {
"type": "stdio",
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp",
"--yes"
]
}
}
}
{
"mcpServers": {
"roslyn-codelens": {
"type": "stdio",
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp",
"--yes"
]
}
}
}
{
"servers": {
"roslyn-codelens": {
"type": "stdio",
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp",
"--yes"
]
}
}
}
Roslyn Code Lens MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"roslyn-codelens": {
"type": "stdio",
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp",
"--yes"
]
}
}
}
Roslyn Code Lens MCP Server tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Roslyn Code Lens?
A Roslyn-based MCP server that gives AI agents deep semantic understanding of .NET codebases — type hierarchies, call graphs, DI registrations, diagnostics, and more. It is built for AI-assisted development tools working with .NET solutions.
How to use Roslyn Code Lens?
Install as a .NET global tool with dotnet tool install -g RoslynCodeLens.Mcp, or use via dnx in VS Code/Visual Studio. The server auto-discovers .sln files by walking up from the current directory, or you can pass a solution path directly, e.g., roslyn-codelens-mcp /path/to/MySolution.sln.
Key features of Roslyn Code Lens
- Semantic type hierarchy and inheritance analysis
- Cross-referencing call sites and symbol references
- Dependency injection registration scanning
- Compiler diagnostics and code fix suggestions
- Dead code detection and complexity metrics
- Source generator output inspection
Use cases of Roslyn Code Lens
- Analyze type hierarchies and inheritance relationships in a solution
- Detect dead code and unused symbols across projects
- Review compiler diagnostics and apply available code fixes
- Inspect dependency injection registrations and service lifetimes
- Identify circular dependencies in project or namespace graphs
Frequently asked questions
1 What are the runtime requirements?
.NET 10 SDK and a .NET solution with compilable projects are required.
2 How does the server discover my solution?
It automatically walks up from the current directory to find .sln files, or you can pass the solution path as a command-line argument.
3 Does it support hot reload?
Yes. The server watches .cs, .csproj, .props, and .targets files. Affected projects are lazily re-compiled on the next tool query.
4 What performance can I expect?
Most queries complete in microseconds to low milliseconds after a one-time solution load of about 928 ms (benchmarked on an i9-12900HK with .NET 10.0.3).
5 How do I install Roslyn Code Lens?
You can install it as a .NET global tool, use the dnx command in VS Code/Visual Studio, or run claude install gh:MarcelRoozekrans/roslyn-codelens-mcp for Claude Code.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In