RoslynMCP MCP Server

A C# MCP (Model Context Protocol) server that integrates with Microsoft's Roslyn compiler platform to provide Claude Desktop with code analysis and

Local serverstdio

What is the RoslynMCP MCP server?

A C# MCP (Model Context Protocol) server that integrates with Microsoft's Roslyn compiler platform to provide Claude Desktop with code analysis and navigation capabilities for C# codebases. Exposed over MCP by the roslynmcp mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

  • Wildcard Symbol Search — - Find classes, methods, and properties using pattern matching (Service, GetUser, etc.)
  • Reference Tracking — - Locate all usages of symbols across entire solutions
  • Symbol Information — - Get detailed information about types, methods, properties, and more
  • Dependency Analysis — - Analyze project dependencies and namespace usage patterns
  • Code Complexity Analysis — - Identify high-complexity methods using cyclomatic complexity metrics
  • Performance Optimized — - Multi-level caching and incremental analysis for large codebases

Adding it to your client

@modelcontextprotocol/inspector on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Its toolset

Everything the assistant can do here goes through one of these:

  • Windows — Run the PowerShell setup script: powershell .\setup.ps1

Configuration

You will need 2 environment variables: DOTNET_ENVIRONMENT, LOG_LEVEL. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • .NET 8.0 SDK or later - Visual Studio 2022 or VS Code (recommended for development) - Claude Desktop application

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the roslynmcp mcp server does with a few real requests.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. RoslynMCP's toolset — Windows — is a fair guide to whether it matches your workflow. It is maintained by carquiza; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
WindowsRun the PowerShell setup script: powershell .\setup.ps1

How to install the RoslynMCP MCP server

{
  "mcpServers": {
    "roslynmcp": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/inspector"],
      "env": {
        "DOTNET_ENVIRONMENT": "your-value",
        "LOG_LEVEL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • .NET 8.0 SDK or later - Visual Studio 2022 or VS Code (recommended for development) - Claude Desktop application
VariableDescriptionRequired
DOTNET_ENVIRONMENTConfiguration value read at startup.Optional
LOG_LEVELConfiguration value read at startup.Optional

Example prompts to try

  • Use RoslynMCP to Windows.

Frequently asked questions

It connects RoslynMCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Windows) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with RoslynMCP directly.