SSyncDev

ILens MCP Server

Targeted .NET assembly inspection for AI agents on Windows: find types, decompile one method, trace callers.

Local server

What is the ILens MCP Server?

Decompiling a .NET assembly is cheap. Reading the result is not. The usual tools, ilspycmd and ildasm, will happily answer a question about a closed-source DLL by printing all of it. That output then rides along in the context window for every following turn, which is how a question about one class ends up costing a small fortune in tokens.

The ILens MCP server replaces that dump with narrow, bounded queries. It sits on top of the ILSpy decompiler and analyzer libraries, and each call returns only the slice the agent asked for. In one benchmark run against the ILSpy decompiler's own DLL, listing a namespace's public types came back at under a thousand estimated tokens, where a full decompile ran past a million.

Lookups it offers

  • find_types lists the types in a namespace
  • list_members shows one type's API surface without method bodies
  • find_methods finds which types expose a method by name
  • decompile returns a single method body as C#
  • search_code searches decompiled code for a pattern
  • analyze runs cross-reference queries: callers, overrides, implementations, extension methods, attribute usage and call sites
  • list_allowed_roots tells the agent which folders it may read

It can also compare two builds and list what a Harmony mod patches, which helps if you maintain or audit Harmony patches.

Language coverage

The metadata tools read language-neutral data, so they work on assemblies from any .NET language. Anything that produces code, including decompile, search_code and the call-site analysis, always emits C#. F#, VB.NET or C++/CLI assemblies still load, but some constructs may come out looking odd.

Installing and registering

ILens targets Windows 10 and 11 on x64. It installs with winget install Tadis.ILens as a self-contained binary, with no separate .NET runtime and no admin rights. The ilens command lands on your user PATH.

Registration needs at least one --allow-root argument. Without one, the server refuses to load anything. Every requested path is checked against those roots, .. traversal is rejected, and symlinks are resolved before the check. Memory is capped at 200 MB by default (--max-total-size changes it), with the least recently used assemblies closed first.

A first install needs a full restart of the Claude app, not just a new chat, because Windows captures PATH when a process starts.

Caveats

The binary is unsigned. With Smart App Control enabled, Windows 11 may block it outright. Claude Code reads the server's built-in instructions automatically, but Claude Desktop's chat does not, so there you should add a short note to your client instructions telling the model to prefer ILens over shelling out to ildasm.

ILens is read-only and makes no network calls. For more tools that connect agents to niche software, browse other integrations, or compare it with the rest of our other integrations directory if you are hunting for Windows-specific tooling.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
find_typesList the types in a given namespace of an assembly.
list_membersShow one type's members and signatures without method bodies.
find_methodsFind which types expose a method with a given name.
decompileDecompile a single method body to C#.
search_codeSearch the decompiled C# for a pattern.
analyzeCross-reference analysis: callers, overrides, implementations, extension methods, attribute usage and call sites.
list_allowed_rootsReport which directory trees the server is allowed to load assemblies from.

How to install the ILens MCP Server

{
  "mcpServers": {
    "ilens": {
      "command": "ilens",
      "args": [
        "--allow-root",
        "C:\\path\\to\\dlls"
      ]
    }
  }
}

Install first with winget install Tadis.ILens, then fully restart Claude. Replace the path with the folder holding your assemblies; at least one --allow-root is required. Claude Desktop chat does not read server instructions, so add a note to your client instructions to prefer ILens.

Frequently asked questions

No. It is built for Windows 10 and 11 on x64 and ships as a self-contained Windows binary installed through winget.