Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

io.github.lahma/claude-roslyn-lsp

Latest version: v1.1.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
MCP server Transport: stdio Publisher: lahma
1 Stars
0 Forks
3 Versions
C# Repo language

Scan summary

io.github.lahma/claude-roslyn-lsp was last scanned on 28 Nov 2026 at version 1.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 28 Nov 2026.
  • Findings: 1 rule fired in version 1.1.0 (1 low). The score describes this version only.
  • MCP server: Runs over stdio.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.1.0 LATEST 28 Nov 2026 1 rule fired
1.0.0 19 Nov 2026 No rules fired
0.9.0 19 Nov 2026 No rules fired

Rules fired in 1.1.0: 1

Findings

1 Low

Findings for v1.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

Phrase match: sending data to an external destination (not reviewed)

An automated phrase check found wording that points data at an external destination. It does not show which data is meant or whether anything is actually sent. Not reviewed by a person.

LOW
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 1.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

claude-roslyn-lsp

Microsoft's Roslyn language server, mediated so that a coding agent can actually use it — as an LSP server for the agents that speak LSP, and as an MCP server for the refactorings LSP clients have no button for. It contains no compiler. Roslyn runs in a child process this binary downloads, launches and supervises, which is the whole design: reimplementing C# analysis is not something one person maintains, and Microsoft now publishes the real engine as a public MIT dotnet tool. The only part nobody had done is the mediation.

Claude Code's C# story is broken in a specific, fixable way. The official csharp-lsp plugin launches csharp-ls from PATH and installs nothing, so on most machines the language-server tool never activates at all. And even when a server does start, Claude Code's LSP client refuses client/registerCapability, answers workspace/configuration only when a settings block happens to be present, never sends Roslyn's solution/open, never waits for workspace/projectInitializationComplete — so the first several seconds of every session answer "no definition found" rather than an error — and consumes only push diagnostics, which Roslyn does not send. The result is an agent that reaches for grep and sed on a language that has had exact, semantic answers for twenty years.

This binary supplies each of those: it acquires and launches Roslyn, answers the registrations, configuration and progress requests on the client's behalf, opens the solution, holds requests until the workspace has actually loaded, and bridges Roslyn's pull diagnostics onto the push model the client understands. On top of that, the mcp verb exposes the mutating half no LSP client offers a model — solution-wide semantic rename, code actions, fix-all by diagnostic id, formatting and diagnostics on demand — addressed by symbol name rather than by a line number the model had to grep for first.

One binary serves all of it: Claude Code (both protocols, as a plugin), GitHub Copilot CLI and OpenCode over LSP, and Codex CLI, Gemini CLI, Cursor, VS Code and Claude Desktop over MCP. It is written in C# on .NET 10 and ships as a Native AOT executable per platform. The runtime dependency tree is three packages, all from Microsoft or the official MCP organisation; there is not one Microsoft.CodeAnalysis.* reference in it, and there never will be. MIT licensed.

What it does

claude-roslyn-lsp lsp        The LSP server. What an editor or an agent's LSP client launches.
claude-roslyn-lsp mcp        The MCP server: eleven tools, over stdio.
claude-roslyn-lsp doctor     Report everything, then start Roslyn and complete one handshake.
claude-roslyn-lsp install    The same, with the download allowed.

There is no default verb. Both servers speak a different protocol on the same stdout, so a client that forgot the subcommand would be connected to the wrong one and simply hang; a bare invocation exits 2 with the usage text on stderr instead.

  • lsp mediates the session in both directions. It answers initialize immediately from its own authored capability document, opens the discovered solution, holds semantic requests until Roslyn reports the workspace loaded, answers the requests Roslyn makes that Claude Code refuses, and forwards everything else with only the JSON-RPC id rewritten — no reserialisation, so a result crosses byte for byte.
  • mcp is the refactoring surface: resolveSymbol, findReferences, getTypeMembers, getDiagnostics, getCodeActions, applyCodeAction, renameSymbol, fixDiagnostics, formatCode, getWorkspaceStatus. Four of them write files; all four take preview. It runs a Roslyn of its own — launched, supervised and file-watched exactly as the lsp half's is — and it starts loading the solution as soon as the client finishes the MCP handshake rather than when the first tool is called, because a client starts its servers when a session starts and may not ask a C# question for minutes. Until the workspace is loaded every tool answers status: "loading" instead of hanging, and getWorkspaceStatus says how far it has got.
  • doctor is the support report and the exit code that means something: 0 only if Roslyn is runnable right now, established by launching it and completing a real handshake.

What to expect on a first run. The first lsp session for a machine downloads about 70 MB of Roslyn and extracts about 140 MB, reporting progress to the client as it goes; every later session starts from the cache. Then the solution loads, and everything asked during that window is held and answered afterwards rather than answered empty. Measured through Claude Code on this machine:

Quartz.NET, 30 projects OrchardCore, 239 projects
Handshake (answered by the adapter, not by Roslyn) 22-30 ms 24-63 ms
Workspace loaded 5.9 s 20 s warm, 46 s colder
Go to definition, once loaded 2 ms warm 4 ms warm
Find references 11 s (278 hits) 45 s (272 hits)
Roslyn memory, workstation GC (the default) 0.30-0.34 GB 0.44-0.47 GB
Roslyn memory, CLAUDE_ROSLYN_LSP_GC=server 0.6-0.9 GB 1.9-2.1 GB

A repository that has never been restored takes longer, because Roslyn restores it itself before it can load anything.

The child runs with the workstation garbage collector by default, although Roslyn's own configuration asks for the server one. On OrchardCore that is the difference between about 1.9 GB and 577 MB, for roughly eight seconds more on the load — and this adapter exists to be run beside a model's tool calls on the same machine, so the memory is the side worth taking. Set CLAUDE_ROSLYN_LSP_GC=server to buy the seconds back; an explicit DOTNET_gcServer — or the older COMPlus_gcServer spelling — in the environment wins over both and is never overwritten, and doctor prints which of the three is in effect.

A solution-wide getDiagnostics is not a one-second call. The per-file pass is; the first solution-wide one compiles every project, which took about a minute on Quartz.NET's 30 and did not finish inside the 120-second budget on OrchardCore's 239 — where it is refused with a sentence naming scope: "project" rather than answered with an empty list. Use file or project scope after an edit, and solution scope when you actually want the whole picture.

The 120-second readiness budget (CLAUDE_ROSLYN_LSP_READY_TIMEOUT_SECONDS) has roughly 2.5x headroom on a 239-project solution; raise it if yours is larger or is being loaded for the first time.

Prerequisites

A .NET 10 runtime, and in practice the .NET 10 SDK. Roslyn is a .NET 10 application and this adapter does not bundle a runtime for it: it resolves the dotnet host itself — DOTNET_ROOT, then every match on PATH, then the platform's install locations — and asks it for its runtime list before launching anything, so a missing runtime is a sentence in a report rather than a child process that dies about a framework nobody was watching for. That check is what doctor prints, and it wants Microsoft.NETCore.App 10.x.

The SDK is what you want in practice, for two reasons that are not this adapter's doing: Roslyn evaluates project files and restores packages server-side, which is MSBuild's job, and dnx — the launch channel the Claude Code plugin uses — is part of the SDK. Anyone doing C# work has it.

The adapter itself is self-contained. The Native AOT binary has no runtime dependency at all — on Linux it needs glibc 2.34 or newer (Ubuntu 22.04, Debian 12, RHEL 9, Fedora 35 and later), and the release build fails rather than ship one that needs more. dnx delivers that same binary on the five platforms below, and a framework-dependent build everywhere else.

Install

Two channels, one binary. Claude Code gets the plugin, which carries both servers and the workflow skill and runs them through dnx — no download step, and the SDK is required for C# work anyway. Every other client gets the Native AOT binary from GitHub Releases: a file-based client wants an absolute path. Since 0.9.0 dnx runs the same Native AOT binary too, so both channels start in a few hundred milliseconds.

Claude Code: the plugin

This repository is its own plugin marketplace, so one install delivers the LSP server, the MCP server and the skill:

/plugin marketplace add lahma/claude-roslyn-lsp
/plugin install roslyn-adapter@claude-roslyn-lsp

or, without starting a session:

claude plugin marketplace add lahma/claude-roslyn-lsp
claude plugin install roslyn-adapter@claude-roslyn-lsp

The plugin is called roslyn-adapter; the marketplace, the binary and the NuGet package are claude-roslyn-lsp. Its MCP tools appear as mcp__plugin_roslyn-adapter_roslyn__<tool>, which is the name to use in permissions rules.

Upgrading from 0.9.0 or earlier, where the plugin was itself called claude-roslyn-lsp: the old name is gone from the marketplace, so /plugin update will not find it. Install the new one and remove the old one, once:

claude plugin marketplace update claude-roslyn-lsp
claude plugin install roslyn-adapter@claude-roslyn-lsp
claude plugin uninstall claude-roslyn-lsp@claude-roslyn-lsp

Plugin options are kept per plugin, so set them again if you had any; rename any mcp__plugin_claude-roslyn-lsp_roslyn__* entries in your permission rules; and expect the first session to download Roslyn once more, into the new plugin's data directory.

Then disable the official C# plugin. The first plugin registered for an extension wins, and marketplace plugins register before everything else — so with csharp-lsp@claude-plugins-official enabled, .cs goes to it and this adapter is never launched. The symptom is Command 'csharp-ls' not found, or nothing at all.

claude plugin disable csharp-lsp@claude-plugins-official

In a session, /plugin → Manage plugins → csharp-lsp → Disable does the same thing.

Enabling asks for an optional solution path, Roslyn version, Roslyn path and log level; every field is optional and each maps to the environment variable of the same name in Environment variables below. Leave them blank and nothing is set — a blank plugin option is treated as absent rather than as an empty value, which is not the default behaviour and is the subject of a test.

The first run downloads about 70 MB of Roslyn into the plugin's own data directory and verifies it against a checked-in SHA-512. Expect the first session to take a few seconds longer to answer; afterwards there is nothing to download and nothing to check.

The plugin is pinned to the release it shipped with rather than floating, so the skill and the binary it describes always move together. /plugin update picks up the next release.

Claude Code: without the marketplace

For a locally built binary, or to try a change without publishing anything, point Claude Code at a plugin directory:

claude --plugin-dir /path/to/claude-roslyn-lsp/docs/clients/claude-code-local-plugin

docs/clients/claude-code-local-plugin/.claude-plugin/plugin.json is a complete manifest for that: edit the two command values to the absolute path of your binary. Use forward slashes on Windows (D:/tools/claude-roslyn-lsp.exe) or escape the backslashes — the manifest is JSON, and an unescaped D:\Work\... makes it fail to load silently, with no plugin and no error.

The official plugin still wins the .cs extension. To sideline it for one run without touching your settings:

claude --settings '{"enabledPlugins":{"csharp-lsp@claude-plugins-official":false}}'

A local plugin directory cannot carry the skill, because a plugin may not reference files outside its own root. Its MCP server serves the skill instead, to a Claude Code that loads skills from MCP servers (see Agent skill); elsewhere install it separately, or work inside a checkout of this repository, where .claude/skills/ is loaded as a project skill automatically.

Native AOT binary

Download the archive for your platform from GitHub Releases and extract it. Each archive is named claude-roslyn-lsp-{version}-{rid} and contains the executable, LICENSE and this README.md.

Platform RID Archive
Windows x64 win-x64 claude-roslyn-lsp-{version}-win-x64.zip
Windows ARM64 win-arm64 claude-roslyn-lsp-{version}-win-arm64.zip
Linux x64 linux-x64 claude-roslyn-lsp-{version}-linux-x64.tar.gz
Linux ARM64 linux-arm64 claude-roslyn-lsp-{version}-linux-arm64.tar.gz
macOS Apple silicon osx-arm64 claude-roslyn-lsp-{version}-osx-arm64.tar.gz
tar -xzf claude-roslyn-lsp-1.1.0-linux-x64.tar.gz
chmod +x claude-roslyn-lsp
./claude-roslyn-lsp install

Every archive is built and handshake-tested on its own architecture before it is uploaded — the arm64 legs run on arm64 runners rather than being cross-compiled — so no binary ships that has not answered both protocols on the hardware it targets.

Note the absolute path: that is what every configuration file below needs. The Roslyn server the binary downloads is a separate matter and covers more platforms than this table does — see Acquisition and pinning.

NuGet package (dnx)

The same binary is published to nuget.org as claude-roslyn-lsp, a .NET tool package carrying the McpServer package type, and listed in the official MCP Registry as io.github.lahma/claude-roslyn-lsp. The package is a pointer: dnx — part of the .NET 10 SDK — fetches claude-roslyn-lsp.<rid>, the Native AOT binary for Windows, Linux and macOS on the five platforms in the table above, or the framework-dependent claude-roslyn-lsp.any anywhere else (Alpine, Intel macOS), and runs it in one step:

dnx claude-roslyn-lsp@1.1.0 --yes doctor

--yes accepts the download prompt and is consumed by dnx itself; everything after it reaches the adapter. Pin the version rather than floating: a language server is something an agent runs on your behalf, and a pinned version is one you decided to run.

On Windows, dnx does not pass the tool's exit code on. dnx there is dnx.cmd, and it ends 0 whatever the adapter exited with; dotnet dnx passes it through. So where the answer matters — a script that checks doctor — run dotnet dnx claude-roslyn-lsp@1.1.0 --yes doctor. Linux and macOS have not been checked.

Never dnx claude-roslyn-lsp@1.1.0 --version. dnx takes --version for itself, along with -v, --verbosity, --prerelease, --source, --interactive, -h and about eight others, and prints its own usage to stdout on a parse error. Use doctor, which reports the version along with everything else.

Releases are pushed to nuget.org by a workflow only a v*.*.* tag can start, using trusted publishing: the workflow exchanges its GitHub OIDC token for an API key that lives minutes. There is no NuGet API key stored in this repository, so there is none to leak.

GitHub Copilot CLI

Copilot CLI reads LSP servers from ~/.copilot/lsp-config.json (yours, every repository) and .github/lsp.json (the repository's, checked in and shared). The repository-level file wins where both name the same server.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • MCP Registry io.github.lahma/claude-roslyn-lsp

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229