io.github.darylmcd/roslyn-mcp
NUGET · DARYLMCD.ROSLYNMCP · SCANNED SEP 20
Local-first MCP server for semantic C# analysis & refactoring via Roslyn & MSBuildWorkspace.
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 1 days ago).Pass
- Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability84
- 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).Pass
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 24596 tokens (~137/item across 179 items; 174 tools + 5 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 Management93
- Stability check failed: the tool surface changed between 4.0.0 and 4.2.1: 0 tool removals, 1 breaking changes, 0 additions. See how to fix → Fail
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
- Structured output schemas are declared (5% of tools); any adoption earns full credit.Pass
Tool Safety81
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- 2 of 9 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation; "delete_file_preview" implies "delete" and declares readOnlyHint instead, contradicting what its own name says it does. See how to fix → Partial
- An AI judge read all 176 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 io.github.darylmcd/roslyn-mcp server?
io.github.darylmcd/roslyn-mcp runs locally as a NuGet package, launched with dnx Darylmcd.RoslynMcp@4.2.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 · Darylmcd.RoslynMcp
claude mcp add darylmcd-roslyn-mcp -- dnx Darylmcd.RoslynMcp@4.2.1 --yes
{
"mcpServers": {
"darylmcd-roslyn-mcp": {
"command": "dnx",
"args": [
"Darylmcd.RoslynMcp@4.2.1",
"--yes"
]
}
}
} {
"servers": {
"darylmcd-roslyn-mcp": {
"command": "dnx",
"args": [
"Darylmcd.RoslynMcp@4.2.1",
"--yes"
]
}
}
} codex mcp add darylmcd-roslyn-mcp -- dnx Darylmcd.RoslynMcp@4.2.1 --yes
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"darylmcd-roslyn-mcp": {
"type": "local",
"command": [
"dnx",
"Darylmcd.RoslynMcp@4.2.1",
"--yes"
],
"enabled": true
}
}
} mcp_servers:
darylmcd-roslyn-mcp:
command: "dnx"
args: ["Darylmcd.RoslynMcp@4.2.1", "--yes"] {
"McpServers": {
"darylmcd-roslyn-mcp": {
"Transport": "stdio",
"Command": "dnx",
"Arguments": [
"Darylmcd.RoslynMcp@4.2.1",
"--yes"
]
}
}
} {
"mcpServers": {
"darylmcd-roslyn-mcp": {
"command": "dnx",
"args": [
"Darylmcd.RoslynMcp@4.2.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.
- 20 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 90 to 93.
- 19 Sept 26 +13
- Malware scan: unverified → pass ▲ security
- 18 Sept 26 −15
- Malware scan: pass → unverified ▼ security
- Package version: 4.2.0 → 4.2.1 functional
- 17 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 96 to 100.
- 15 Sept 26 +16
- Malware scan: unverified → pass ▲ security
- 14 Sept 26 −16
- Malware scan: pass → unverified ▼ security
- Stability: pass → fail ▼ security
- Stability: pass → 0.90 functional
- Package version: 4.1.2 → 4.2.0 functional
- 13 Sept 26 0
- Stability: 0.97 → pass security
- 12 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.
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 20 Sept 2026 · Analysed nuget/Darylmcd.RoslynMcp@4.2.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 →
add_central_package_version_preview ~80
Preview adding a PackageVersion entry to Directory.Packages.props.
| Name | Type | Req | Description |
|---|---|---|---|
| packageId | string | yes | NuGet package id to add to Directory.Packages.props |
| version | string | yes | NuGet package version to set in Directory.Packages.props |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
add_package_reference_preview ~81
Preview adding a PackageReference to a project file.
| Name | Type | Req | Description |
|---|---|---|---|
| packageId | string | yes | NuGet package id to add |
| projectName | string | yes | Project name or project file path within the loaded workspace |
| version | string | yes | NuGet package version to add |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
add_pragma_suppression ~102
Insert #pragma warning disable <id> immediately before the given 1-based line in a source file.
| Name | Type | Req | Description |
|---|---|---|---|
| diagnosticId | string | yes | Diagnostic id (e.g. CS0168) |
| filePath | string | yes | Absolute path to the source file |
| line | integer | yes | 1-based line number: pragma is inserted before this line |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
add_project_reference_preview ~71
Preview adding a ProjectReference to a project file.
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | yes | Project name or project file path within the loaded workspace |
| referencedProjectName | string | yes | Referenced project name or project file path |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
add_target_framework_preview ~75
Preview adding a target framework to a project file.
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | yes | Project name or project file path within the loaded workspace |
| targetFramework | string | yes | Target framework moniker to add, for example net8.0 |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
analyze_control_flow ~116
Analyze control flow through a code region: entry/exit points, reachability, and return statements. EndPointIsReachable uses Roslyn fall-through semantics, not whether the method can complete.
| Name | Type | Req | Description |
|---|---|---|---|
| endLine | integer | yes | 1-based end line of the code region to analyze |
| filePath | string | yes | Absolute path to the source file |
| startLine | integer | yes | 1-based start line of the code region to analyze |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
analyze_data_flow ~111
Analyze how variables flow through a code region: which are read, written, captured by lambdas, always assigned, etc. Use to understand data dependencies before refactoring.
| Name | Type | Req | Description |
|---|---|---|---|
| endLine | integer | yes | 1-based end line of the code region to analyze |
| filePath | string | yes | Absolute path to the source file |
| startLine | integer | yes | 1-based start line of the code region to analyze |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
analyze_snippet ~131
Analyze a C# snippet for compilation errors and declared symbols in an ephemeral workspace — no solution load. Use for fragments, diffs, or pasted code; `kind` selects the wrapper.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | The C# code to analyze |
| kind | string | – | The snippet kind: 'expression', 'statements', 'returnExpression', 'members', or 'program' (default) |
| usings | array|null | – | Optional: additional using directives. Pass as a native JSON array, not a JSON-encoded string. Example: ["System.IO", "System.Net.Http"]. |
No output schema declared.
No examples provided.
apply_code_action ~37
Apply a previously previewed code action using its preview token
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by preview_code_action |
No output schema declared.
No examples provided.
apply_composite_preview ~65
DESTRUCTIVE — applies a previously-previewed orchestration operation to disk (_preview names the redeemed token; kept for API stability). Run a *_preview in the same session before invoking.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by an orchestration preview tool |
No output schema declared.
No examples provided.
apply_multi_file_edit ~227
Apply text edits to multiple files under one atomic pre-apply snapshot. Prefer preview_multi_file_edit + preview_multi_file_edit_apply for review workflows.
| Name | Type | Req | Description |
|---|---|---|---|
| autoRevertOnError | boolean | – | When true AND verify surfaces new compile errors, automatically revert the entire batch through the single-slot undo path this call populated. Ignored when verify is false. Default false. |
| fileEdits | array | yes | Array of file edits. Each has filePath (string) and edits (array of TextEditDto with startLine, startColumn, endLine, endColumn, newText) |
| skipSyntaxCheck | boolean | – | When false (default), each C# file is parsed after edits; parser errors block that file's apply. |
| verify | boolean | – | When true, run compile_check once after the batch completes (scoped to the single owning project when possible) and attach the result under Verification. Pre-existing errors are filtered out, so only… |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
apply_project_mutation ~43
Apply a previously previewed project file mutation using its preview token.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by one of the project mutation preview tools |
No output schema declared.
No examples provided.
apply_text_edit ~294
Apply one or more text edits to a source file in the workspace. Revertible via revert_last_apply. Prefer a semantic preview/apply Roslyn tool whenever one exists; fall back here only when none does.
| Name | Type | Req | Description |
|---|---|---|---|
| autoRevertOnError | boolean | – | When true AND verify surfaces new compile errors, automatically revert the edit through the single-slot undo path this call populated. Single-shot per call - never touches prior-turn edits. Ignored w… |
| edits | array | yes | Array of text edits. Each edit has startLine, startColumn, endLine, endColumn (1-based), and newText. Example: [{"startLine":10,"startColumn":5,"endLine":10,"endColumn":15,"newText":"newValue"}]. All… |
| filePath | string | yes | Absolute path to the file to edit. |
| skipSyntaxCheck | boolean | – | When false (default), C# files are parsed after edits and lexer/parser errors block the apply. Set true only for intentional intermediate invalid states. |
| verify | boolean | – | When true, run compile_check scoped to the owning project after the edit and attach the result under Verification. Pre-existing errors are filtered out, so only NEW errors appear in the outcome. |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
apply_with_verify ~90
Apply a solution-snapshot preview token, run compile_check, and auto-revert compile errors. Producer-specific apply routes enforce token-family checks; excludes composite and project-mutation tokens.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by an *_preview tool |
| rollbackOnError | boolean | – | If true (default) and the apply introduces new compile errors, automatically revert via revert_last_apply. |
No output schema declared.
No examples provided.
build_project ~62
Run dotnet build for a specific project in the loaded workspace and return structured diagnostics and execution output
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | yes | Project name or project file path within the loaded workspace |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
build_workspace ~40
Run dotnet build for the loaded workspace and return structured diagnostics and execution output
| Name | Type | Req | Description |
|---|---|---|---|
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
bulk_replace_type_apply ~59
Apply a token from bulk_replace_type_preview or replace_invocation_preview. This shared route rejects other preview families before mutating the workspace.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by bulk_replace_type_preview or replace_invocation_preview |
No output schema declared.
No examples provided.
bulk_replace_type_preview ~118
Preview replacing one type across solution consumers after interface extraction. Choose parameters, fields, or all; parameters also updates generic base/interface arguments.
| Name | Type | Req | Description |
|---|---|---|---|
| newTypeName | string | yes | Fully qualified or simple name of the replacement type |
| oldTypeName | string | yes | Fully qualified or simple name of the type to replace |
| scope | string|null | – | Optional: scope filter — 'parameters', 'fields', or 'all' (default: 'all') |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
callers_callees ~187
Find direct callers and callees for the symbol at an exact position or symbolHandle. Position resolution uses its token, so place the caret on the intended member name.
| Name | Type | Req | Description |
|---|---|---|---|
| calleesLimit | integer | – | Maximum number of callees to return (default: 100) |
| callersLimit | integer | – | Maximum number of callers to return (default: 100) |
| column | integer|null | – | Optional: 1-based column number |
| filePath | string|null | – | Optional: absolute path to the source file |
| line | integer|null | – | Optional: 1-based line number |
| metadataName | string|null | – | Optional: fully qualified metadata name, e.g. Namespace.TypeName |
| symbolHandle | string|null | – | Optional: stable symbol handle returned by other semantic tools |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
change_signature_preview ~451
Preview adding, removing, renaming, or reordering method parameters. Atomically rewrites the declaration and every callsite under one preview token; supply op and its required arguments.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer|null | – | Optional: 1-based column number of the method declaration |
| defaultValue | string|null | – | op='add' only: the default value spliced into every existing callsite (e.g. 'null', 'default', '""', '0'). |
| filePath | string|null | – | Optional: absolute path to the source file containing the method declaration |
| line | integer|null | – | Optional: 1-based line number of the method declaration |
| metadataName | string|null | – | Optional: bare fully-qualified method name without parentheses (e.g. 'Foo.Bar.Baz'). For overloaded methods supply file/line/column to disambiguate, or use symbolHandle from symbol_search. Parenthesi… |
| name | string|null | – | Parameter name. For op='add': the new parameter's name. For op='remove': the existing parameter to drop (or use position). For op='rename': the current name. |
| newName | string|null | – | op='rename' only: the new parameter name. |
| newOrder | string|null | – | op='reorder' only: comma-separated permutation of parameter names or 0-based indices (e.g. 'b,a,c' or '1,0,2'). Must list every parameter exactly once. |
| op | string | yes | Operation: 'add', 'remove', 'rename', or 'reorder'. |
| parameterType | string|null | – | op='add' only: the parameter type (e.g. 'string', 'IReadOnlyList<int>', 'CancellationToken'). |
| position | integer|null | – | Optional position (0-based) of the parameter. For op='add': insertion index (defaults to trailing). For op='remove': index to drop. |
| symbolHandle | string|null | – | Optional: stable symbol handle returned by other semantic tools |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
change_type_namespace_preview ~137
Preview relocating a type between namespaces in one project, optionally moving its file and updating consumer using directives. Use get_namespace_dependencies to identify circular dependencies.
| Name | Type | Req | Description |
|---|---|---|---|
| fromNamespace | string | yes | Fully-qualified namespace currently containing the type |
| newFilePath | string|null | – | Optional: absolute destination file path. If omitted, the file stays in place and only its namespace declaration is rewritten |
| toNamespace | string | yes | Fully-qualified destination namespace inside the same project |
| typeName | string | yes | Name of the type to relocate (must be unique within fromNamespace) |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
code_fix_apply ~35
Apply a previously previewed code fix using its preview token
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | Preview token from code_fix_preview. |
No output schema declared.
No examples provided.
code_fix_preview ~106
Preview a curated code fix for a specific diagnostic occurrence
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | 1-based column number |
| diagnosticId | string | yes | Diagnostic identifier, e.g. CS8019 |
| filePath | string | yes | Absolute path to the source file. |
| fixId | string|null | – | Optional: curated fix identifier from diagnostic_details |
| line | integer | yes | 1-based line number |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
compile_check ~304
Fast in-memory compilation check using the Roslyn Compilation API - validates compilability without invoking dotnet build. Reports compiler diagnostics (CS*) only; use project_diagnostics for analyzer (CA*, IDE*) diagnostics. Results are paginated.
| Name | Type | Req | Description |
|---|---|---|---|
| emitValidation | boolean | – | When true, performs full PE-emit validation (catches more issues like missing references at emit time). Default: false (faster, uses GetDiagnostics only). Requires restored NuGet packages for the per… |
| file | string|null | – | Optional: only return diagnostics whose file path matches this absolute path |
| files | array|null | – | Optional: only return diagnostics whose file path matches any absolute path in this list. Pass as a native JSON array of absolute file paths, not a JSON-encoded string. When combined with file, the u… |
| limit | integer | – | Maximum number of diagnostics to return (default: 50) |
| offset | integer | – | Number of diagnostics to skip before returning results (default: 0) |
| projectName | string|null | – | Optional: filter by project name |
| severity | string|null | – | Optional: minimum severity filter (Error, Warning, Info, Hidden) |
| workspaceId | string|null | – | Optional: the workspace session identifier returned by workspace_load. With one workspace loaded you may omit it — the read-path middleware resolves it automatically; pass it explicitly when two or m… |
No output schema declared.
No examples provided.
create_file_apply ~35
Apply a previously previewed file creation using its preview token.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | Preview token from create_file_preview. |
No output schema declared.
No examples provided.
create_file_preview ~87
Preview creating a new source file inside a loaded workspace project. Returns the file diff and a preview token.
| Name | Type | Req | Description |
|---|---|---|---|
| content | string | yes | Initial file contents |
| filePath | string | yes | Absolute path to the file to create. |
| projectName | string | yes | Project name or project file path within the loaded workspace |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
delete_file_apply ~35
Apply a previously previewed file deletion using its preview token.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | Preview token from delete_file_preview. |
No output schema declared.
No examples provided.
delete_file_preview ~58
Preview deleting an existing source file from a loaded workspace. Returns the file diff and a preview token.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute path to the file to delete. |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
dependency_inversion_preview ~111
Preview extracting an interface and updating constructor dependencies to use it.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute path to the source file containing the concrete type. |
| interfaceName | string|null | – | Optional: interface name. Defaults to I + type name |
| interfaceProjectName | string | yes | Target project name or project file path for the extracted interface |
| typeName | string | yes | Name of the concrete type to invert dependencies around |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
diagnostic_details ~191
Get details and available code fixes for one diagnostic occurrence. CA-series NetAnalyzers expose fixes through get_code_actions and preview_code_action instead.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer|null | – | 1-based column number (alias: startColumn). Supply exactly one of column/startColumn. |
| diagnosticId | string | yes | Diagnostic identifier, e.g. CS8019 |
| filePath | string | yes | Absolute path to the source file |
| line | integer|null | – | 1-based line number (alias: startLine). Supply exactly one of line/startLine. |
| startColumn | integer|null | – | Alias for column, matching the positional-tool convention used by find_references, goto_definition, etc. |
| startLine | integer|null | – | Alias for line, matching the positional-tool convention used by find_references, goto_definition, etc. |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
document_symbols ~143
Get a document's declarations as a hierarchical tree. Accepts filePath or a symbol locator, like symbol_info; get_symbol_outline is its deprecated alias.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string|null | – | Optional: absolute path to the source file |
| metadataName | string|null | – | Optional: fully qualified metadata name, e.g. Namespace.TypeName |
| symbolHandle | string|null | – | Optional: stable symbol handle returned by other semantic tools |
| workspaceId | string|null | – | Optional: the workspace session identifier returned by workspace_load. With one workspace loaded you may omit it — the read-path middleware resolves it automatically; pass it explicitly when two or m… |
No output schema declared.
No examples provided.
enclosing_symbol ~89
Find the enclosing symbol (method, property, type) at a given file position — useful for understanding the context of a cursor position
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer | yes | 1-based column number |
| filePath | string | yes | Absolute path to the source file |
| line | integer | yes | 1-based line number |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
evaluate_csharp ~160
Evaluate a C# expression or multi-line script and return its value and type. Use timeoutSeconds for a per-call budget; progress reports cover long compile and execution work.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | The C# code to evaluate (expression, statement, or multi-line script) |
| imports | array|null | – | Optional: additional namespace imports. Pass as a native JSON array, not a JSON-encoded string. Example: ["System.IO", "System.Net.Http"]. |
| timeoutSeconds | integer|null | – | Optional: per-call timeout in seconds (UX-002). Overrides ROSLYNMCP_SCRIPT_TIMEOUT_SECONDS for this single invocation. Must be > 0 and fit the server timer range after watchdog grace; null falls back… |
No output schema declared.
No examples provided.
evaluate_msbuild_items ~80
List MSBuild items of a given type (e.g. Compile, PackageReference) with evaluated includes and metadata.
| Name | Type | Req | Description |
|---|---|---|---|
| itemType | string | yes | Item type (e.g. Compile, PackageReference) |
| projectName | string | yes | Project name as loaded in the workspace |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
evaluate_msbuild_property ~79
Evaluate a single MSBuild property for a project (e.g. TargetFramework, Nullable) using Microsoft.Build.Evaluation.
| Name | Type | Req | Description |
|---|---|---|---|
| projectName | string | yes | Project name as loaded in the workspace |
| propertyName | string | yes | Property name (e.g. TargetFramework) |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
extract_and_wire_interface_preview ~135
Preview extracting an interface and optionally rewriting DI registrations to use it.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute path to the source file containing the concrete type |
| interfaceName | string|null | – | Optional: explicit interface name. Defaults to I + type name |
| targetProjectName | string | yes | Target project name or project file path for the interface |
| typeName | string | yes | Name of the concrete type to extract from |
| updateDiRegistrations | boolean | – | Whether to rewrite matching DI registrations to use the extracted interface |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
extract_interface_apply ~33
Apply a previously previewed interface extraction
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by extract_interface_preview |
No output schema declared.
No examples provided.
extract_interface_cross_project_preview ~120
Preview extracting an interface from a type into a different project. For same-project extraction, use extract_interface_preview instead.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute path to the source file containing the type. |
| interfaceName | string|null | – | Optional: interface name. Defaults to I + type name |
| targetProjectName | string|null | – | Optional: target project name or project file path |
| typeName | string | yes | Name of the type declaration to extract from |
| workspaceId | string | yes | Workspace session id from workspace_load. |
No output schema declared.
No examples provided.
extract_interface_preview ~183
Preview extracting an interface from a concrete type in the same project, with selected members. Optionally replace concrete-type references with the interface.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute path to the source file containing the type |
| interfaceName | string | yes | Name for the new interface (e.g., IMyService) |
| memberNames | array|null | – | Optional: specific member names to include. Pass as a native JSON array, not a JSON-encoded string. Example: ["GetValue", "SetValue"]. If omitted, all public instance members are included. |
| replaceUsages | boolean | – | If true, replace parameter and field references to the concrete type with the interface (default: false) |
| typeName | string | yes | Name of the concrete type to extract from |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
extract_method_apply ~35
Apply a previously previewed extract method refactoring.
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by extract_method_preview |
No output schema declared.
No examples provided.
extract_method_preview ~149
Preview extracting selected statements into a new method, inferring parameters and return values by data flow. Selection must cover complete statements in one block, with no return statements.
| Name | Type | Req | Description |
|---|---|---|---|
| endColumn | integer | yes | 1-based end column of the selection |
| endLine | integer | yes | 1-based end line of the selection |
| filePath | string | yes | Absolute path to the source file |
| methodName | string | yes | Name for the extracted method |
| startColumn | integer | yes | 1-based start column of the selection |
| startLine | integer | yes | 1-based start line of the selection |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
extract_shared_expression_to_helper_preview ~241
Preview replacing a shared sub-expression with static-helper calls, unlike extract_method_preview. Refuses on occurrences < 2, mixed free-variable types, or cross-type hits when allowCrossFile=false.
| Name | Type | Req | Description |
|---|---|---|---|
| allowCrossFile | boolean | – | When true, scans the entire project for structurally-identical matches. When false (default), the scan is restricted to the example expression's containing type. |
| exampleEndColumn | integer | yes | 1-based end column of the example expression |
| exampleEndLine | integer | yes | 1-based end line of the example expression |
| exampleFilePath | string | yes | Absolute path to a source file containing one instance of the expression |
| exampleStartColumn | integer | yes | 1-based start column of the example expression |
| exampleStartLine | integer | yes | 1-based start line of the example expression |
| helperAccessibility | string | – | Accessibility for the synthesized helper: 'private', 'internal', or 'public'. Defaults to 'private'. |
| helperName | string | yes | Name for the synthesized helper method |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
extract_type_apply ~33
Apply a previously previewed type extraction
| Name | Type | Req | Description |
|---|---|---|---|
| previewToken | string | yes | The preview token returned by extract_type_preview |
No output schema declared.
No examples provided.
extract_type_preview ~162
Preview extracting selected members from a type into a new type. The source type gets a private field for the new type and the extracted members are moved. Use this for SRP refactoring.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | Absolute path to the source file containing the type |
| memberNames | array | yes | Names of members to extract into the new type |
| newFilePath | string|null | – | Optional: target file path for the new type. If omitted, defaults to {NewTypeName}.cs in the same directory |
| newTypeName | string | yes | Name for the new type |
| typeName | string | yes | Name of the source type to extract from |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
find_base_members ~155
Find the base or implemented members behind an override or implementation. Metadata-boundary bases (e.g. IEquatable<T>.Equals from corlib) surface with FilePath=null so counts match member_hierarchy.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer|null | – | Optional: 1-based column number |
| filePath | string|null | – | Optional: absolute path to the source file |
| line | integer|null | – | Optional: 1-based line number |
| metadataName | string|null | – | Optional: fully qualified metadata name, e.g. Namespace.TypeName |
| symbolHandle | string|null | – | Optional: stable symbol handle returned by other semantic tools |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
find_consumers ~277
Find all types that depend on a given type or interface, classified by dependency kind (Constructor, Field, Parameter, BaseType, LocalVariable, Property, ReturnType, GenericArgument, StaticMemberAccess). Optional projectFilter scopes the walk.
| Name | Type | Req | Description |
|---|---|---|---|
| column | integer|null | – | Optional: 1-based column number |
| filePath | string|null | – | Optional: absolute path to the source file |
| limit | integer | – | Maximum number of consumers to return (default: 100). Consumers are ordered by ascending type name; the `totals` block and `hasMore` flag let callers page high-fan-out types. |
| line | integer|null | – | Optional: 1-based line number |
| metadataName | string|null | – | Optional: fully qualified metadata name, e.g. Namespace.IMyInterface |
| offset | integer | – | Number of consumers to skip before returning results (default: 0). |
| projectFilter | string|null | – | Optional: case-sensitive Project.Name filter to scope the consumer walk; comma-separated for multiple projects (e.g. 'Foo.Core,Foo.Tests'). Null/empty preserves the unfiltered solution-wide walk. |
| symbolHandle | string|null | – | Optional: stable symbol handle returned by other semantic tools |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
find_dead_fields ~160
Find fields never read, never written, or neither; includePublic=true adds public/protected fields. removalBlockedBy explains refusals; only send safelyRemovable hits to remove_dead_code_preview.
| Name | Type | Req | Description |
|---|---|---|---|
| includePublic | boolean | – | Include public/protected fields in the scan (default: false). |
| limit | integer | – | Maximum number of hits to return (default: 50). |
| projectName | string|null | – | Optional: filter by project name to scope the scan on large solutions. |
| usageKind | string|null | – | Optional: restrict results to one usage kind: `never-read`, `never-written`, or `never-either`. Default: all kinds. |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
find_dead_locals ~106
Find locals written but never read via data-flow analysis (IDE0059). Excludes discards, foreach/using/catch locals, pattern/tuple designations, out var, and consts.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Maximum number of hits to return (default: 50). |
| projectName | string|null | – | Optional: filter by project name to scope the scan on large solutions. |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
find_duplicate_helpers ~149
Find private or internal static helpers that only re-wrap a BCL or NuGet method. Unlike find_duplicated_methods, this detects reinvented framework helpers.
| Name | Type | Req | Description |
|---|---|---|---|
| excludeFrameworkWrappers | boolean | – | When true (default), omit delegations into common hosting, service-registration, and HTTP extension APIs as framework glue (minimal APIs, DI/CORS setup, logging host hooks, HTTP client helpers, and r… |
| limit | integer | – | Maximum number of hits to return (default: 50). |
| projectName | string|null | – | Optional: filter by project name to scope the scan on large solutions. |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
find_duplicated_code ~249
Alias for find_duplicated_methods for cross-MCP-server compatibility. Use find_duplicate_helpers for BCL or NuGet re-wraps; prefer the canonical tools in new code.
| Name | Type | Req | Description |
|---|---|---|---|
| excludeMcpToolWrappers | boolean | – | When true (default), skip [McpServerTool]-attributed methods whose body is a single delegation, since MCP requires one wrapper shim per tool name. |
| limit | integer | – | Maximum number of groups to return (default: 50). |
| minLines | integer | – | Minimum body line count for a method to be considered (default: 10). |
| projectFilter | string|null | – | Optional: filter by project name to scope the scan on large solutions. |
| similarityThreshold | number | – | Structural similarity threshold in [0.0, 1.0] (default: 0.85). |
| summary | boolean | – | When true, omit each group's per-member `Methods` array (file paths + line spans) and return only per-cluster metadata. Smaller payload for large solutions where full member lists exceed the MCP outp… |
| workspaceId | string | yes | The workspace session identifier returned by workspace_load |
No output schema declared.
No examples provided.
What is the io.github.darylmcd/roslyn-mcp server?
io.github.darylmcd/roslyn-mcp is listed in the public MCP registry as io.github.darylmcd/roslyn-mcp. Local-first MCP server for semantic C# analysis & refactoring via Roslyn & MSBuildWorkspace. This page covers its NuGet package (Darylmcd.RoslynMcp).
Is the io.github.darylmcd/roslyn-mcp server safe to use?
io.github.darylmcd/roslyn-mcp scores 85 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 20 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 io.github.darylmcd/roslyn-mcp server expose?
io.github.darylmcd/roslyn-mcp exposes 174 tools: add_central_package_version_preview, add_package_reference_preview, add_pragma_suppression, add_project_reference_preview, add_target_framework_preview, and 169 more. Their descriptions and schemas cost roughly 24,032 tokens of context every time the server is loaded.
Is the io.github.darylmcd/roslyn-mcp server still maintained?
io.github.darylmcd/roslyn-mcp is still listed as active in the MCP registry. We last reached this channel on 20 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 io.github.darylmcd/roslyn-mcp server under?
io.github.darylmcd/roslyn-mcp declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.