home / mcp / sherlock mcp for .net mcp server

Sherlock MCP for .NET MCP Server

Provides deep inspection of .NET assemblies and rich XML documentation through a stable MCP API for code analysis and tooling.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jcucci-dotnet-sherlock-mcp": {
      "command": "sherlock-mcp",
      "args": []
    }
  }
}

Sherlock MCP for .NET is a specialized MCP server that deeply introspects .NET assemblies, enabling language models to analyze types, members, and project structures with precise metadata, rich XML docs, and efficient, paginated queries.

How to use

You interact with Sherlock MCP for .NET as a standard MCP server that speaks over stdio. Run the server locally, then connect your MCP client to it and start querying dotnet assemblies. You can explore types, members, project structures, and XML documentation, and you can apply filters and pagination to large result sets. Use the dedicated tools to obtain exact type information, comprehensive member details, and the complete metadata you need for analysis, tooling, or code generation.

How to install

Prerequisites: you must have the .NET SDK installed on your machine to run the server locally and to build example projects.

dotnet tool install -g Sherlock.MCP.Server

To run the server directly from source during development, use the following command to start Sherlock MCP for .NET from its project file.

dotnet run --project src/server/Sherlock.MCP.Server.csproj

Additional sections

Configuration and runtime behavior are designed to be simple to adopt across your development projects. The server exposes a stable JSON API over the MCP protocol and supports pagination, filtering, and caching to improve responsiveness on large codebases.

If you need to run Sherlock MCP for .NET as part of your automated workflow, you can also install the CLI tool globally and invoke it from scripts. When you start the server, it registers all available tools automatically and becomes available to MCP clients without additional configuration.

Troubleshooting tips: ensure your .NET SDK is up to date, verify the server process logs for startup errors, and confirm that your MCP client is compatible with the server version. For large assemblies, utilize pagination parameters to avoid token limits and to keep responses within reasonable sizes.

Tools and integration notes

The server provides a comprehensive set of tools for assembly analysis, type introspection, member inspection, and project metadata. You can enumerate types, inspect methods and properties, and retrieve detailed XML documentation for types and members. For full project and solution analysis, you can parse solutions, analyze projects, and resolve dependencies.

{
  "mcpServers": {
    "sherlock": {
      "command": "sherlock-mcp",
      "args": []
    }
  }
}

Available tools

AnalyzeAssembly

Produces a complete overview of an assembly, including public types, metadata, and references, enabling you to understand the overall structure and dependencies.

FindAssemblyByClassName

Locates assemblies that contain a given class name, assisting you in quickly mapping types to their source or binary locations.

FindAssemblyByFileName

Finds assemblies by their file name within common build output paths to streamline discovery.

GetTypesFromAssembly

Lists all public types in an assembly with metadata, supporting pagination for large datasets.

AnalyzeType

Performs a comprehensive analysis of a type including all its members, attributes, and nested types.

GetTypeInfo

Returns detailed metadata for a specific type, including accessibility, generics, and nested types.

GetTypeHierarchy

Displays the inheritance chain and implemented interfaces for a type.

GetGenericTypeInfo

Provides information about generic parameters, arguments, and variance for a type.

GetTypeAttributes

Retrieves custom attributes declared on a type.

GetNestedTypes

Lists nested type declarations within a parent type.

GetAllTypeMembers

Fetches all members across methods, properties, fields, events, and constructors with filtering options.

GetTypeMethods

Returns method signatures, overloads, and metadata with optional filtering and pagination.

GetTypeProperties

Provides property details including accessors and indexers.

GetTypeFields

Shows field information including constants and readonly fields.

GetTypeEvents

Describes event declarations and their handler types.

GetTypeConstructors

Lists constructor signatures and parameters.

AnalyzeMethod

Performs deep analysis of a method, including overloads and attributes.

GetMemberAttributes

Retrieves attributes applied to a specific member.

GetParameterAttributes

Shows attributes on method parameters.

GetXmlDocsForType

Extracts XML documentation for a type, including summaries and remarks.

GetXmlDocsForMember

Retrieves member-specific XML documentation such as summary, parameters, and returns.

AnalyzeSolution

Parses .sln files to enumerate projects and their relationships.

AnalyzeProject

Gathers project metadata, references, and build configurations.

GetProjectOutputPaths

Resolves output directories for different configurations.

ResolvePackageReferences

Maps NuGet package references to cached assemblies for faster analysis.

FindDepsJsonDependencies

Parses deps.json to identify runtime dependencies.

GetRuntimeOptions

Queries current server configuration and defaults.

UpdateRuntimeOptions

Modifies pagination, caching, and search behavior at runtime.