Koskamo

SharpLens MCP

SharpLens is a Model Context Protocol server providing 92 AI-optimized tools for .NET/C# semantic code analysis, navigation, refactoring, and code generation using Microsoft Roslyn. It enables AI coding agents to perform compiler-accurate code understanding, including finding async methods missing CancellationToken, impact analysis, dead code detection, complexity metrics, and safe refactoring with preview.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

SharpLens MCP logo, by pzalutski-pixelCommunity listingLocal stdioSource reviewed; not executedPublished by pzalutski-pixel
You need:dotnet tool install -g SharpLensMcpCreate .mcp.json in your project root
Vendor documentation

What you can do with it

  • Perform deep semantic analysis of C# codebases
  • Detect dead code and complexity metrics
  • Execute safe refactoring with preview
  • Find async methods missing CancellationToken

Source and maintenance

Community listingRegistry 1.5.3
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

sharplens-mcp 1.5.3

npmnpx
sharplens-mcp package definition
{
  "version": "1.5.3",
  "transport": "stdio",
  "identifier": "sharplens-mcp",
  "runtimeHint": "npx",
  "registryType": "npm",
  "environmentVariables": [
    {
      "name": "DOTNET_SOLUTION_PATH",
      "format": "string",
      "description": "Path to .sln or .slnx file to auto-load on startup"
    },
    {
      "name": "ROSLYN_LOG_LEVEL",
      "format": "string",
      "default": "Information",
      "description": "Logging verbosity: Trace, Debug, Information, Warning, Error"
    },
    {
      "name": "ROSLYN_TIMEOUT_SECONDS",
      "format": "number",
      "default": "30",
      "description": "Timeout for long-running operations"
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "mcpServers": {
    "sharplens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp@1.5.3"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "<YOUR_DOTNET_SOLUTION_PATH>",
        "ROSLYN_LOG_LEVEL": "<YOUR_ROSLYN_LOG_LEVEL>",
        "ROSLYN_TIMEOUT_SECONDS": "<YOUR_ROSLYN_TIMEOUT_SECONDS>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "mcpServers": {
    "sharplens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp@1.5.3"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "<YOUR_DOTNET_SOLUTION_PATH>",
        "ROSLYN_LOG_LEVEL": "<YOUR_ROSLYN_LOG_LEVEL>",
        "ROSLYN_TIMEOUT_SECONDS": "<YOUR_ROSLYN_TIMEOUT_SECONDS>"
      }
    }
  }
}

VS Code

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "sharplens-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp@1.5.3"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "<YOUR_DOTNET_SOLUTION_PATH>",
        "ROSLYN_LOG_LEVEL": "<YOUR_ROSLYN_LOG_LEVEL>",
        "ROSLYN_TIMEOUT_SECONDS": "<YOUR_ROSLYN_TIMEOUT_SECONDS>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "mcpServers": {
    "sharplens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sharplens-mcp@1.5.3"
      ],
      "env": {
        "DOTNET_SOLUTION_PATH": "<YOUR_DOTNET_SOLUTION_PATH>",
        "ROSLYN_LOG_LEVEL": "<YOUR_ROSLYN_LOG_LEVEL>",
        "ROSLYN_TIMEOUT_SECONDS": "<YOUR_ROSLYN_TIMEOUT_SECONDS>"
      }
    }
  }
}

Let your agent find its tools

Find servers like SharpLens MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.