
Roslyn Mcp
io.github.darylmcdPublished by GitHub account darylmcdv5.0.1Updated Nov 7, 2026
Local-first MCP server for semantic C# analysis & refactoring via Roslyn & MSBuildWorkspace.
Overview
Local stdio MCP server that gives an assistant semantic C# analysis, navigation, diagnostics and preview-then-apply refactoring on real .sln/.slnx/.csproj…
- What you can do
- Manage workspaces and sessions: load solutions and projects, inspect server info and catalog resources
- Navigate code semantically: find symbols and references across the loaded workspace
- Report diagnostics and run build and test helpers
- Refactor with a preview-then-apply flow: previews return short-lived tokens before multi-file edits are applied
- Experimental families add project mutation, scaffolding, orchestration and direct text edits
- When to use it
- Useful when an assistant must work on a real C# solution rather than raw text: understanding symbol relationships, checking diagnostics, running builds and tests, or making multi-file refactors that should be dry-run first.
- Requirements
- Runs locally over stdio; requires the .NET 10 SDK. Install as a global tool, run on demand via dnx (needs NuGet access on first launch), or use the Claude Code plugin. ROSLYNMCP_SANCTIONED_ROOTS must be set, since an unset boundary is fail-closed and rejects every path-taking tool. Optional ROSLYNMCP_* settings and ROSLYNMCP_TOOL_TIERS=stable.
Installation
In SourceWeft
- Open Roslyn Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Roslyn-Backed MCP Server
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. Refactoring tools follow a preview → apply discipline: previews return short-lived tokens, so agents can dry-run multi-file edits before mutating the workspace. It ships as a .NET global tool, a Claude Code plugin, and a source-buildable stdio host.
Correct package ID:
Darylmcd.RoslynMcp· CLI:roslynmcp· Plugin:roslyn-mcp@roslyn-mcp-marketplace
Quick Start
Prerequisite: the .NET 10 SDK.
Option A — Install As A Global Tool
Update later with dotnet tool update -g Darylmcd.RoslynMcp.
Configure a filesystem boundary before first use. The global tool ships a binary, not a config, and an unset boundary is fail-closed: every path-taking tool rejects its input. Set
ROSLYNMCP_SANCTIONED_ROOTSin your MCP client config (for example a project-scope.mcp.json):
.resolves against the server process's working directory, which your MCP client chooses; use an absolute path to pin the boundary. See Setup.
Option B — Zero-Install Via dnx (.NET 10)
dnx resolves the package from NuGet on demand, without installing a global shim: run dnx Darylmcd.RoslynMcp. Pin a version for reproducible setups with Darylmcd.RoslynMcp@<version>. Configure the same ROSLYNMCP_SANCTIONED_ROOTS boundary as above; copy-paste configs live in docs/mcp-json-examples/, and details are in Setup.
Option C — Claude Code Plugin
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. The plugin's bundled "." boundary resolves to the session's working directory, so start Claude Code inside the repo you want to analyze; see Setup for the other supported overrides.
Per-Client Config
The JSON shape is the same across MCP clients (VS Code uses a top-level "servers" key); only the config file path differs. See the compatibility matrix for per-client paths and a health-check prompt, and docs/mcp-json-examples/ for copy-ready snippets.
Live Surface
The current release exposes 171 tools (110 stable / 61 experimental), 14 resources (9 stable / 5 experimental), and 20 prompts (all experimental).
Use the running server for the authoritative live catalog and support tiers:
server_infofor a human-readable summaryroslyn://server/catalogfor the machine-readable contractroslyn://server/resource-templatesfor resource URI templates
Stable families include workspace/session management, semantic navigation, diagnostics, build/test helpers, and preview/apply refactoring flows. Experimental families include broader project mutation, scaffolding, orchestration, direct text-edit helpers, and prompts. Set ROSLYNMCP_TOOL_TIERS=stable to register only the closed stable workflow (currently 91 callable tools) for clients that eagerly load tool definitions.
Configuration And Security
All operational settings are optional ROSLYNMCP_* environment variables with compiled-in defaults; the full reference is in docs/setup.md. The exception is ROSLYNMCP_SANCTIONED_ROOTS, which you must set (see above).
Loading a solution or project executes MSBuild evaluation: only load repositories you trust, or run the server in a sandbox. The filesystem boundary is server-owned; a client's MCP Roots can only narrow it. See docs/setup.md and SECURITY.md for the disclosure policy. Upgrading from 2.x? Read the migration notes first.
Docs
- docs/README.md — index of everything under
docs/ - docs/setup.md — packaging, install options, configuration, security model, plugin install, CI artifacts
- docs/compatibility.md — MCP client compatibility matrix and health check
- docs/stdio-client-integration.md — custom MCP client integration
- docs/product-contract.md — stable vs experimental surface contract
- docs/release-policy.md — release gates and compatibility rules
- CONTRIBUTING.md — build from source, tests, and filing surface-test findings
- AGENTS.md — bootstrap entry point for AI agents working in this repo
- ai_docs/README.md — canonical AI-doc routing index
Support
- Bugs and feature requests: GitHub Issues
- Contribution guidelines: CONTRIBUTING.md
- Security disclosures: SECURITY.md
Source: README.md at commit 634ef45
Tools
0Version history
5- v5.0.1LatestNov 7, 2026
- v5.0.0Oct 29, 2026
- v4.3.0Sep 29, 2026
- v4.2.1Sep 18, 2026
- v4.2.0Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts