dotnet-lens-mcp
0.1.0-beta
This is a prerelease version of dotnet-lens-mcp.
The VS Code MCP server configuration entry cannot be generated because the server.json file is invalid. Please refer to the package README and the MCP Configuration Guide for proper setup instructions.
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
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package dotnet-lens-mcp --version 0.1.0-beta
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
From NuGet (Recommended)
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:
- First, initialize the workspace - The AI will scan for .sln or .csproj files
- 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 |