
ILens
io.github.tadis174Published by GitHub account tadis174v11Updated Nov 1, 2026
Inspect compiled .NET assemblies (Windows): find types, decompile to C#, trace usage, compare builds
Overview
Local Windows MCP server that lets an assistant inspect compiled .NET assemblies: list types and members, decompile methods, and trace cross-references.
- What you can do
- List types in a namespace and list a type's members without method bodies
- Find methods by name and locate which types expose a given method
- Decompile a single method body to C# and search code
- Run cross-reference analysis: callers, overrides, implementations, extension methods, attribute usage
- Show the configured allowed root directories so the assistant knows what is reachable
- When to use it
- Useful when an assistant needs to understand a compiled .NET DLL or EXE on a Windows machine — API surface, callers, or a single method's logic — without dumping whole files into context. It is meant to replace shelling out to ildasm or ilspycmd for targeted lookups.
- Requirements
- Windows 10/11 x64; the binary is self-contained, so no separate .NET runtime is needed. Installed via winget and registered in .mcp.json by command name. At least one --allow-root directory must be passed, otherwise no assembly can be loaded; an optional --max-total-size sets the memory budget (default 200 MB). A full restart of the client may be needed after a first install.
Installation
In SourceWeft
- Open ILens in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
ILens
An MCP server that lets AI agents inspect compiled .NET assemblies — list types, decompile methods, run cross-reference analysis — without burning tokens on full-file dumps.
Why
The default fallback for an AI agent inspecting a compiled .NET assembly is to shell out to ildasm (IL dump) or ilspycmd (full-C# decompile). Both dump an entire file as text, and that output stays in the agent's context as input tokens on every subsequent turn — quickly thousands of tokens spent inspecting a single class.
Measured against ICSharpCode.Decompiler.dll 9.1.0.7988 on 2026-10-31; token figures are character counts divided by 4, not a real tokenizer.
ILens turns assembly inspection into bounded, targeted lookups: list types in a namespace, list one type's members without bodies, find methods by name, decompile a single method body, run cross-reference analysis (callers, overrides, implementations, extension methods, attribute usage). Each call returns a focused response — making it cheap enough to leave registered as an always-available tool.
Scope
ILens is built for inspecting C# assemblies, and its output is C#. The metadata-driven tools (find_types, find_methods, list_members, analyze) read language-agnostic metadata and work on an assembly from any .NET language. decompile, search_code and analyze's call_sites kind always emit C# — for an assembly compiled from F#, VB.NET, or C++/CLI they still run, but constructs without a C# equivalent may render unfaithfully.
Built on ILSpy
ILens would be nothing without ILSpy. The decompiler, the analyzer, the type system that lets ILens speak about a .NET assembly in C# terms at all — none of that is ILens's. It belongs to the ILSpy team. The two libraries ILens links — ICSharpCode.Decompiler for the decompiler proper, ICSharpCode.ILSpyX for the analyzer infrastructure — represent more than a decade of careful work; this project is, candidly, a thin MCP shim on top.
That work is MIT-licensed, which is the only reason ILens can exist. If ILens is useful to you, please consider giving ILSpy a star. They earned it.
To be clear: bug reports and feature requests about ILens belong on the ILens issue tracker, not ILSpy's. Please don't take downstream problems to the upstream maintainers — they have enough work of their own.
Installation
System requirements: Windows 10/11, x64. The binary is self-contained — no separate .NET runtime install required.
Standard winget portable install. The binary lands under %LOCALAPPDATA%\Microsoft\WinGet\Packages\ and ilens becomes available on your user PATH automatically. No admin elevation needed.
See the user guide for alternative installers, updating, and installation troubleshooting.
Setup
Step 1: Register the server
Add an entry to .mcp.json in your project root. The installer adds ilens to your PATH, so the command field references the binary by name — no full path needed:
Each --allow-root flag adds a directory tree from which assemblies may be loaded. Without any --allow-root flags, the server cannot load any assemblies. Tool calls supply the assembly path per request; the server validates that the path is inside one of the configured roots, rejects path traversal (..), resolves symbolic links and junctions before re-checking containment, and keeps its memory within a budget (default 200 MB, --max-total-size <MB>) by closing the assemblies used longest ago.
Tool calls then specify which assembly to inspect:
The list_allowed_roots tool surfaces the configured roots so the agent can discover what's reachable.
Heads up — a first install needs a full restart, not just a new session. Windows captures
PATHper-process at launch, so an already-running Claude app holds a stale environment wheneverilensis a brand-new entry on user PATH (true for a first-ever winget portable install, or anyinstall.ps1run). Claude Code reads.mcp.jsononly at session start, so the new server isn't registered in any running session either. Recipe: close Claude app entirely → install ILens → relaunch Claude app → start a new Claude Code session in the relaunched app. Resumed sessions survive a Claude app restart and still hold the old environment, so they won't findilens. Subsequentwinget upgrade Tadis.ILensruns don't change PATH; they only need a fresh Claude Code session.
Step 2: Clients that do not read server instructions
When a client connects, ILens sends it MCP server instructions: what ILens is for, which directories it can read, and which tool answers which question. Claude Code reads them at the start of every session, in the terminal and in the Claude desktop app's Code tab, so with Claude Code, Step 1 is the whole setup.
Claude Desktop's chat does not read server instructions. For it, and for any other client that does not, add this paragraph to the client's instructions and replace <allow-root> with the directory configured above. It names no tool, so it stays correct when a release renames or merges tools:
If your project's CLAUDE.md or a client's instructions hold the block an earlier ILens README asked you to paste, delete it: it names tools that no longer exist. A client that does not read server instructions takes the paragraph above in its place.
Full reference
A self-contained HTML user guide covers what this README does not:
- Per-tool reference — every tool, every parameter (with
required/optionalflags and types), return shape, and full list of error conditions - Alternative integration paths —
claude mcp addCLI command, Claude Desktop config - Security model — what's enforced (
--allow-rootmandatory, no traversal, no network, 200 MB memory budget, read-only), and what's not - Troubleshooting — error string → likely cause mapping
Read it online at https://tadis174.github.io/ILens/guide.html, or open the bundled guide.html from the release ZIP.
Building from source
If you'd rather build the binary yourself:
The publish target produces Build/dist/ILens.exe along with LICENSE, README.md, guide.html, and third-party-licenses/. The working tree must be clean before publishing, and Build/doc/guide.html must exist (run the project's /doc skill to regenerate it).
License
ILens is released under the MIT License. Third-party dependencies are documented in third-party-licenses/INDEX.md, included in each release alongside the per-source license texts.
Source: README.md at commit 3267535
Tools
0Version history
1- v11LatestNov 1, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts