Skip to main content
MCP server CX Codex

RoselineMCP — MCP server for C#: Roslyn code analysis

Gives a coding agent a structural view of a C# solution — symbols, references, call graphs, member-level edits — instead of whole-file reads.

Open on GitHub

What RoselineMCP does

RoselineMCP exposes the Roslyn compiler platform as an MCP server. The agent asks where a symbol is declared, who calls a method, which types implement an interface, and gets an answer built from the solution's structure. Edits work the same way: a single member is replaced, added or deleted, a rename spans the whole solution, and the result comes back as a unified diff rather than a rewritten file. Preview is the default.

The seven navigation tools plus the diagnostics and patch tools never touch disk. Writing requires an explicit previewOnly: false. Diagnostics come from Roslyn and Roslynator analyzers, and each one can arrive with an automated fix as a reviewable patch.

Startup goes through dnx, the .NET counterpart to npx, so there is no install step. The .NET 10 SDK is required. A NuGet global tool and Docker are also available. An optional PostToolUse hook runs the compiler after any file write, not only after RoselineMCP's own edits.

What it helps with

  • find every caller of a method across a solution
  • rename a symbol in all projects at once
  • collect analyzer diagnostics with ready patches
  • swap out one class member without rewriting the file
  • outline a file's shape without reading it end to end

Example prompts for the agent

  • Find every caller of OrderService.Checkout in the solution
  • Rename Foo to Bar across the solution and show me the diff
  • Run diagnostics on the solution and propose patches

How to install RoselineMCP

Install

The MCP registry has no launch command for it: see the repository README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about RoselineMCP

How do I install RoselineMCP in Claude Code?

Add the server to your MCP client config: "roseline": { "command": "dnx", "args": ["RoselineMCP", "--yes"] }. No separate install is needed, but the .NET 10 SDK is.

What does RoselineMCP do?

It answers structural questions about C# code through Roslyn: where a symbol lives, where it is used, who calls it, what derives from a type. It also applies member-level edits and gathers diagnostics with fixes.

Does RoselineMCP write to my files on its own?

No. Navigation and diagnostics are read-only, and the three write tools only run when previewOnly: false is passed explicitly.

Similar MCP servers

All MCP servers for Programming languages →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor