Roslyn CodeLens
NUGET · ROSLYNCODELENS.MCP · 2 COMPONENTS · SCANNED SEP 21
Roslyn MCP server: semantic .NET/C# intelligence - analysis, refactoring, tests, IL inspection.
Available components
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security100
- No malware found by supply-chain analysis.Pass
- No known CVEs affecting this package version or its production dependencies.Pass
- No install/post-install scripts declared.Pass
- No production dependencies, so there is no dependency health to assess. View diagnostics → Pass
Provenance & Transparency48
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Provenance check failed: no build-provenance attestation is published. See how to fix → View diagnostics → Fail
- Clear OSI-approved license (MIT).Pass
- Actively maintained (last published 3 days ago).Pass
- Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability72
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 10271 tokens (~153/item across 67 items; 67 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management80
- Stability observed for 24 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 100% of tool parameters carry a description.Pass
Tool Safety75
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- 0 of 1 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation; "revoke_trust" implies "revoke" and declares no destructiveHint at all, which the MCP spec reads as destructive by default. See how to fix → Fail
- An AI judge read all 67 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a current MCP spec version (2026-07-28).Pass
How do I install the Roslyn CodeLens MCP server?
Roslyn CodeLens runs locally as a NuGet package, launched with dnx RoslynCodeLens.Mcp@2.18.1 --yes. Ready-made configuration for Claude, Cursor, VS Code, Codex and 3 more is on this page, copied from each client's own documentation.
nuget · RoslynCodeLens.Mcp
claude mcp add marcelroozekrans-roslyn-codelens -- dnx RoslynCodeLens.Mcp@2.18.1 --yes
{
"mcpServers": {
"marcelroozekrans-roslyn-codelens": {
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp@2.18.1",
"--yes"
]
}
}
} {
"servers": {
"marcelroozekrans-roslyn-codelens": {
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp@2.18.1",
"--yes"
]
}
}
} codex mcp add marcelroozekrans-roslyn-codelens -- dnx RoslynCodeLens.Mcp@2.18.1 --yes
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"marcelroozekrans-roslyn-codelens": {
"type": "local",
"command": [
"dnx",
"RoslynCodeLens.Mcp@2.18.1",
"--yes"
],
"enabled": true
}
}
} mcp_servers:
marcelroozekrans-roslyn-codelens:
command: "dnx"
args: ["RoslynCodeLens.Mcp@2.18.1", "--yes"] {
"McpServers": {
"marcelroozekrans-roslyn-codelens": {
"Transport": "stdio",
"Command": "dnx",
"Arguments": [
"RoslynCodeLens.Mcp@2.18.1",
"--yes"
]
}
}
} {
"mcpServers": {
"marcelroozekrans-roslyn-codelens": {
"command": "dnx",
"args": [
"RoslynCodeLens.Mcp@2.18.1",
"--yes"
]
}
}
} Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 21 Sept 26 −3
- Stability: pass → 0.80 functional
- 19 Sept 26 0
- Stability: 0.97 → pass security
- 18 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 93 to 97. That category is still filling its 30-day observation window: 28 days of observed history at the previous scan, 29 at this one. The score rises as the window fills, whether or not the server changes.
- 17 Sept 26 0
- Stability: 0.90 → unverified ▼ security
- Tool safety: pass → unverified ▼ security
- Tool coverage: 100 → unverified ▼ functional
- Capabilities: pass → unverified ▼ functional
- Schema quality: Schema quality not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet. functional
- Package version: 2.18.0 → 2.18.1 functional
- 16 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 87 to 90. That category is still filling its 30-day observation window: 26 days of observed history at the previous scan, 27 at this one. The score rises as the window fills, whether or not the server changes.
- 14 Sept 26 −2
- Stability: pass → 0.83 functional
- 13 Sept 26 0
- Stability: 0.97 → pass security
- 12 Sept 26 0
- Stability: pass → 0.97 functional
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 21 Sept 2026 · Analysed nuget/RoslynCodeLens.Mcp@2.18.1
Provenance No attestation
The registry publishes no build provenance for this version, so there is nothing to verify.
| Result | No attestation |
|---|---|
| Ecosystem | nuget |
| Reason | Signature present, unreadable |
Background: How many MCP packages publish verified provenance →
Dependencies 0 packages
| Packages resolved | 0 |
|---|---|
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
get_type_overview ~86
Get a comprehensive overview of a type in one call: full context (namespace, base class, interfaces, members, DI dependencies), type hierarchy (bases, interfaces, derived types), and diagnostics in the file. More efficient than calling get_symbol_context + get_type_hierarchy + get_diagnostics separately.
| Name | Type | Req | Description |
|---|---|---|---|
| typeName | string | yes | Type name (simple name or fully qualified) |
No output schema declared.
No examples provided.
go_to_definition ~93
Find the source file and line where a symbol is defined. Returns an envelope with items, totalCount, truncated, and limit.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer|null | – | Maximum number of items to return (default: 50). Items are sorted by file, then line. |
| symbol | string | yes | Symbol name: simple type (MyClass), fully qualified (Namespace.MyClass), or member (MyClass.DoWork) |
No output schema declared.
No examples provided.
inspect_external_assembly ~99
Inspect a referenced closed-source assembly. mode='summary' returns namespaces + type counts; mode='namespace' returns public types and members for the given namespace.
| Name | Type | Req | Description |
|---|---|---|---|
| assemblyName | string | yes | Assembly name, e.g. 'Newtonsoft.Json' or 'Microsoft.Extensions.DependencyInjection.Abstractions' |
| mode | string | – | 'summary' (default) or 'namespace' |
| namespaceFilter | string|null | – | Required when mode='namespace' |
No output schema declared.
No examples provided.
list_running_tasks ~43
List background tasks that are running or completed within the last 5 minutes.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer|null | – | Maximum number of items to return (default: 50) |
No output schema declared.
No examples provided.
list_solutions ~102
List all solutions loaded by this server, showing which one is currently active. Each entry includes any projects that were skipped during load (e.g. legacy non-SDK-style projects), with the kind and reason for each skip. Returns an envelope with items sorted by solution path, totalCount, truncated, and limit (default 50).
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer|null | – | Maximum number of items to return (default: 50). Items are sorted by solution path. |
No output schema declared.
No examples provided.
list_trusted_paths ~31
Return the current trust state: session-scoped paths, persistent paths, trusted roots, and analyzer policy.
Input schema present but exposes no named parameters.
No output schema declared.
No examples provided.
load_solution ~421
Load a .sln/.slnx solution at runtime and make it the active solution. Both `include` and `rootProjects` match against the project FILE NAME without extension (the .csproj/.vbproj base name), NOT the assembly name. Pass `include` (case-insensitive glob array, supporting only `*` and `?` wildcards — character classes like `[...]` are NOT supported) or `rootProjects` (EXACT, case-sensitive file names) to load only a subset; the loader walks ProjectReference transitively from those seeds to keep the workspace semantically complete. A filter that matches NO project is an ERROR (the call fails) — it does NOT silently fall back to a full load; if unsure of exact names, do a no-filter load first and call list_solutions to discover them. If the same `path` is already loaded, providing a new filter disposes the previous workspace (replace semantics). If the solution is already loaded with no filter, it simply activates it (~instant). New solutions take ~3 seconds to load and compile. For very large solutions (hundreds of projects) that take minutes to open, pass `background: true` to return a taskId immediately instead of blocking; poll it with get_task_status until it succeeds (its result carries the loaded/skipped counts). The new solution only becomes active once the background load finishes, so other tools keep working against the current solution meanwhile.
| Name | Type | Req | Description |
|---|---|---|---|
| background | boolean | – | If true, load on a background task and return a taskId immediately (poll with get_task_status) instead of blocking until the solution is ready. Default false. |
| include | array|null | – | Optional case-insensitive glob patterns against project file name without extension (e.g. 'MyApp.*') |
| path | string | yes | Full path to the .sln or .slnx file to load |
| rootProjects | array|null | – | Optional exact project file names without extension; both arrays act as seeds for a transitive ProjectReference closure |
No output schema declared.
No examples provided.
peek_il ~64
Return ilasm-style IL for a single method in a referenced closed-source assembly. Input must be a fully-qualified method name with parameter types.
| Name | Type | Req | Description |
|---|---|---|---|
| methodSymbol | string | yes | Fully-qualified method name with parameter types, e.g. 'Newtonsoft.Json.JsonConvert.SerializeObject(object)' |
No output schema declared.
No examples provided.
rebuild_solution ~56
Force a full reload of the analyzed solution — re-opens the .sln, recompiles all projects, and rebuilds all indexes. Use after changing Directory.Build.props, adding/removing NuGet packages, or when diagnostics seem stale.
Input schema present but exposes no named parameters.
No output schema declared.
No examples provided.
rename_symbol ~253
Safely rename a type or member across the entire solution (Roslyn Renamer). Cascades to references, constructors, overrides, nameof, and XML doc crefs. Defaults to preview mode (returns edits without writing files); set preview=false to apply. New compiler errors the rename would introduce are reported as Conflicts, and apply mode refuses to write them unless force=true. Locals/parameters and file renames are not supported.
| Name | Type | Req | Description |
|---|---|---|---|
| force | boolean | – | Apply even when Conflicts are reported (default: false) |
| newName | string | yes | New name — a bare C# identifier, e.g. 'OrderProcessor' |
| preview | boolean | – | Preview only — return edits without writing to disk (default: true) |
| renameInComments | boolean | – | Also rewrite occurrences inside comments (default: true) |
| renameInStrings | boolean | – | Also rewrite occurrences inside string literals (default: false) |
| renameOverloads | boolean | – | Rename all overloads of a method together (default: true; false renames a single arbitrary overload) |
| symbol | string | yes | Symbol to rename: simple type (MyClass), fully qualified (Namespace.MyClass), or member (MyClass.MyMethod) |
No output schema declared.
No examples provided.
resolve_stack_trace ~177
Map a pasted .NET stack trace to file/line/symbol against the loaded solution, undoing compiler name mangling: async/iterator state machines (`<M>d__N.MoveNext`), lambdas (`<>c` / `<>c__DisplayClass`), local functions (`g__Name|`), generic arity. Handles Exception.ToString() output, log-prefixed lines, inner-exception chains, and Ben.Demystifier-style traces. Frames without 'in file:line' get the declaration site; frames with it keep the exact location. External frames resolve with origin=metadata. Items are in original trace order.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer|null | – | Maximum number of items to return (default: 500) |
| stackTrace | string | yes | The stack trace text, pasted as-is (multi-line) |
No output schema declared.
No examples provided.
revoke_trust ~43
Remove a previously trusted solution path or trusted root. Removes both session and persistent entries.
| Name | Type | Req | Description |
|---|---|---|---|
| path | string | yes | Absolute path of the solution or trusted root to revoke |
No output schema declared.
No examples provided.
search_symbols ~101
Search for types, methods, properties, and fields by name (case-insensitive substring match). Returns an envelope with items sorted by match quality (exact → prefix → substring), totalCount, truncated, limit (default 200), and a byKind summary.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer|null | – | Maximum number of items to return (default: 200). Items are sorted by match quality. |
| query | string | yes | Search query (substring match against symbol names) |
No output schema declared.
No examples provided.
set_active_solution ~78
Switch the active solution. All subsequent tool calls will operate on the selected solution. Use a partial, case-insensitive name (e.g. 'MyProject' matches 'C:/code/MyProject/MyProject.sln'). Returns the full path of the newly active solution.
| Name | Type | Req | Description |
|---|---|---|---|
| name | string | yes | Partial or full solution name/path to match |
No output schema declared.
No examples provided.
start_background_task ~58
Queue a long-running tool to run in the background. Returns a taskId; poll with get_task_status. Allowed tools: rebuild_solution.
| Name | Type | Req | Description |
|---|---|---|---|
| toolName | string | yes | Tool name to run in the background. Currently allowed: rebuild_solution. |
No output schema declared.
No examples provided.
trust_solution ~126
Mark a solution path (or directory root) as trusted for analyzer execution. Required before get_diagnostics will load Roslyn analyzer DLLs from the solution. Always confirm with the user before calling this tool — analyzer DLLs run as in-process code.
| Name | Type | Req | Description |
|---|---|---|---|
| path | string | yes | Absolute path to a .sln/.slnx file, or a directory when scope='addRoot' |
| scope | string | – | 'session' (in-memory only, default), 'persistent' (write to trust.json), or 'addRoot' (trust the directory and all solutions under it) |
No output schema declared.
No examples provided.
unload_solution ~83
Unload a previously loaded solution to free memory. Use a partial, case-insensitive name (e.g. 'DcpCore' matches the full path). If the unloaded solution was active, another loaded solution becomes active. Use this when you're done analyzing a codebase and want to reclaim memory.
| Name | Type | Req | Description |
|---|---|---|---|
| name | string | yes | Partial or full solution name/path to match |
No output schema declared.
No examples provided.
What is the Roslyn CodeLens MCP server?
Roslyn CodeLens is an MCP server listed in the public MCP registry as io.github.MarcelRoozekrans/roslyn-codelens. Roslyn MCP server: semantic .NET/C# intelligence - analysis, refactoring, tests, IL inspection. This page covers its NuGet package (RoslynCodeLens.Mcp).
Is the Roslyn CodeLens MCP server safe to use?
Roslyn CodeLens scores 80 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 21 September 2026. It declares no install or post-install scripts. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the Roslyn CodeLens MCP server expose?
Roslyn CodeLens exposes 67 tools: list_running_tasks, get_task_status, find_obsolete_usage, find_disposable_misuse, get_project_dependencies, and 62 more. Their descriptions and schemas cost roughly 10,271 tokens of context every time the server is loaded.
Is the Roslyn CodeLens MCP server still maintained?
Roslyn CodeLens is still listed as active in the MCP registry. We last reached this channel on 21 September 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.
What licence is the Roslyn CodeLens MCP server under?
Roslyn CodeLens declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.