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.

SharpLens

NUGET · SHARPLENSMCP · 2 COMPONENTS · SCANNED SEP 20

67 semantic C#/.NET analysis tools via Roslyn: navigation, refactoring, codegen, audit.

0 this week 80 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 & Transparency45
Schema Quality & AI Usability78
  • AI-judged instruction clarity (excellent).Pass
  • Context-footprint check failed: tool/resource definitions use about 9359 tokens (~139/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 Management90
  • Stability observed for 27 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 Safety100
  • No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
  • We read all 67 captured tool definition(s), and no name or description among them implies an irreversible operation.Pass
  • An AI judge read all 67 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities20
  • Spec-recency check failed: implements MCP spec 2024-11-05; the latest is 2026-07-28. See how to fix → Fail
Install

How do I install the SharpLens MCP server?

SharpLens runs locally as a NuGet package, launched with dnx SharpLensMcp@1.5.3 --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 · SharpLensMcp

# add to Claude Code
claude mcp add pzalutski-pixel-sharplens -- dnx SharpLensMcp@1.5.3 --yes
// .cursor/mcp.json
{
  "mcpServers": {
    "pzalutski-pixel-sharplens": {
      "command": "dnx",
      "args": [
        "SharpLensMcp@1.5.3",
        "--yes"
      ]
    }
  }
}
// .vscode/mcp.json
{
  "servers": {
    "pzalutski-pixel-sharplens": {
      "command": "dnx",
      "args": [
        "SharpLensMcp@1.5.3",
        "--yes"
      ]
    }
  }
}
# add to Codex CLI
codex mcp add pzalutski-pixel-sharplens -- dnx SharpLensMcp@1.5.3 --yes
// opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "pzalutski-pixel-sharplens": {
      "type": "local",
      "command": [
        "dnx",
        "SharpLensMcp@1.5.3",
        "--yes"
      ],
      "enabled": true
    }
  }
}
# ~/.hermes/config.yaml
mcp_servers:
  pzalutski-pixel-sharplens:
    command: "dnx"
    args: ["SharpLensMcp@1.5.3", "--yes"]
// ~/.netclaw/config/netclaw.json
{
  "McpServers": {
    "pzalutski-pixel-sharplens": {
      "Transport": "stdio",
      "Command": "dnx",
      "Arguments": [
        "SharpLensMcp@1.5.3",
        "--yes"
      ]
    }
  }
}
// mcp.json
{
  "mcpServers": {
    "pzalutski-pixel-sharplens": {
      "command": "dnx",
      "args": [
        "SharpLensMcp@1.5.3",
        "--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.

  • 19 Sept 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 83 to 87. That category is still filling its 30-day observation window: 25 days of observed history at the previous scan, 26 at this one. The score rises as the window fills, whether or not the server changes.

  • 17 Sept 26 −3
    • Stability: pass → 0.80 functional
  • 16 Sept 26 +1
    • Stability: 0.97 → pass security
  • 14 Sept 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 90 to 93. That category is still filling its 30-day observation window: 27 days of observed history at the previous scan, 28 at this one. The score rises as the window fills, whether or not the server changes.

  • 12 Sept 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 83 to 87. That category is still filling its 30-day observation window: 25 days of observed history at the previous scan, 26 at this one. The score rises as the window fills, whether or not the server changes.

  • 10 Sept 26 −3
    • Stability: pass → 0.80 functional
  • 9 Sept 26 +1
    • Stability: 0.97 → pass security
  • 7 Sept 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 90 to 93. That category is still filling its 30-day observation window: 27 days of observed history at the previous scan, 28 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/SharpLensMcp@1.5.3

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 · 67 exposed · ~9,359 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
roslyn:get_symbol_info ~124

Get detailed semantic information about a symbol at a specific position. IMPORTANT: Uses ZERO-BASED coordinates. If your editor shows 'Line 14, Column 5', pass line=13, column=4. Returns symbol kind, type, namespace, documentation, and location.

NameTypeReqDescription
columnintegeryesZero-based column number (Visual Studio col 5 = col 4 here)
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number (Visual Studio line 14 = line 13 here)

No output schema declared.

No examples provided.

roslyn:get_type_hierarchy ~118

Get the inheritance hierarchy (base types and derived types) for a type. Returns baseTypes chain and derivedTypes list. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number
maxDerivedTypesintegerMaximum number of derived types to return (default: 50). Results are truncated with a hint if limit is exceeded.

No output schema declared.

No examples provided.

roslyn:get_type_members ~238

Get all members (methods, properties, fields, events) of a type BY NAME. USAGE PATTERNS: - Basic: get_type_members("MyClass") - list all members - With inheritance: get_type_members("MyService", includeInherited=true) - Filter by kind: get_type_members("MyClass", memberKind="Method") - Verbosity control: verbosity="summary" (names only), "compact" (default, + signatures), "full" (+ docs, attrs) WORKS WITH: Fully-qualified ("MyNamespace.MyClass"), simple ("MyClass"), or partial names.

NameTypeReqDescription
includeInheritedbooleanInclude members from base classes (default: false)
maxResultsintegerMaximum members to return (default: 100)
memberKindstringFilter: 'Method', 'Property', 'Field', 'Event'
typeNamestringyesType name (e.g., 'MyClass', 'MyNamespace.MyService')
verbositystring'summary' (names only), 'compact' (default), 'full' (+ docs, attrs)

No output schema declared.

No examples provided.

roslyn:get_type_members_batch ~169

Get members for multiple types in a single call (batch optimization). USAGE: get_type_members_batch(typeNames: ['ServiceA', 'ServiceB', 'ControllerC']) OUTPUT: Results for each type with members, or error if type not found BENEFIT: One call instead of multiple - reduces context usage for AI agents

NameTypeReqDescription
includeInheritedbooleanInclude inherited members (default: false)
maxResultsPerTypeintegerMax members per type (default: 50)
memberKindstringFilter: 'Method', 'Property', 'Field', 'Event'
typeNamesarrayyesArray of type names to look up
verbositystring'summary', 'compact' (default), or 'full'

No output schema declared.

No examples provided.

roslyn:get_type_overview ~66

Get comprehensive type overview in ONE CALL: type info + base types (first 3) + member counts. USAGE: get_type_overview("MyService") - returns everything you need to understand a type quickly.

NameTypeReqDescription
typeNamestringyesType name

No output schema declared.

No examples provided.

roslyn:go_to_definition ~96

Fast navigation to symbol definition. Returns the definition location without finding all references. IMPORTANT: Uses ZERO-BASED coordinates (editor line 10 = pass line 9).

NameTypeReqDescription
columnintegeryesZero-based column number (editor column - 1)
filePathstringyesAbsolute path to source file containing the symbol
lineintegeryesZero-based line number (editor line - 1)

No output schema declared.

No examples provided.

roslyn:health_check ~51

Check the health and status of the Roslyn MCP server and workspace. Returns: server status, solution loaded state, project count, and memory usage. Call this first to verify the server is ready.

Input schema present but exposes no named parameters.

No output schema declared.

No examples provided.

roslyn:implement_missing_members ~114

Generate stub implementations for interface/abstract members. USAGE: Position cursor on class declaration that implements interface or extends abstract class. OUTPUT: Generated stub code for all missing members. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number on the class declaration
previewbooleanPreview mode (default: true)

No output schema declared.

No examples provided.

roslyn:inline_variable ~108

Inline a variable, replacing all usages with its value. USAGE: Position cursor on a variable declaration or usage. OUTPUT: Variable removed and all usages replaced with the expression. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

NameTypeReqDescription
columnintegeryesZero-based column number
filePathstringyesAbsolute path to source file
lineintegeryesZero-based line number
previewbooleanPreview mode (default: true)

No output schema declared.

No examples provided.

roslyn:load_solution ~69

Load a .NET solution for analysis. MUST be called before using any other analysis tools. Returns: projectCount, documentCount, and load time. Use health_check to verify current state.

NameTypeReqDescription
solutionPathstringyesAbsolute path to .sln or .slnx file

No output schema declared.

No examples provided.

roslyn:organize_usings ~52

Sort and remove unused using directives in a file. Returns the modified file content. Automatically removes unused usings and sorts alphabetically.

NameTypeReqDescription
filePathstringyesAbsolute path to source file

No output schema declared.

No examples provided.

roslyn:organize_usings_batch ~142

Organize using directives for multiple files in a project. Supports file pattern filtering (e.g., '*.cs', 'Services/*.cs'). PREVIEW mode by default - set preview=false to apply changes.

NameTypeReqDescription
filePatternstringOptional: Glob pattern to filter files (e.g., '*.cs', 'Services/*.cs', '*Repository.cs'). Matches against file names, not full paths.
previewbooleanPreview mode (default: true). Set to false to apply changes to disk. ALWAYS preview first!
projectNamestringOptional: Project name to process. If omitted, processes all projects in solution.

No output schema declared.

No examples provided.

roslyn:rename_symbol ~229

Safely rename a symbol (type, method, property, etc.) across the entire solution. Uses Roslyn's semantic analysis to ensure all references are updated. SUPPORTS PREVIEW MODE - always preview first! IMPORTANT: Uses ZERO-BASED coordinates. Default shows first 20 files with summary verbosity.

NameTypeReqDescription
columnintegeryesZero-based column number (editor column - 1)
filePathstringyesAbsolute path to source file containing the symbol
lineintegeryesZero-based line number (editor line - 1)
maxFilesintegerMax files to show in preview (default: 20, prevents large outputs)
newNamestringyesNew name for the symbol
previewbooleanPreview changes without applying (default: true). ALWAYS preview first!
verbositystringOutput detail level: 'summary' (default, file paths + counts only ~200 tokens/file), 'compact' (add locations ~500 tokens/file), 'full' (include old/new text ~3000+ tokens/file)

No output schema declared.

No examples provided.

roslyn:search_symbols ~255

Search for types, methods, properties, etc. by name across the solution. Supports glob patterns (e.g., '*Handler' finds classes ending with 'Handler', 'Get*' finds symbols starting with 'Get'). Use ? for single character wildcard. PAGINATION: Returns totalCount and hasMore. Use offset to paginate through results.

NameTypeReqDescription
kindstringOptional: filter by symbol kind. For types use: Class, Interface, Struct, Enum, Delegate. For members use: Method, Property, Field, Event. Other: Namespace. Case-insensitive.
maxResultsintegerMaximum number of results per page (default: 50)
namespaceFilterstringOptional: filter by namespace (supports wildcards). Examples: 'MyApp.Core.*', '*.Services', 'MyApp.*.Handlers'. Case-insensitive.
offsetintegerOffset for pagination (default: 0). Use pagination.nextOffset from previous response to get next page.
querystringyesSearch query - supports wildcards: * (any characters), ? (single character). Examples: 'Handler', '*Handler', 'Get*', 'I?Service'. Case-insensitive.

No output schema declared.

No examples provided.

roslyn:semantic_query ~419

Advanced semantic code query with multiple filters. Find symbols based on their semantic properties. EXAMPLES: - Async methods without CancellationToken: isAsync=true, parameterExcludes=["CancellationToken"] - Public static methods: accessibility="Public", isStatic=true - Classes with [Obsolete]: kinds=["Class"], attributes=["ObsoleteAttribute"] FILTERS: All specified filters are combined with AND logic. Omit a filter to skip it. Returns symbol details with locations.

NameTypeReqDescription
accessibilitystringOptional: filter by accessibility. Values: Public, Private, Internal, Protected, ProtectedInternal, PrivateProtected
attributesarrayOptional: filter by attributes (must have ALL specified). Example: ['ObsoleteAttribute', 'EditorBrowsableAttribute']
isAsyncbooleanOptional: filter methods by async/await (true for async methods, false for sync methods)
isStaticbooleanOptional: filter by static modifier (true for static, false for instance)
kindsarrayOptional: filter by symbol kinds (can specify multiple). For types: Class, Interface, Struct, Enum, Delegate. For members: Method, Property, Field, Event. Example: ['Class', 'Interface']
maxResultsintegerMaximum number of results (default: 100)
namespaceFilterstringOptional: filter by namespace (supports wildcards). Examples: 'MyApp.Core.*', '*.Services'
parameterExcludesarrayOptional: filter methods that must NOT have these parameter types (partial match). Example: ['CancellationToken']
parameterIncludesarrayOptional: filter methods that MUST have these parameter types (partial match). Example: ['CancellationToken']
returnTypestringOptional: filter methods by return type. Partial match. Example: 'Task' finds all methods returning Task
typestringOptional: filter fields/properties by their type. Partial match. Example: 'ILogger' finds all ILogger fields/properties

No output schema declared.

No examples provided.

roslyn:sync_documents ~193

Synchronize document changes from disk into the loaded solution. Call this after using Edit/Write tools to ensure Roslyn has fresh content. USAGE: - sync_documents(filePaths: ["src/Foo.cs", "src/Bar.cs"]) - sync specific files - sync_documents() - sync ALL documents (refresh entire solution) WHEN TO CALL: - After using Edit tool to modify .cs files - After using Write tool to create new .cs files - After deleting .cs files - NOT needed after using SharpLensMcp refactoring tools (they auto-update) HANDLES: Modified files (updates content), new files (adds to solution), deleted files (removes from solution). Much faster than load_solution - only updates documents, doesn't re-parse projects.

NameTypeReqDescription
filePathsarrayOptional: specific file paths to sync. If omitted, syncs ALL documents from disk.

No output schema declared.

No examples provided.

roslyn:validate_code ~129

Check if code would compile without writing to disk. Use to validate generated code before applying. USAGE: validate_code(code="public void Foo() {}", contextFilePath="path/to/file.cs") to check with existing usings. OUTPUT: compiles (bool), errors list with line numbers. Essential before inserting AI-generated code.

NameTypeReqDescription
codestringyesC# code to validate
contextFilePathstringOptional: file to use for context (usings, namespace)
standalonebooleanIf true, treat code as complete file (default: false)

No output schema declared.

No examples provided.

Common questions

What is the SharpLens MCP server?

SharpLens is an MCP server listed in the public MCP registry as io.github.pzalutski-pixel/sharplens. 67 semantic C#/.NET analysis tools via Roslyn: navigation, refactoring, codegen, audit. This page covers its NuGet package (SharpLensMcp).

Is the SharpLens MCP server safe to use?

SharpLens scores 80 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 SharpLens MCP server expose?

SharpLens exposes 67 tools: roslyn:health_check, roslyn:load_solution, roslyn:sync_documents, roslyn:get_symbol_info, roslyn:go_to_definition, and 62 more. Their descriptions and schemas cost roughly 9,359 tokens of context every time the server is loaded.

Is the SharpLens MCP server still maintained?

SharpLens 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 SharpLens MCP server under?

SharpLens declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.