Local-first MCP server for semantic C# analysis & refactoring via Roslyn & MSBuildWorkspace.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Local-first MCP (Model Context Protocol) server for semantic C# analysis, navigation, validation, and refactoring on real .sln / .slnx / .csproj workspaces. It uses Roslyn and MSBuildWorkspace, runs over stdio, and does not require Visual Studio.
Correct package ID:
Darylmcd.RoslynMcpΒ Β·Β CLI:roslynmcpΒ Β·Β Plugin:roslyn-mcp@roslyn-mcp-marketplace
workspaceIds.server_info and roslyn://server/catalog.just ci), release verification scripts, and documented update paths for the global tool and release-pinned Claude Code plugin.${user_config.*} placeholder substitution that breaks prompt-skipping install flows; the server starts with compiled-in defaults and accepts literal overrides via project-scope .mcp.json.server_info + roslyn://server/catalog so clients can discover the exact tool/resource/prompt set and support tier (stable vs experimental) without guessing.dotnet tool install), zero-install via dnx (.NET 10), or the Claude Code plugin.10.0.400 floor in global.json (rollForward: latestFeature); published install paths retain their own package/runtime requirementsDarylmcd.RoslynMcproslynmcpdotnet tool update -g Darylmcd.RoslynMcpConfigure a filesystem boundary before first use. The global tool ships a binary, not a config β you write your own
.mcp.json, and an unset boundary is fail-closed: every path-taking tool (workspace_load, edits, symbol lookups) rejects its input, and solution discovery returns nothing. SetROSLYNMCP_SANCTIONED_ROOTSin your client config:
.resolves against the server process's working directory, which your MCP client chooses β use an absolute path if you want the boundary pinned regardless of how the server is launched. See Configuration. The Claude Code plugin and Desktop extension ship this default already; only hand-written configs need it.
dnx (.NET 10)dnx is the .NET SDK's npx-equivalent: it resolves a tool package from NuGet on demand, without installing a global shim. Requires .NET 10 SDK 10.0.100 or later (dnx ships with the SDK).
One-shot smoke test:
The process should start and then appear to hang β that's expected; it's an MCP server waiting for protocol messages on stdin. dnx is noninteractive unless --interactive is explicitly requested, so MCP hosts need no consent flag.
.mcp.json snippet:
Trade-offs vs. the global tool:
dotnet tool update step).Darylmcd.RoslynMcp@<version>.A copy-paste config also lives at docs/mcp-json-examples/dnx.mcp.json.
The plugin bundles 32 skills and safety hooks, then launches the exact release-matched Darylmcd.RoslynMcp package through dnx; it does not require a global roslynmcp shim. The first launch requires NuGet access unless the package is already cached. For packaging, reinstall, and local plugin-dev details, see docs/setup.md and docs/reinstall.md.
The JSON shape is the same across MCP clients β only the file path differs. Drop one of the docs/mcp-json-examples/ snippets into the right location for your client:
| Client | Config file | Notes |
|---|---|---|
| Claude Code | .mcp.json (repo root) | Project-scope; pairs naturally with the Claude Code Plugin path above. |
| Cursor | .cursor/mcp.json (repo root) or ~/.cursor/mcp.json (global) | Project-scope wins over global. |
| VS Code (MCP-aware) | .vscode/mcp.json (repo root) | Workspace-scope; restart the MCP host after editing. |
| Claude Desktop | claude_desktop_config.json (per-OS app-data dir) | Global only; no project-scope config. |
Minimal config (works with Option A β global tool):
For the Option B (dnx) form, use the snippet from the previous section or copy docs/mcp-json-examples/dnx.mcp.json.
For NDJSON framing, handshake order, and minimal Python/C# client examples, see docs/stdio-client-integration.md.
After installing and wiring up .mcp.json, paste this single prompt into your MCP client to verify the server is reachable and report its surface:
Call
server_infoand read theroslyn://server/catalogresource. Report back:
- The server name and version.
- The total tool / resource / prompt counts and their stable-vs-experimental split.
- Whether any workspaces are currently loaded (and their IDs if so).
- Any warnings or degraded-state flags.
If both calls succeed and the version matches what you installed, the install is healthy.
The server is published to the official MCP Registry under the name io.github.darylmcd/roslyn-mcp. MCP-Registry-aware clients β and the downstream catalogs that mirror the registry (the GitHub MCP Registry, the VS Code and Visual Studio MCP galleries, and aggregators) β can discover and install the server by name.
Manifest: .claude-plugin/server.json β name io.github.darylmcd/roslyn-mcp, NuGet package Darylmcd.RoslynMcp, runtime dnx. Every release tag republishes it automatically via the publish-nuget workflow using GitHub OIDC.
You can also install directly without a registry-aware client via the Global Tool or Claude Code Plugin paths above.
The server starts with built-in operational defaults. File-path access is the exception: configure
ROSLYNMCP_SANCTIONED_ROOTS explicitly (usually . in a project-scope .mcp.json). Multiple roots
use the platform path separator (; on Windows, : on macOS/Linux). An empty root list fails
closed; see Setup. Other ROSLYNMCP_* values
remain optional literal env overrides.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/roslyn-mcp)<a href="https://allmcps.com/mcp/roslyn-mcp"><img src="https://allmcps.com/api/badge/roslyn-mcp?style=directory" alt="Roslyn MCP on AllMCPs" /></a>