# MarcelRoozekrans/roslyn-codelens-mcp [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/MarcelRoozekrans/roslyn-codelens-mcp  
**GitHub Stars:** 69  
**npm Downloads (last month):** 347  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/marcelroozekrans-roslyn-codelens-mcp

## Description
⃣ 🏠 🍎 🪟 🐧 - Roslyn-based MCP server with 22 semantic code intelligence tools for .NET. Type hierarchies, call graphs, DI registrations, diagnostics, code fixes, complexity metrics, and more. Sub-millisecond lookups via pre-built indexes.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "roslyn-codelens-mcp": {
    "command": "npx",
    "args": ["-y","roslyn-codelens-mcp"]
  }
}
```

## Documentation

## What MarcelRoozekrans/roslyn-codelens-mcp does

MarcelRoozekrans/roslyn-codelens-mcp exposes semantic code-intelligence operations for .NET projects through MCP. It is designed for agents that need to understand symbols and their relationships rather than merely search file text. The server can locate definitions and references, trace callers, inspect implementations, reconstruct type hierarchies, and identify event subscriptions.

Testing workflows are covered as well. Agents can find tests for a production symbol, summarize test inventories, identify public members that no test reaches transitively, and generate a compilable test-class skeleton. The generated skeleton can detect xUnit, NUnit, or MSTest usage, include constructor dependencies as TODO notes, and suggest a file path.

## How it works

Roslyn supplies the semantic model used to inspect source code, projects, referenced assemblies, and generated output. Pre-built indexes support fast lookups for code-navigation queries. Project-aware analysis includes project references, NuGet dependencies, source generators, and dependency-injection registrations. DI discovery handles generic registrations, `typeof` pairs, and factory-lambda forms.

Several operations follow relationships beyond a single declaration. Exception-flow analysis walks callees to a bounded depth and tracks propagation through enclosing handlers. Reference results identify occurrence types such as reads, writes, invocations, casts, declarations, and attributes. Stack-trace resolution maps .NET traces back to source locations while accounting for compiler-generated names, nested exceptions, and common trace transformations.

The server also analyzes quality and architecture. It can measure cyclomatic or cognitive complexity, flag async and disposable-resource issues, detect unused symbols, enforce semantic layering rules, find circular dependencies, and combine seven quality dimensions into a per-project health report. Public API analysis can compare the current surface with a JSON or DLL baseline to identify breaking changes.

## Tools and capabilities

Available operations include:

- Navigate symbols with definition lookup, fuzzy search, reference analysis, source retrieval, and stack-trace resolution.
- Explore designs through implementations, type hierarchies, callers, project dependencies, DI registrations, instantiation options, and architecture checks.
- Review correctness with diagnostics, code fixes, code actions, exception-flow analysis, throw-site searches, catch-block searches, and reflection-usage detection.
- Assess tests through test discovery, summaries, uncovered-symbol reports, and generated test skeletons.
- Review maintainability with complexity metrics, naming and async checks, disposable-use analysis, large-class and god-object detection, unused-symbol analysis, and project health reports.
- Inspect APIs and assemblies using public-surface enumeration, breaking-change comparison, source-generator output, external-assembly browsing, and IL inspection.

A hosted deployment is available through Fronteir AI. The project is also published through NuGet and npm package listings, providing package distribution options for deployments that use those ecosystems.

_Full upstream README: https://allmcps.com/mcp/marcelroozekrans-roslyn-codelens-mcp/readme_

