dotnet-lens-mcp 0.1.0-beta

This is a prerelease version of dotnet-lens-mcp.

                    
dotnet tool install --global dotnet-lens-mcp --version 0.1.0-beta
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dotnet-lens-mcp --version 0.1.0-beta
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-lens-mcp&version=0.1.0-beta&prerelease
                    
nuke :add-package dotnet-lens-mcp --version 0.1.0-beta
                    

dotnet-lens-mcp

A Model Context Protocol (MCP) server that brings Roslyn-powered code intelligence to your AI assistant.

What does it do?

This MCP server lets AI assistants understand C# code deeply by providing semantic analysis tools:

  • Type resolution - Hover over any variable or expression to see its actual type
  • Find definitions - Jump to where symbols are defined, just like F12 in VS
  • Find references - See everywhere a symbol is used across your solution
  • Explore APIs - Get IntelliSense-style member listings at any code position
  • Navigate inheritance - Find implementations, derived types, and base classes
  • Check build errors - Get real compiler diagnostics for your code

Getting Started

Configure your AI assistant to use the published package:

{
  "servers": {
    "dotnet-lens": {
      "type": "stdio",
      "command": "dnx",
      "args": ["dotnet-lens-mcp", "--version", "0.1.0-beta", "--yes"]
    }
  }
}

From Source

For development or testing:

{
  "servers": {
    "dotnet-lens": {
      "type": "stdio",
      "command": "dotnet",
      "args": ["run", "--project", "/path/to/DotnetLensMcp"]
    }
  }
}

Usage

Once configured, your AI assistant gains these capabilities:

  1. First, initialize the workspace - The AI will scan for .sln or .csproj files
  2. Then use any analysis tools - Get type info, find references, check for errors, etc.

Example prompts:

  • "Find all places where this method is called"
  • "Show me what methods I can call on this object"
  • "What classes implement this interface?"

Requirements

  • .NET 9.0 or later
  • A C# project or solution to analyze

Feedback & Issues

Found a bug? Not surprised! Please open an issue on our GitHub repository.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.0-beta 248 7/27/2025