Roslyn MCP Server

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

Visit Roslyn MCP Server

How to install and configure Roslyn MCP Server

  1. Clone the repository and navigate to the server folder: 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.

What you can do with Roslyn MCP Server

  • Locate classes, interfaces, or methods across a solution using wildcard pattern matching such as Service or GetUser. - Find all incoming and outgoing references to a specific class or method across all projects in a .NET solution. - Inspect detailed type definitions, method signatures, and property metadata before planning code refactoring. - Analyze solution-level project dependencies and namespace usage patterns to evaluate architectural structure. - Identify refactoring candidates by scanning codebases for methods with cyclomatic complexity metrics exceeding a chosen threshold.

Key facts

  • Open Source
  • https://github.com/carquiza/RoslynMCP
  • Developer Tools & Code Intelligence
  • code analysis, csharp, dotnet, roslyn

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab — MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…

What is Roslyn MCP Server?

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.

What are the prerequisites for running Roslyn MCP Server?

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.

What tools are included in Roslyn MCP Server?

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.

Is Roslyn MCP Server open source?

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.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories