Darylmcd.RoslynMcp
Roslyn-backed MCP server providing semantic C# analysis for AI coding agents
Ask AI about Darylmcd.RoslynMcp
Powered by Claude Β· Grounded in docs
I know everything about Darylmcd.RoslynMcp. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
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.
What It Does
- Loads real C# solutions and projects with session-scoped
workspaceIds. - Exposes semantic navigation, diagnostics, build/test helpers, and preview/apply refactoring workflows over MCP.
- Ships as a .NET global tool, a Claude Code plugin, and a source-buildable stdio host.
- Publishes the authoritative live surface through
server_infoandroslyn://server/catalog.
Quick Start
Prerequisites
- .NET 10 SDK β pinned to
10.0.100inglobal.json(rollForward: latestFeature)
Install As A Global Tool
dotnet tool install -g Darylmcd.RoslynMcp
- Package ID:
Darylmcd.RoslynMcp - CLI command:
roslynmcp
Build And Run From Source
dotnet build RoslynMcp.slnx --nologo
dotnet test RoslynMcp.slnx --nologo
dotnet run --project src/RoslynMcp.Host.Stdio
Claude Code Plugin
/plugin marketplace add darylmcd/Roslyn-Backed-MCP
/plugin install roslyn-mcp@roslyn-mcp-marketplace
The plugin bundles the MCP server, 32 skills, and safety hooks. For packaging, reinstall, and local plugin-dev details, see docs/setup.md and docs/reinstall.md.
Any Stdio MCP Client
Point the client at the installed tool:
{
"mcpServers": {
"roslyn": {
"type": "stdio",
"command": "roslynmcp"
}
}
}
For NDJSON framing, handshake order, and minimal Python/C# client examples, see docs/stdio-client-integration.md.
MCP Registry (submission pending)
The server is also being published to the public MCP Registry. Once the submission is approved, MCP-Registry-aware clients will be able to discover and install the server by name.
Draft manifest: .claude-plugin/server.json β published name io.github.darylmcd/roslyn-mcp, NuGet package Darylmcd.RoslynMcp, runtime dnx.
Until the submission is approved, prefer the Global Tool or Claude Code Plugin install paths above. After approval, this section will be updated with the registry URL and the registry-aware client install snippet.
Configuration
The server starts with built-in defaults. To override ROSLYNMCP_* values for a repo, add a project-scope .mcp.json with literal env values.
| Variable | Default | Purpose |
|---|---|---|
ROSLYNMCP_MAX_WORKSPACES | 8 | Concurrent workspace cap |
ROSLYNMCP_BUILD_TIMEOUT_SECONDS | 300 | Build timeout |
ROSLYNMCP_TEST_TIMEOUT_SECONDS | 600 | Test timeout |
ROSLYNMCP_PREVIEW_TTL_MINUTES | 5 | Preview-token TTL |
ROSLYNMCP_REQUEST_TIMEOUT_SECONDS | 120 | Per-request timeout |
Copy-ready examples live in docs/mcp-json-examples/README.md. The full runtime/config surface is documented in ai_docs/runtime.md.
Security
Loading a solution or project executes MSBuild evaluation. Treat workspaces as trusted code unless you run the server inside a sandbox, container, or VM.
- Only load repos you trust.
- Use isolation for untrusted workspaces.
- Path validation is defense in depth, not a substitute for trusting the loaded project graph.
See SECURITY.md for disclosure policy.
Live Surface
The current release exposes 168 tools (111 stable / 57 experimental), 13 resources (9 stable / 4 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.
Repository Layout
src/RoslynMcp.Host.Stdio/β stdio host, tool/resource/prompt wiring, loggingsrc/RoslynMcp.Core/β DTOs, contracts, abstractions, preview-store typessrc/RoslynMcp.Roslyn/β Roslyn workspace, analysis, diagnostics, refactoring, execution servicestests/RoslynMcp.Tests/β integration and regression coverageskills/β bundled Claude Code skill definitionshooks/β Claude Code safety hooks
Docs
- docs/setup.md β packaging, Docker, tool install, plugin install, CI artifacts
- 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
- 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
