# Roslyn Workbench MCP

> Roslyn Workbench MCP is an open-source MCP server for developer tools. Compiler-aware C# navigation, Roslyn code fixes and reviewable edits for agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Windows, Linux, macOS, CLI, self-hosted
- **Website:** https://lantean-code.github.io/roslyn-workbench-mcp/1.2.0/
- **Repository:** https://github.com/lantean-code/roslyn-workbench-mcp
- **MCP Registry name:** io.github.lantean-code/roslyn-workbench-mcp
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

Roslyn Workbench runs locally and gives a coding agent the C# fixes and refactorings Visual Studio offers, powered by the same .NET Compiler Platform. It says it sits over more than 230 built-in Roslyn code fix and refactoring providers, and the README's reference catalogue lists 57 tool definitions across navigation, analysis, Code Actions and workspace management. The live set depends on operational mode and plugins.

Edits go through transactions: stage the change, inspect the diff, then commit or roll back, with preview, history, conflict detection and crash recovery. Four modes control risk: inspection-only (the default, no mutation tools), transactional, approval-required and autonomous-trusted. Actions needing dialogs or package installation are excluded, so it is not full Visual Studio parity.

It installs from NuGet as a .NET tool requiring a .NET 10 SDK. Windows x64, Linux x64 and WSL2 are supported; macOS is best effort. An optional skill guides agents through its workflow.

## Features

- **Roslyn Code Actions:** Discovers and applies compiler-generated fixes and refactorings.
- **Semantic navigation:** Definitions, references, implementations, callers and type hierarchies.
- **Staged transactions:** Preview, commit or roll back changes with conflict detection.
- **Operational modes:** Inspection-only by default; mutation is opt-in.
- **Fix All:** Prepares supported fixes across a document, project or solution.
- **Bounded responses:** Avoids loading a whole solution into the chat.

## Good for

- Extract a method or inline a variable with Roslyn
- Find all references to a symbol using compiler semantics
- Apply an analyzer's Fix All across a project
- Review a refactoring diff before it touches files

## Install

### Claude Code (Terminal)

```sh
claude mcp add roslyn-workbench-mcp -- dnx Lantean.Roslyn.Workbench.Mcp --yes
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "roslyn-workbench-mcp": {
      "command": "dnx",
      "args": [
        "Lantean.Roslyn.Workbench.Mcp",
        "--yes"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "roslyn-workbench-mcp": {
      "command": "dnx",
      "args": [
        "Lantean.Roslyn.Workbench.Mcp",
        "--yes"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "roslyn-workbench-mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "Lantean.Roslyn.Workbench.Mcp",
        "--yes"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "roslyn-workbench-mcp": {
      "command": "dnx",
      "args": [
        "Lantean.Roslyn.Workbench.Mcp",
        "--yes"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "roslyn-workbench-mcp": {
      "command": "dnx",
      "args": [
        "Lantean.Roslyn.Workbench.Mcp",
        "--yes"
      ]
    }
  }
}
```

## FAQ

### Does it change files by default?

No. Inspection-only is the default and exposes no mutation tools.

### What does it need?

A .NET 10 SDK; installed as a NuGet .NET tool.

### Which platforms work?

Windows x64, Linux x64 and WSL2; macOS is best effort.

### Does it run in the cloud?

No. It runs locally over stdio on your machine.

### Is Roslyn Workbench MCP free?

Yes. Roslyn Workbench MCP is open source, so you can use and self-host it for free.

### How do I add Roslyn Workbench MCP to Claude Code?

Run this command in your terminal: claude mcp add roslyn-workbench-mcp -- dnx Lantean.Roslyn.Workbench.Mcp --yes

### What are the best alternatives to Roslyn Workbench MCP?

The closest alternatives to Roslyn Workbench MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/roslyn-workbench-mcp
