Analyzes C# and .NET solutions with Roslyn for semantic navigation, diagnostics, impact analysis, and refactoring workflows.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Sharplens MCP.
get_symbol_infoSemantic info at position
go_to_definitionJump to symbol definition
find_referencesAll references; each classified read/write/invocation/cast/typeof/nameof/attribute; optional `kind` filter
find_implementationsInterface/abstract implementations
find_callersImpact analysis - who calls this?
get_call_graphMulti-hop callers/callees graph with depth bound + cycle detection
The pzalutski-pixel/sharplens-mcp MCP server gives coding agents semantic access to C# and .NET solutions through Microsoft Roslyn. Rather than treating source files as plain text, it resolves symbols, types, members, overloads, inheritance, attributes, and external assembly information using the compilerβs model.
Its tool set covers navigation, discovery, diagnostics, code-quality analysis, impact assessment, and refactoring support. Examples include locating definitions and references, finding callers and implementations, constructing bounded call graphs, comparing a public API with a Git reference, tracing exception flow, identifying dead branches, and resolving pasted stack traces to source locations. Several operations support batches or preview-style generation so an agent can inspect proposed changes before applying them.
The server maintains an in-memory representation of the loaded solution for responsive queries. Set DOTNET_SOLUTION_PATH to load a .sln or .slnx file at startup, or call load_solution before using analysis tools. Responses use a structured success/error/data shape and can include suggested follow-up tools. Coordinates are zero-based.
Roslyn-based resolution is useful for cases where textual matching is ambiguous, such as overloaded methods, partial types, inheritance, dispatch, or read/write reference classification. The server can also inspect NuGet, BCL, and other external assembly types when the solution provides the relevant references.
Install the pzalutski-pixel/sharplens-mcp MCP server with the SharpLensMcp global .NET tool or run the npm package with npx -y sharplens-mcp. A stdio client configuration can invoke the npm package and pass DOTNET_SOLUTION_PATH in its environment. The README specifically documents Claude Code setup through a project .mcp.json file.
Supported configuration variables are:
DOTNET_SOLUTION_PATH: startup solution path; if absent, use load_solution.SHARPLENS_ABSOLUTE_PATHS: return absolute rather than relative paths.SHARPLENS_LOG_LEVEL: set logging verbosity.SHARPLENS_TIMEOUT_SECONDS: set the long-operation timeout.SHARPLENS_MAX_DIAGNOSTICS: limit returned diagnostics.SHARPLENS_ENABLE_SEMANTIC_CACHE: enable or disable semantic caching.The pzalutski-pixel/sharplens-mcp MCP server exposes tools for:
The in-memory model can become stale after files are changed by external editor or file tools. Call sync_documents for modified, created, or deleted C# files. Changes made through the serverβs own refactoring tools are updated automatically; project-file changes require load_solution instead.
If no startup solution path is configured, analysis cannot begin until load_solution has been called. The README also notes that tool names no longer use the older roslyn: prefix; current names omit it, while prefixed aliases are retained temporarily for one migration release.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/pzalutski-pixel-sharplens-mcp)<a href="https://allmcps.com/mcp/pzalutski-pixel-sharplens-mcp"><img src="https://allmcps.com/api/badge/pzalutski-pixel-sharplens-mcp?style=directory" alt="Sharplens MCP on AllMCPs" /></a>