RoselineMCP
Roslyn code intelligence · MCP

Your agent reads
the whole file.
RoselineMCP reads the code.

A .NET server that gives Claude, Cursor, and Copilot a Roslyn view of your C# solution — symbols, references, call graphs, surgical edits. Agents navigate by structure instead of re-reading source. Measured 81% fewer tokens on real code.

The idea

One search_symbols call returns the shape of a file. Real numbers from this repo: 1,154 tokens become 125 — the agent gets what it needs, you skip the wall.

Program.cs · the whole file1,154 tokens
var host = CreateHostBuilder(args).Build();
var logger = host.Services
    .GetRequiredService<ILogger<Program>>();
logger.LogInformation("starting…");

static IHostBuilder CreateHostBuilder(string[] a) =>
  Host.CreateDefaultBuilder(a)
    .ConfigureServices((ctx, services) =>
    {
      services.AddMcpServer()
        .WithStdioServerTransport()
        .WithToolsFromAssembly();
      services.AddSingleton<IMSBuildService, …>();
      services.AddSingleton<IDiffService, …>();
      services.AddSingleton<IProjectLoader, …>();
      // …10 more registrations…
    })
    .ConfigureLogging(…);
the outline it returns125 tokens−89%
classProgram
methodCreateHostBuilder(string[]) : IHostBuilder:53
ctorProgram():125

Signatures and locations — no method bodies, no using directives, no wall.

Measured, not marketed

81% fewer tokens, on its own source.

Every figure is a real string — the tool's actual output vs. the source an agent would otherwise read, tokenized with a real BPE tokenizer, swept systematically over282 symbols. Weak cases shown, not hidden.

Read the methodology →
81%
pooled reduction
73%
median per task
934,530
tokens saved on the sample
465
navigation tasks
Powered by Roslyn

Not a parser. The compiler.

RoselineMCP is built on Roslyn, the .NET Compiler Platform — the same engine that compiles your code in Visual Studio, csc, and the .NET SDK. Every answer it gives is the compiler's answer, not a guess. That's the difference between code intelligence you can act on and a fancy text search.

Semantic, not textual

It resolves symbols, types, overloads, and generics across the whole solution — it knows the Add here is the same method as the call over there. Meaning, not string matches.

Compiler-grade accuracy

find_references is exact. rename_symbol updates real references, not text. Call graphs follow real bindings — which is why the edits are safe and the navigation is precise.

The whole solution, loaded

MSBuildWorkspace loads your real project graph, references, and analyzers. RoselineMCP sees your code exactly the way it compiles — not a fuzzy approximation of it.

First-party & open source

Roslyn is Microsoft's, powers every serious C# tool, and is open on GitHub. RoselineMCP is a thin, honest layer on a foundation you already trust.

Install

One line. Any MCP client.

RoselineMCP runs as a local stdio process your MCP client launches. Pick how you want it on disk — the tools are identical.

Any client that speaks dnx (the .NET npx) runs it on demand — no install step. Needs the .NET 10 SDK. Add to your MCP config:

mcp.json / claude_desktop_config.json
{
  "mcpServers": {
    "roseline": {
      "command": "dnx",
      "args": ["RoselineMCP", "--yes"]
    }
  }
}

Verified with Claude Desktop, VS Code (Copilot / MCP), and Cursor. Per-client config in theREADME. Also listed in the official MCP Registry, so registry-aware clients can find it by name.

The surface

Twelve tools. Structure in, tokens down.

Eight new code-intelligence tools on top of the original diagnostics surface.Full reference →

Code navigation

Read-only. Retrieve structure instead of source.
search_symbolsread

Find symbols by wildcard/substring name pattern, or outline a single file.

get_symbol_inforead

A symbol’s kind, modifiers, signature, base types, interfaces, docs, and definition — the compact go-to-definition.

find_referencesread

Every reference (use site) of a symbol across the solution, as location + one-line snippet.

find_implementationsread

Implementations of an interface/member, overrides, or derived types of a class.

get_call_graphread

A depth-bounded caller and/or callee graph for a method, with cycle detection.

get_type_hierarchyread

A type’s base-class chain, implemented interfaces, and/or derived types.

Code editing

Write a member-level diff, not a whole-file rewrite. Preview by default.
edit_memberwrite

Replace, add, or delete a single type member; returns a unified diff. Preview by default.

rename_symbolwrite

Rename a symbol and update every reference across the solution (Roslyn rename). Preview by default.

Diagnostics & fixes

Analyze and auto-fix — the original surface.
analyze_solutionread

Analyze an entire C# solution for diagnostics, with filtering. Also accepts an http(s) Git URL (the one open-world tool).

list_diagnosticsread

Detailed diagnostics for a project, with statistics and suggested fixable IDs.

apply_fixeswrite

Apply automated code fixes for diagnostic IDs. Preview by default.

create_patchread

Generate a unified diff between two text versions. Pure text, no filesystem.