Skip to content
verify mcp Beta VerifyMCP is currently in beta. If you notice any issues, get in touch and we’ll put it right.

io.github.darylmcd/roslyn-mcp

NUGET · DARYLMCD.ROSLYNMCP · SCANNED SEP 20

Local-first MCP server for semantic C# analysis & refactoring via Roslyn & MSBuildWorkspace.

0 this week 85 Trust /100
Trust breakdown (7 categories)

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
Install

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

# add to Claude Code
claude mcp add darylmcd-roslyn-mcp -- dnx Darylmcd.RoslynMcp@4.2.1 --yes
// .cursor/mcp.json
{
  "mcpServers": {
    "darylmcd-roslyn-mcp": {
      "command": "dnx",
      "args": [
        "Darylmcd.RoslynMcp@4.2.1",
        "--yes"
      ]
    }
  }
}
// .vscode/mcp.json
{
  "servers": {
    "darylmcd-roslyn-mcp": {
      "command": "dnx",
      "args": [
        "Darylmcd.RoslynMcp@4.2.1",
        "--yes"
      ]
    }
  }
}
# add to Codex CLI
codex mcp add darylmcd-roslyn-mcp -- dnx Darylmcd.RoslynMcp@4.2.1 --yes
// opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "darylmcd-roslyn-mcp": {
      "type": "local",
      "command": [
        "dnx",
        "Darylmcd.RoslynMcp@4.2.1",
        "--yes"
      ],
      "enabled": true
    }
  }
}
# ~/.hermes/config.yaml
mcp_servers:
  darylmcd-roslyn-mcp:
    command: "dnx"
    args: ["Darylmcd.RoslynMcp@4.2.1", "--yes"]
// ~/.netclaw/config/netclaw.json
{
  "McpServers": {
    "darylmcd-roslyn-mcp": {
      "Transport": "stdio",
      "Command": "dnx",
      "Arguments": [
        "Darylmcd.RoslynMcp@4.2.1",
        "--yes"
      ]
    }
  }
}
// mcp.json
{
  "mcpServers": {
    "darylmcd-roslyn-mcp": {
      "command": "dnx",
      "args": [
        "Darylmcd.RoslynMcp@4.2.1",
        "--yes"
      ]
    }
  }
}
Changelog

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.

Diagnostics

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 →

MCP tools · 174 exposed · ~24,032 tokens

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 →

Tool Tokens
add_central_package_version_preview ~80

Preview adding a PackageVersion entry to Directory.Packages.props.

NameTypeReqDescription
packageIdstringyesNuGet package id to add to Directory.Packages.props
versionstringyesNuGet package version to set in Directory.Packages.props
workspaceIdstringyesThe 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.

NameTypeReqDescription
packageIdstringyesNuGet package id to add
projectNamestringyesProject name or project file path within the loaded workspace
versionstringyesNuGet package version to add
workspaceIdstringyesThe 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.

NameTypeReqDescription
diagnosticIdstringyesDiagnostic id (e.g. CS0168)
filePathstringyesAbsolute path to the source file
lineintegeryes1-based line number: pragma is inserted before this line
workspaceIdstringyesThe 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.

NameTypeReqDescription
projectNamestringyesProject name or project file path within the loaded workspace
referencedProjectNamestringyesReferenced project name or project file path
workspaceIdstringyesThe 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.

NameTypeReqDescription
projectNamestringyesProject name or project file path within the loaded workspace
targetFrameworkstringyesTarget framework moniker to add, for example net8.0
workspaceIdstringyesThe 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.

NameTypeReqDescription
endLineintegeryes1-based end line of the code region to analyze
filePathstringyesAbsolute path to the source file
startLineintegeryes1-based start line of the code region to analyze
workspaceIdstringyesThe 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.

NameTypeReqDescription
endLineintegeryes1-based end line of the code region to analyze
filePathstringyesAbsolute path to the source file
startLineintegeryes1-based start line of the code region to analyze
workspaceIdstringyesThe 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.

NameTypeReqDescription
codestringyesThe C# code to analyze
kindstringThe snippet kind: 'expression', 'statements', 'returnExpression', 'members', or 'program' (default)
usingsarray|nullOptional: 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

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
autoRevertOnErrorbooleanWhen 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.
fileEditsarrayyesArray of file edits. Each has filePath (string) and edits (array of TextEditDto with startLine, startColumn, endLine, endColumn, newText)
skipSyntaxCheckbooleanWhen false (default), each C# file is parsed after edits; parser errors block that file's apply.
verifybooleanWhen 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…
workspaceIdstringyesThe 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.

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
autoRevertOnErrorbooleanWhen 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…
editsarrayyesArray 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…
filePathstringyesAbsolute path to the file to edit.
skipSyntaxCheckbooleanWhen false (default), C# files are parsed after edits and lexer/parser errors block the apply. Set true only for intentional intermediate invalid states.
verifybooleanWhen 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.
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
previewTokenstringyesThe preview token returned by an *_preview tool
rollbackOnErrorbooleanIf 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

NameTypeReqDescription
projectNamestringyesProject name or project file path within the loaded workspace
workspaceIdstringyesThe 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

NameTypeReqDescription
workspaceIdstringyesThe 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.

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
newTypeNamestringyesFully qualified or simple name of the replacement type
oldTypeNamestringyesFully qualified or simple name of the type to replace
scopestring|nullOptional: scope filter — 'parameters', 'fields', or 'all' (default: 'all')
workspaceIdstringyesThe 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.

NameTypeReqDescription
calleesLimitintegerMaximum number of callees to return (default: 100)
callersLimitintegerMaximum number of callers to return (default: 100)
columninteger|nullOptional: 1-based column number
filePathstring|nullOptional: absolute path to the source file
lineinteger|nullOptional: 1-based line number
metadataNamestring|nullOptional: fully qualified metadata name, e.g. Namespace.TypeName
symbolHandlestring|nullOptional: stable symbol handle returned by other semantic tools
workspaceIdstringyesThe 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.

NameTypeReqDescription
columninteger|nullOptional: 1-based column number of the method declaration
defaultValuestring|nullop='add' only: the default value spliced into every existing callsite (e.g. 'null', 'default', '""', '0').
filePathstring|nullOptional: absolute path to the source file containing the method declaration
lineinteger|nullOptional: 1-based line number of the method declaration
metadataNamestring|nullOptional: 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…
namestring|nullParameter 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.
newNamestring|nullop='rename' only: the new parameter name.
newOrderstring|nullop='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.
opstringyesOperation: 'add', 'remove', 'rename', or 'reorder'.
parameterTypestring|nullop='add' only: the parameter type (e.g. 'string', 'IReadOnlyList<int>', 'CancellationToken').
positioninteger|nullOptional position (0-based) of the parameter. For op='add': insertion index (defaults to trailing). For op='remove': index to drop.
symbolHandlestring|nullOptional: stable symbol handle returned by other semantic tools
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
fromNamespacestringyesFully-qualified namespace currently containing the type
newFilePathstring|nullOptional: absolute destination file path. If omitted, the file stays in place and only its namespace declaration is rewritten
toNamespacestringyesFully-qualified destination namespace inside the same project
typeNamestringyesName of the type to relocate (must be unique within fromNamespace)
workspaceIdstringyesWorkspace 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

NameTypeReqDescription
previewTokenstringyesPreview 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

NameTypeReqDescription
columnintegeryes1-based column number
diagnosticIdstringyesDiagnostic identifier, e.g. CS8019
filePathstringyesAbsolute path to the source file.
fixIdstring|nullOptional: curated fix identifier from diagnostic_details
lineintegeryes1-based line number
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
emitValidationbooleanWhen 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…
filestring|nullOptional: only return diagnostics whose file path matches this absolute path
filesarray|nullOptional: 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…
limitintegerMaximum number of diagnostics to return (default: 50)
offsetintegerNumber of diagnostics to skip before returning results (default: 0)
projectNamestring|nullOptional: filter by project name
severitystring|nullOptional: minimum severity filter (Error, Warning, Info, Hidden)
workspaceIdstring|nullOptional: 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.

NameTypeReqDescription
previewTokenstringyesPreview 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.

NameTypeReqDescription
contentstringyesInitial file contents
filePathstringyesAbsolute path to the file to create.
projectNamestringyesProject name or project file path within the loaded workspace
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
previewTokenstringyesPreview 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.

NameTypeReqDescription
filePathstringyesAbsolute path to the file to delete.
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
filePathstringyesAbsolute path to the source file containing the concrete type.
interfaceNamestring|nullOptional: interface name. Defaults to I + type name
interfaceProjectNamestringyesTarget project name or project file path for the extracted interface
typeNamestringyesName of the concrete type to invert dependencies around
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
columninteger|null1-based column number (alias: startColumn). Supply exactly one of column/startColumn.
diagnosticIdstringyesDiagnostic identifier, e.g. CS8019
filePathstringyesAbsolute path to the source file
lineinteger|null1-based line number (alias: startLine). Supply exactly one of line/startLine.
startColumninteger|nullAlias for column, matching the positional-tool convention used by find_references, goto_definition, etc.
startLineinteger|nullAlias for line, matching the positional-tool convention used by find_references, goto_definition, etc.
workspaceIdstringyesThe 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.

NameTypeReqDescription
filePathstring|nullOptional: absolute path to the source file
metadataNamestring|nullOptional: fully qualified metadata name, e.g. Namespace.TypeName
symbolHandlestring|nullOptional: stable symbol handle returned by other semantic tools
workspaceIdstring|nullOptional: 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

NameTypeReqDescription
columnintegeryes1-based column number
filePathstringyesAbsolute path to the source file
lineintegeryes1-based line number
workspaceIdstringyesThe 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.

NameTypeReqDescription
codestringyesThe C# code to evaluate (expression, statement, or multi-line script)
importsarray|nullOptional: additional namespace imports. Pass as a native JSON array, not a JSON-encoded string. Example: ["System.IO", "System.Net.Http"].
timeoutSecondsinteger|nullOptional: 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.

NameTypeReqDescription
itemTypestringyesItem type (e.g. Compile, PackageReference)
projectNamestringyesProject name as loaded in the workspace
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
projectNamestringyesProject name as loaded in the workspace
propertyNamestringyesProperty name (e.g. TargetFramework)
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
filePathstringyesAbsolute path to the source file containing the concrete type
interfaceNamestring|nullOptional: explicit interface name. Defaults to I + type name
targetProjectNamestringyesTarget project name or project file path for the interface
typeNamestringyesName of the concrete type to extract from
updateDiRegistrationsbooleanWhether to rewrite matching DI registrations to use the extracted interface
workspaceIdstringyesThe workspace session identifier returned by workspace_load

No output schema declared.

No examples provided.

extract_interface_apply ~33

Apply a previously previewed interface extraction

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
filePathstringyesAbsolute path to the source file containing the type.
interfaceNamestring|nullOptional: interface name. Defaults to I + type name
targetProjectNamestring|nullOptional: target project name or project file path
typeNamestringyesName of the type declaration to extract from
workspaceIdstringyesWorkspace 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.

NameTypeReqDescription
filePathstringyesAbsolute path to the source file containing the type
interfaceNamestringyesName for the new interface (e.g., IMyService)
memberNamesarray|nullOptional: 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.
replaceUsagesbooleanIf true, replace parameter and field references to the concrete type with the interface (default: false)
typeNamestringyesName of the concrete type to extract from
workspaceIdstringyesThe 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.

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
endColumnintegeryes1-based end column of the selection
endLineintegeryes1-based end line of the selection
filePathstringyesAbsolute path to the source file
methodNamestringyesName for the extracted method
startColumnintegeryes1-based start column of the selection
startLineintegeryes1-based start line of the selection
workspaceIdstringyesThe 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.

NameTypeReqDescription
allowCrossFilebooleanWhen true, scans the entire project for structurally-identical matches. When false (default), the scan is restricted to the example expression's containing type.
exampleEndColumnintegeryes1-based end column of the example expression
exampleEndLineintegeryes1-based end line of the example expression
exampleFilePathstringyesAbsolute path to a source file containing one instance of the expression
exampleStartColumnintegeryes1-based start column of the example expression
exampleStartLineintegeryes1-based start line of the example expression
helperAccessibilitystringAccessibility for the synthesized helper: 'private', 'internal', or 'public'. Defaults to 'private'.
helperNamestringyesName for the synthesized helper method
workspaceIdstringyesThe workspace session identifier returned by workspace_load

No output schema declared.

No examples provided.

extract_type_apply ~33

Apply a previously previewed type extraction

NameTypeReqDescription
previewTokenstringyesThe 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.

NameTypeReqDescription
filePathstringyesAbsolute path to the source file containing the type
memberNamesarrayyesNames of members to extract into the new type
newFilePathstring|nullOptional: target file path for the new type. If omitted, defaults to {NewTypeName}.cs in the same directory
newTypeNamestringyesName for the new type
typeNamestringyesName of the source type to extract from
workspaceIdstringyesThe 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.

NameTypeReqDescription
columninteger|nullOptional: 1-based column number
filePathstring|nullOptional: absolute path to the source file
lineinteger|nullOptional: 1-based line number
metadataNamestring|nullOptional: fully qualified metadata name, e.g. Namespace.TypeName
symbolHandlestring|nullOptional: stable symbol handle returned by other semantic tools
workspaceIdstringyesThe 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.

NameTypeReqDescription
columninteger|nullOptional: 1-based column number
filePathstring|nullOptional: absolute path to the source file
limitintegerMaximum 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.
lineinteger|nullOptional: 1-based line number
metadataNamestring|nullOptional: fully qualified metadata name, e.g. Namespace.IMyInterface
offsetintegerNumber of consumers to skip before returning results (default: 0).
projectFilterstring|nullOptional: 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.
symbolHandlestring|nullOptional: stable symbol handle returned by other semantic tools
workspaceIdstringyesThe 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.

NameTypeReqDescription
includePublicbooleanInclude public/protected fields in the scan (default: false).
limitintegerMaximum number of hits to return (default: 50).
projectNamestring|nullOptional: filter by project name to scope the scan on large solutions.
usageKindstring|nullOptional: restrict results to one usage kind: `never-read`, `never-written`, or `never-either`. Default: all kinds.
workspaceIdstringyesThe 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.

NameTypeReqDescription
limitintegerMaximum number of hits to return (default: 50).
projectNamestring|nullOptional: filter by project name to scope the scan on large solutions.
workspaceIdstringyesThe 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.

NameTypeReqDescription
excludeFrameworkWrappersbooleanWhen 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…
limitintegerMaximum number of hits to return (default: 50).
projectNamestring|nullOptional: filter by project name to scope the scan on large solutions.
workspaceIdstringyesThe 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.

NameTypeReqDescription
excludeMcpToolWrappersbooleanWhen true (default), skip [McpServerTool]-attributed methods whose body is a single delegation, since MCP requires one wrapper shim per tool name.
limitintegerMaximum number of groups to return (default: 50).
minLinesintegerMinimum body line count for a method to be considered (default: 10).
projectFilterstring|nullOptional: filter by project name to scope the scan on large solutions.
similarityThresholdnumberStructural similarity threshold in [0.0, 1.0] (default: 0.85).
summarybooleanWhen 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…
workspaceIdstringyesThe workspace session identifier returned by workspace_load

No output schema declared.

No examples provided.

Common questions

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.