Skip to content
Back to search

DecompilerServer

A powerful MCP (Model Context Protocol) server for decompiling and analyzing .NET assemblies, with specialized support for Unity's Assembly-CSharp.dll files. DecompilerServer provides comprehensive decompilation, search, and code analysis capabilities through a rich set of tools and APIs.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pardeike--decompilerserver/badge.svg)](/listings/pardeike--decompilerserver)

HTML

<a href="/listings/pardeike--decompilerserver"><img src="/api/listings/pardeike--decompilerserver/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

This section helps you install DecompilerServer and connect it to your MCP client in a few steps.

What You Need

**[.NET 10 runtime](https://dotnet.microsoft.com/download/dotnet/10.0)** — the prebuilt release binaries depend on it. Download and install the runtime for your platform before continuing.

Step 1 — Download

Go to the [latest release](https://github.com/pardeike/DecompilerServer/releases/latest) and download the archive for your platform:

| Platform | File | |---|---| | Windows (x64) | `decompilerserver-v…-win-x64.zip` | | macOS (Apple Silicon) | `decompilerserver-v…-osx-arm64.tar.gz` | | macOS (Intel) | `decompilerserver-v…-osx-x64.tar.gz` | | Linux (x64) | `decompilerserver-v…-linux-x64.tar.gz` | | Linux (ARM64) | `decompilerserver-v…-linux-arm64.tar.gz` |

Extract the archive to a folder you can remember (for example `~/tools/decompiler-server`).

<details> <summary>Extract commands</summary>

**Windows** (PowerShell):

Expand-Archive decompilerserver-v*-win-x64.zip -DestinationPath "$HOME\tools\decompiler-server"

**macOS / Linux**:

mkdir -p ~/tools/decompiler-server
tar -xzf decompilerserver-v*-*.tar.gz -C ~/tools/decompiler-server --strip-components=1

</details>

Step 2 — Configure Your MCP Client

Add DecompilerServer to your MCP client configuration. Replace the path below with the actual location where you extracted the files.

<details> <summary><strong>Claude Desktop</strong></summary>

Edit the Claude Desktop config file: - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

{
  "mcpServers": {
    "decompiler": {
      "command": "/absolute/path/to/DecompilerServer"
    }
  }
}

On Windows, use the `.exe` extension and escaped backslashes:

{
  "mcpServers": {
    "decompiler": {
      "command": "C:\\tools\\decompiler-server\\DecompilerServer.exe"
    }
  }
}

Restart Claude Desktop after saving.

</details>

<details> <summary><strong>Cursor</strong></summary>

Open Cursor Settings → MCP and add a new server, or edit `.cursor/mcp.json` in your project root:

{
  "mcpServers": {
    "decompiler": {
      "command": "/absolute/path/to/DecompilerServer"
    }
  }
}

On Windows, use the `.exe` extension and escaped backslashes.

</details>

<details> <summary><strong>VS Code (GitHub Copilot)</strong></summary>

Add an entry to your `.vscode/mcp.json` (or workspace settings):

{
  "servers": {
    "decompiler": {
      "type": "stdio",
      "command": "/absolute/path/to/DecompilerServer"
    }
  }
}

On Windows, use the `.exe` extension and escaped backslashes.

</details>

<details> <summary><strong>Codex</strong></summary>

Add an entry to `~/.codex/config.toml`:

[mcp_servers.decompiler]
command = "/absolute/path/to/DecompilerServer"

If you run a framework-dependent build instead of the native app host, configure Codex like this:

[mcp_servers.decompiler]
command = "dotnet"
args = ["/absolute/path/to/DecompilerServer/bin/Release/net10.0/DecompilerServer.dll"]

On Windows, use the `.exe` extension and escaped backslashes.

</details>

Step 3 — Use It

Once connected, ask your AI assistant to load and explore assemblies. For example:

> "Load the assembly at `/path/to/MyLibrary.dll` and search for types that contain `Controller`."

The assistant will use DecompilerServer tools automatically. It can load assemblies, search types, decompile source, compare versions, and more. See the [Workflow Reference](#workflow-reference) for the full list of operations.

Tool approvals and plan mode

Inspection tools advertise the standard MCP `readOnlyHint` annotation so clients can recognize read-only operations in plan mode and approval policies. Loading, unloading, selecting contexts, changing settings, and explicit cache operations

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 408 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # DecompilerServer
  2. DecompilerServer is an MCP server that decompiles and analyzes .NET assemblies. You connect it to your AI coding tool (Claude Desktop, Cursor, VS Code, Codex, etc.) and it lets the AI read, search, and compare .NET code — even across different versions of an assembly.
  3. This is a particularly strong LLM use case because so much real-world .NET behavior lives in binaries the model cannot inspect on its own: third-party libraries, game assemblies, internal builds, and older releases. By giving the model direct decompiler-backed access to those assemblies, you turn "I only see the source in this repo" into "I can inspect the actual code that runs", which makes reverse engineering, migration work, debugging, and version-to-version analysis much more effective.
  4. Common use cases: general .NET assembly inspection, Unity `Assembly-CSharp.dll` workflows, and multi-version browsing such as RimWorld mod porting.
  5. > **Already familiar with .NET and MCP?** Skip to [Advanced Guide](#advanced-guide) for build-from-source instructions, full tool reference, and development details.
  6. ---
  7. ## Quick Start
  8. This section helps you install DecompilerServer and connect it to your MCP client in a few steps.
  9. ### What You Need
  10. **[.NET 10 runtime](https://dotnet.microsoft.com/download/dotnet/10.0)** — the prebuilt release binaries depend on it. Download and install the runtime for your platform before continuing.
  11. ### Step 1 — Download
  12. Go to the [latest release](https://github.com/pardeike/DecompilerServer/releases/latest) and download the archive for your platform:
  13. | Platform | File |
  14. |---|---|
  15. | Windows (x64) | `decompilerserver-v…-win-x64.zip` |
  16. | macOS (Apple Silicon) | `decompilerserver-v…-osx-arm64.tar.gz` |
  17. | macOS (Intel) | `decompilerserver-v…-osx-x64.tar.gz` |
  18. | Linux (x64) | `decompilerserver-v…-linux-x64.tar.gz` |
  19. | Linux (ARM64) | `decompilerserver-v…-linux-arm64.tar.gz` |
  20. Extract the archive to a folder you can remember (for example `~/tools/decompiler-server`).
  21. <details>
  22. <summary>Extract commands</summary>
  23. **Windows** (PowerShell):
  24. ```powershell
  25. Expand-Archive decompilerserver-v*-win-x64.zip -DestinationPath "$HOME\tools\decompiler-server"
  26. ```
  27. **macOS / Linux**:
  28. ```bash
  29. mkdir -p ~/tools/decompiler-server
  30. tar -xzf decompilerserver-v*-*.tar.gz -C ~/tools/decompiler-server --strip-components=1
  31. ```
  32. </details>
  33. ### Step 2 — Configure Your MCP Client
  34. Add DecompilerServer to your MCP client configuration. Replace the path below with the actual location where you extracted the files.
  35. <details>
  36. <summary><strong>Claude Desktop</strong></summary>
  37. Edit the Claude Desktop config file:
  38. - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
  39. - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
  40. ```json
  41. {
  42. "mcpServers": {
  43. "decompiler": {
  44. "command": "/absolute/path/to/DecompilerServer"
  45. }
  46. }
  47. }
  48. ```
  49. On Windows, use the `.exe` extension and escaped backslashes:
  50. ```json
  51. {
  52. "mcpServers": {
  53. "decompiler": {
  54. "command": "C:\\tools\\decompiler-server\\DecompilerServer.exe"
  55. }
  56. }
  57. }
  58. ```
  59. Restart Claude Desktop after saving.
  60. </details>
  61. <details>
  62. <summary><strong>Cursor</strong></summary>
  63. Open Cursor Settings → MCP and add a new server, or edit `.cursor/mcp.json` in your project root:
  64. ```json
  65. {
  66. "mcpServers": {
  67. "decompiler": {
  68. "command": "/absolute/path/to/DecompilerServer"
  69. }
  70. }
  71. }
  72. ```
  73. On Windows, use the `.exe` extension and escaped backslashes.
  74. </details>
  75. <details>
  76. <summary><strong>VS Code (GitHub Copilot)</strong></summary>
  77. Add an entry to your `.vscode/mcp.json` (or workspace settings):
  78. ```json
  79. {
  80. "servers": {
  81. "decompiler": {
  82. "type": "stdio",
  83. "command": "/absolute/path/to/DecompilerServer"
  84. }
  85. }
  86. }
  87. ```
  88. On Windows, use the `.exe` extension and escaped backslashes.
  89. </details>
  90. <details>
  91. <summary><strong>Codex</strong></summary>
  92. Add an entry to `~/.codex/config.toml`:
  93. ```toml
  94. [mcp_servers.decompiler]
  95. command = "/absolute/path/to/DecompilerServer"
  96. ```
  97. If you run a framework-dependent build instead of the native app host, configure Codex like this:
  98. ```toml
  99. [mcp_servers.decompiler]
  100. command = "dotnet"
  101. args = ["/absolute/path/to/DecompilerServer/bin/Release/net10.0/DecompilerServer.dll"]
  102. ```
  103. On Windows, use the `.exe` extension and escaped backslashes.
  104. </details>
  105. ### Step 3 — Use It
  106. Once connected, ask your AI assistant to load and explore assemblies. For example:
  107. > "Load the assembly at `/path/to/MyLibrary.dll` and search for types that contain `Controller`."
  108. The assistant will use DecompilerServer tools automatically. It can load assemblies, search types, decompile source, compare versions, and more. See the [Workflow Reference](#workflow-reference) for the full list of operations.
  109. ### Tool approvals and plan mode
  110. Inspection tools advertise the standard MCP `readOnlyHint` annotation so clients
  111. can recognize read-only operations in plan mode and approval policies. Loading,
  112. unloading, selecting contexts, changing settings, and explicit cache operations
  113. remain state-changing tools. Update the server and reconnect or restart your MCP
  114. client to refresh its tool catalog. Claude Code, Codex, and other clients decide
  115. how to use these hints; annotations do not override their permission settings.
  116. ### Troubleshooting
  117. | Problem | Solution |
  118. |---|---|
  119. | **"command not found"** or the server does not start | Verify the path in your MCP config points to the correct executable. On macOS/Linux, ensure the file is executable: `chmod +x DecompilerServer`. |
  120. | **"You must install .NET to run this application"** | Install the [.NET 10 runtime](https://dotnet.microsoft.com/download/dotnet/10.0). The prebuilt binaries do not include the runtime. |
  121. | **macOS blocks the binary** ("unidentified developer") | Open System Settings → Privacy & Security and allow the application, or run: `xattr -d com.apple.quarantine DecompilerServer`. |
  122. | **Server starts but the AI does not use it** | Check that the MCP client has the server enabled. In Claude Desktop, restart the app. In Cursor, check the MCP panel. In VS Code, reload the window. |
  123. | **Assembly fails to load** | Confirm the `.dll` path is correct and that the assembly is a managed .NET assembly (not a native library). |
  124. ---
  125. ## Advanced Guide
  126. This section covers building from source, the full set of MCP launch options, the complete tool workflow, and contributor information.
  127. ### Highlights
  128. - Load assemblies directly with `assemblyPath` or use Unity-friendly `gameDir` loading.
  129. - Keep multiple assemblies loaded at once under aliases such as `rw14`, `rw15`, and `rw16`.
  130. - Use `memberId` follow-up tools without repeatedly resupplying the alias; routing uses the member ID's MVID.
  131. - Compare aliases structurally with `compare_contexts`, then drill into types or members with `compare_symbols`.
  132. - Diff individual method bodies with `compare_symbols(..., compareMode: "body")`.
  133. - Decompiled non-type member source is returned as a member-scoped snippet rather than a whole containing type.
  134. ### Requirements
  135. - .NET 10 runtime for release assets or built output
  136. - .NET 10 SDK if you want to build from source
  137. ### Build from Source
  138. ```bash
  139. git clone https://github.com/pardeike/DecompilerServer.git
  140. cd DecompilerServer
  141. dotnet build DecompilerServer.sln -c Release
  142. dotnet run --project DecompilerServer.csproj -c Release
  143. ```
  144. ### MCP Client Launch Options
  145. Tool responses are compact by default to reduce AI context use. Complete source
  146. is returned in `data.code`; source slices keep their actual line ranges, IL is
  147. returned as structured instructions, and errors contain one diagnostic object.
  148. Source provenance, paging, modifier flags, and recovery hints remain available.
  149. For clients that require the previous response fields, configure the MCP server
  150. environment with `DECOMPILER_RESPONSE_MODE=extended` and restart the server.
  151. This is a user setting; tools do not accept a response-mode argument.
  152. For Codex, add the setting to the existing server entry:
  153. ```toml
  154. [mcp_servers.decompiler.env]
  155. DECOMPILER_RESPONSE_MODE = "extended"
  156. ```
  157. For JSON-based MCP clients, add `"env": { "DECOMPILER_RESPONSE_MODE": "extended" }`
  158. to the server configuration. Remove the setting or use `compact` for the default.
  159. See [ARCHITECTURE.md](ARCHITECTURE.md#responseformatter) for the field contracts.
  160. **Framework-dependent build output** (requires `dotnet` on PATH):
  161. ```text
  162. command: dotnet
  163. args:
  164. - /absolute/path/to/DecompilerServer/bin/Release/net10.0/DecompilerServer.dll
  165. ```
  166. **Native app host from `dotnet build`:**
  167. - macOS/Linux: `/absolute/path/to/DecompilerServer/bin/Release/net10.0/DecompilerServer`
  168. - Windows: `C:\\absolute\\path\\to\\DecompilerServer\\bin\\Release\\net10.0\\DecompilerServer.exe`
  169. **Native app host from `dotnet publish`:**
  170. - macOS/Linux: `/absolute/path/to/DecompilerServer/bin/Release/net10.0/publish/DecompilerServer`
  171. - Windows: `C:\\absolute\\path\\to\\DecompilerServer\\bin\\Release\\net10.0\\publish\\DecompilerServer.exe`
  172. Release assets are packaged as framework-dependent single-file executables and still require the .NET 10 runtime.
  173. ### Trusted Local Codex Install
  174. If Codex for Mac warns about the downloaded MCP executable, install the server from source instead of running a quarantined release artifact:
  175. ```bash
  176. ./scripts/install-codex-mcp.sh
  177. ```
  178. The installer publishes an `osx-arm64` Release build to `~/.codex/mcp-servers/decompiler/DecompilerServer`, removes quarantine metadata, signs the executable with the best local code-signing identity available, updates Codex's global `decompiler` MCP entry to launch that installed copy, installs the bundled `decompiler-mcp` skill into `~/.codex/skills/decompiler-mcp`, and maintains a managed DecompilerServer pointer block in `~/.codex/AGENTS.md`.
  179. For local Codex stdio use, this avoids Safari/Gatekeeper quarantine state on downloaded binaries. For distributable Gatekeeper acceptance, sign with a `Developer ID Application` identity and notarize the archive before installation.
  180. ### Workflow Reference
  181. **Load one or more assemblies:**
  182. ```text
  183. load_assembly({
  184. "assemblyPath": "/path/to/rw14/Assembly-CSharp.dll",
  185. "contextAlias": "rw14"
  186. })
  187. load_assembly({
  188. "gameDir": "/path/to/rw16",
  189. "assemblyFile": "Assembly-CSharp.dll",
  190. "contextAlias": "rw16"
  191. })
  192. ```
  193. **Inspect loaded and registered aliases:**
  194. ```text
  195. status({})
  196. list_contexts({ "includeRegistered": true, "limit": 50 })
  197. get_server_stats({ "contextAlias": "rw16" })
  198. ```
  199. Registered aliases are restored lazily when the server starts. `list_contexts` returns resident contexts and a registered-alias count; request `includeRegistered: true` with `limit`, `cursor`, and optional `filter` to page `registeredAliases`; selecting or explicitly addressing a registered alias loads it on demand. This keeps a large workspace history from consuming memory and file descriptors in every MCP client process.
  200. At most four contexts are resident by default. When another context is needed, the least recently used context that is not serving a tool call is disposed while its lightweight registration remains available for transparent reload. Set `DECOMPILER_MAX_LOADED_CONTEXTS` to a positive integer in the MCP server environment to choose a different hard limit. A request returns `context_capacity_busy` rather than exceeding the limit when every resident context is actively in use.
  201. **Search and decompile:**
  202. ```text
  203. search_symbols({
  204. "query": "Pawn.Kill",
  205. "limit": 10,
  206. "contextAlias": "rw16"
  207. })
  208. search_types({
  209. "query": "Pawn",
  210. "limit": 10,
  211. "contextAlias": "rw16"
  212. })
  213. list_members({
  214. "typeId": "<type-member-id-from-search>",
  215. "mode": "signatures"
  216. })
  217. get_decompiled_source({
  218. "memberId": "<member-id-from-search>"
  219. })
  220. ```
  221. Once you have a `memberId`, follow-up tools normally route to the correct loaded assembly automatically.
  222. For foreign-code exploration, prefer this path before falling back to shell tools:
  223. 1. Load the assembly with `load_assembly`, or activate a registered alias by passing `contextAlias`, then verify the active alias with `status`.
  224. 2. Start broad with `search_symbols` when you have a fragment; use `resolve_member_id` first when you have a fully-qualified or XML-doc-like guess such as `Namespace.Type.Member` or `M:Namespace.Type.Member`.
  225. 3. Use `list_members` on the resolved type (`get_members_of_type` is its compatibility alias) before guessing method IDs.
  226. 4. Fetch code with `get_decompiled_source`, `get_source_slice`, or `plan_chunking`.
  227. 5. Move outward with `find_callers`, `find_usages`, `find_callees`, `get_il`, or compare tools. `find_callees` returns callee-focused `targetMemberId`, `symbol`, `opcode`, `offset`, and `resolution` fields; calls into another loaded assembly link to its exact member ID; other external calls retain referenced assembly identity.
  228. 6. Use `get_server_stats` when you need cache/index/performance diagnostics for one alias; `status` is the cheaper current-alias overview.
  229. Member lists and searches hide generated members, backing fields, and accessors by
  230. default. Use `includeCompilerGenerated: true` when inspecting that metadata.
  231. Signatures retain generic arguments and `ref`/`out`/`in` modifiers, and identify
  232. the declaring type.
  233. Symbol lookup preserves supplied method parameters. Ambiguous names return candidates;
  234. use a canonical ID or a signature such as `M:Namespace.Type.Method(System.String)`.
  235. Source and IL requests must use the defining assembly context. Dependency failures
  236. provide loading hints; unknown canonical MVIDs never fall back to an unrelated assembly.
  237. Type metadata outlines return child member IDs and support `limit`/`cursor` paging.
  238. Structural comparison includes qualified types, modifiers, property/event accessors,
  239. generic constraints, and parameter defaults.
  240. `find_callers` and `find_usages` default to `scope: "assembly"`. Use
  241. `scope: "workspace"` to trace references across currently loaded contexts.
  242. Responses state the scope and searched contexts; deferred registrations are not
  243. loaded automatically. Different assembly versions remain distinct.
  244. `batch_get_decompiled_source` returns at most `maxLinesPerMember` lines per member
  245. (default 50). Check each entry's `hasMore` and continue with `get_source_slice`
  246. starting at `nextStartLine`. Outer `truncated` indicates partial content or budget
  247. exhaustion; `budgetTruncated` identifies the latter. Raise `maxLinesPerMember`
  248. when full members fit the requested character budget.
  249. If a guessed member does not exist, member-based tools return structured error hints with likely candidates and concrete next tool calls. `search_symbols` also degrades gracefully for `Type.MissingMember`: if the type resolves but the member does not, it returns the type, its direct members, and a diagnostic instead of an empty success.
  250. **Compare aliases:**
  251. ```text
  252. compare_contexts({
  253. "leftContextAlias": "rw14",
  254. "rightContextAlias": "rw16",
  255. "namespaceFilter": "Verse",
  256. "deep": true
  257. })
  258. compare_symbols({
  259. "leftContextAlias": "rw14",
  260. "rightContextAlias": "rw16",
  261. "symbol": "Verse.Root_Play",
  262. "symbolKind": "type"
  263. })
  264. compare_symbols({
  265. "leftContextAlias": "rw14",
  266. "rightContextAlias": "rw16",
  267. "symbol": "Verse.Pawn:Kill",
  268. "symbolKind": "method",
  269. "compareMode": "body"
  270. })
  271. ```
  272. ### Development
  273. ```bash
  274. ./scripts/verify.py
  275. ```
  276. The verification command runs formatting, Release tests, and a diff check. It prints `ok` only when all steps pass; full output is saved under ignored `artifacts/logs/`. On failure it reports the failed step, diagnostics, and log path.
  277. ### Agent Skill
  278. The repo includes a portable skill at [skills/decompiler-mcp/SKILL.md](skills/decompiler-mcp/SKILL.md). For Codex, `./scripts/install-codex-mcp.sh` installs that skill and keeps the global `AGENTS.md` pointer up to date. For Claude or another skill-aware assistant, copy the skill folder manually to bias agents toward the intended DecompilerServer workflow and away from premature shell fallbacks.
  279. ### Releasing
  280. The GitHub `Release` workflow is triggered by pushing a tag that starts with `v` and matches the project version in `DecompilerServer.csproj`.
  281. To publish reviewed release text, add `.github/release-notes/<tag>.md` with the release title as a first-line Markdown heading, a blank line, and the release body. The workflow uses that title and body verbatim; tags without a notes file use GitHub-generated notes.
  282. For example, if the project version is `1.3.7`:
  283. ```bash
  284. git tag -a v1.3.7 -m "Release v1.3.7"
  285. git push origin v1.3.7
  286. ```
  287. ### Documentation
  288. - [README.md](README.md): user-facing overview and quick start
  289. - [ARCHITECTURE.md](ARCHITECTURE.md): durable technical reference (implementation details, routing, compare semantics, testing)
  290. - [TODO.md](TODO.md): backlog and future work
  291. If you are changing implementation details, tool-routing behavior, compare semantics, or test patterns, update [ARCHITECTURE.md](ARCHITECTURE.md) rather than creating a new standalone guide.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.