loading…
Search for a command to run...
loading…
ILSpy for LLM coding agents. Reflection-based MCP server with 31+ tools to explore .NET assemblies, NuGet packages, types, members, attributes, and XML docs.
ILSpy for LLM coding agents. Reflection-based MCP server with 31+ tools to explore .NET assemblies, NuGet packages, types, members, attributes, and XML docs.
Sherlock MCP for .NET is a comprehensive Model Context Protocol (MCP) server that provides deep introspection capabilities for .NET assemblies. It enables Language Learning Models (LLMs) to analyze and understand your .NET code with precision, delivering accurate and context-aware responses for complex development scenarios.
This tool is essential for developers who want to harness LLM capabilities for:
Install the global tool from NuGet (adds sherlock-mcp to your PATH):
dotnet tool install -g Sherlock.MCP.Server
Alternatively, during development you can run the server locally:
dotnet run --project src/server/Sherlock.MCP.Server.csproj
Sherlock runs as a standard MCP server that communicates over stdio.
sherlock-mcpsherlock-mcp command. Example JSON entry (refer to your client’s docs for exact file location/format):{
"servers": {
"sherlock": {
"command": "sherlock-mcp"
}
}
}
No arguments are required. The server self-registers all tools when launched.
To automatically use Sherlock when working with .NET code, add these configurations:
Add this to your project's CLAUDE.md file:
## .NET Assembly Analysis
This project uses Sherlock MCP for .NET assembly analysis. When analyzing .NET types, methods, or assemblies:
1. Use sherlock-mcp tools instead of guessing about .NET APIs
2. For type analysis: `GetTypeInfo`, `GetTypeMethods`, `GetTypeProperties`
3. For assembly overview: `AnalyzeAssembly` or `GetTypesFromAssembly`
4. For project structure: `AnalyzeProject`, `AnalyzeSolution`
5. Assembly paths are typically: `./bin/Debug/net9.0/ProjectName.dll`
Always include assembly path, prefer full type names, and use pagination for large results.
Add this to your project's .cursorrules file:
# .NET Analysis Rules
When working with .NET code, assemblies, or types:
- Use sherlock-mcp tools for accurate type/member information
- Assembly paths: ./bin/Debug/net9.0/*.dll or ./bin/Release/net9.0/*.dll
- For unknown types: GetTypesFromAssembly -> GetTypeInfo -> GetTypeMethods/Properties
- For code analysis: AnalyzeAssembly for overview, GetTypeInfo for details
- Use pagination (maxItems=50) for large results to avoid token limits
For system-wide usage, add to your global Claude Code settings or Cursor configuration:
For .NET development: Use sherlock-mcp tools when analyzing assemblies, types, methods, or project structure. Prefer these over guessing .NET API details.
Below are compact prompt snippets you can paste into your chat to get productive fast. Adjust paths to your local DLLs.
General setup
You have access to an MCP server named "sherlock" that can analyze .NET assemblies. Prefer these tools for .NET questions and include short reasoning for which tool you chose. Ask me for the assembly path if missing.
Enumerate members for a type
Analyze: /absolute/path/to/MyLib/bin/Debug/net9.0/MyLib.dll
Type: MyNamespace.MyType
List methods, including non-public, filter name contains "Async", include attributes, return JSON.
Get XML docs for a member
Use GetXmlDocsForMember on /abs/path/MyLib.dll, type MyNamespace.MyType, member TryParse. Summarize the summary + params.
Find types and drill in
List types from /abs/path/MyLib.dll; then get type info for the first result and list its nested types.
Tune paging and filters
Use GetTypeMethods on /abs/path/MyLib.dll, type MyNamespace.MyType, sortBy name, sortOrder asc, skip 0, take 25, hasAttributeContains Obsolete.
AnalyzeAssembly: Complete assembly overview with public types and metadataFindAssemblyByClassName: Locate assemblies containing specific class namesFindAssemblyByFileName: Find assemblies by file name in common build pathsGetTypesFromAssembly: List all public types with metadata (paginated)AnalyzeType: Comprehensive type analysis with all membersGetTypeInfo: Detailed type metadata (accessibility, generics, nested types)GetTypeHierarchy: Inheritance chain and interface implementationsGetGenericTypeInfo: Generic parameters, arguments, and variance informationGetTypeAttributes: Custom attributes declared on typesGetNestedTypes: Nested type declarationsGetAllTypeMembers: All members across all categoriesGetTypeMethods: Method signatures, overloads, and metadataGetTypeProperties: Property details including getters/setters and indexersGetTypeFields: Field information including constants and readonly fieldsGetTypeEvents: Event declarations with handler typesGetTypeConstructors: Constructor signatures and parametersAnalyzeMethod: Deep method analysis with overloads and attributesFindImplementationsOf: Types implementing an interface or deriving from a base classFindMethodsReturning: Methods whose return type matches a given type (open-generic match supported)FindReferencesTo: Broader sweep across parameters, fields, properties, events, and generic argumentsGetMemberAttributes: Attributes for specific membersGetParameterAttributes: Parameter-level attribute informationGetXmlDocsForType: Extract type-level XML documentationGetXmlDocsForMember: Member-specific documentation (summary/params/returns/remarks)AnalyzeSolution: Parse .sln files and enumerate projectsAnalyzeProject: Project metadata, references, and build configurationGetProjectOutputPaths: Resolve output directories for different configurationsResolvePackageReferences: Map NuGet packages to cached assembliesFindDepsJsonDependencies: Parse deps.json for runtime dependenciesGetRuntimeOptions: Current server configuration and defaultsUpdateRuntimeOptions: Modify pagination, caching, and search behaviorAll member analysis tools support comprehensive filtering and pagination:
Filtering Options:
caseSensitive (bool): Case-sensitive type/member matchingnameContains (string): Filter by member name substringhasAttributeContains (string): Filter by attribute type substringincludePublic / includeNonPublic (bool): Visibility filteringincludeStatic / includeInstance (bool): Member type filteringPagination:
skip / take (int): Standard offset paginationmaxItems (int): Maximum results per requestcontinuationToken (string): Token-based pagination for large datasetssortBy / sortOrder (string): Sort by name/access in asc/desc orderType Resolution:
Namespace.Type), simple names (Type), and nested types (Outer+Inner)caseSensitive parameterAll tools return a stable JSON envelope:
{ "kind": "type.list|member.methods|...", "version": "1.0.0", "data": { /* result */ } }
Errors use a consistent shape:
{ "kind": "error", "version": "1.0.0", "code": "AssemblyNotFound|TypeNotFound|InvalidArgument|InternalError", "message": "...", "details": { } }
Common error codes include `AssemblyNotFound`, `TypeNotFound`, `MemberNotFound`, `InvalidArgument`, and `InternalError`.
Contributions are welcome. This repo includes an .editorconfig with modern C# preferences (file-scoped namespaces, expression-bodied members, 4-space indentation).
This project uses Conventional Commits for automated changelog generation. All commits must follow this format:
type(scope): description
Valid types:
feat - A new featurefix - A bug fixdocs - Documentation only changesstyle - Code style changes (formatting, semicolons, etc)refactor - Code change that neither fixes a bug nor adds a featureperf - Performance improvementtest - Adding or correcting testsbuild - Changes to build system or dependenciesci - Changes to CI configurationchore - Other changes that don't modify src or test filesrevert - Reverts a previous commitExamples:
git commit -m "feat(tools): add new assembly analysis tool"
git commit -m "fix: resolve null reference in type loader"
git commit -m "docs(readme): update installation instructions"
# Restore .NET tools (versionize, husky)
dotnet tool restore
# Install git hooks for commit validation
dotnet husky install
dotnet build and dotnet test locally before opening a PR.Maintainers can create releases using:
# Restore tools if not already done
dotnet tool restore
# Preview what will change
dotnet versionize --dry-run
# Create release (bumps version, updates changelog, creates git tag)
dotnet versionize
# Push changes and tag to trigger release workflow
git push --follow-tags
The release workflow will automatically:
server.json with the new versionmcp-name: io.github.jcucci/dotnet-sherlock-mcp
Sherlock MCP for .NET is licensed under the MIT License.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"dotnet-sherlock-mcp": {
"command": "npx",
"args": []
}
}
}Read and write pages in your workspace
автор: NotionIssues, cycles, triage — from Claude
автор: LinearSearch and read your Drive files
автор: GoogleConnect and unify data across various platforms and databases with [MindsDB as a single MCP server](https://docs.mindsdb.com/mcp/overview).
автор: mindsdbНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории productivity