Roslyn MCP Server is an MCP server that integrates Microsoft's Roslyn compiler platform to provide Claude Desktop with deep code analysis and navigation capabilities for C# codebases. It connects Claude directly to C# solution files, parsing abstract syntax trees and symbol graphs to inspect classes, methods, properties, and project architecture. Built for .NET software engineers, code reviewers, and software architects, the server enables automated exploration and refactoring workflows within complex C# projects. Users can locate symbol definitions using wildcard pattern matching, find cross-project references across entire solutions, and inspect granular symbol metadata. Beyond basic navigation, it exposes tools for analyzing inter-project dependencies, tracking namespace usage patterns, and calculating cyclomatic complexity to pinpoint maintainability issues. Operating locally through the .NET runtime, Roslyn MCP Server uses multi-level caching and incremental analysis to deliver responsive querying across large enterprise codebases while maintaining path sanitization and input validation.
Category: Developer Tools & Code Intelligence
Tags: code analysis, csharp, dotnet, roslyn
bash git clone https://github.com/carquiza/RoslynMCP.git cd RoslynMCP/RoslynMcpServer 2. Restore dependencies and build the server: bash dotnet restore dotnet build 3. Open your Claude Desktop configuration file at %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS). 4. Register the server under mcpServers: json { "mcpServers": { "roslyn-code-navigator": { "command": "dotnet", "args": [ "run", "--project", "/path/to/RoslynMCP/RoslynMcpServer" ], "env": { "DOTNET_ENVIRONMENT": "Production", "LOG_LEVEL": "Information" } } } } Replace /path/to/RoslynMCP/RoslynMcpServer with the absolute path to your local project directory. 5. Restart Claude Desktop.Part of MCP Servers
Roslyn MCP Server is a Model Context Protocol server that connects Claude Desktop to Microsoft's Roslyn compiler platform. It gives AI assistants the ability to analyze and navigate C# solutions, perform wildcard symbol searches, track references across projects, and calculate code complexity.
You need the .NET 8.0 SDK or later installed on your machine, along with the Claude Desktop application. Visual Studio 2022 or Visual Studio Code is recommended for local development and testing.
The server provides five main tools: SearchSymbols for wildcard matching, FindReferences for locating symbol usages, GetSymbolInfo for retrieving type and member details, AnalyzeDependencies for project and namespace mapping, and AnalyzeCodeComplexity for cyclomatic complexity checks.
Yes, Roslyn MCP Server is open source and released under the MIT License. You can inspect, modify, and contribute to the code via its GitHub repository.