# Rbinilspy

> MCP Server for ilspy-based .NET analysis

- **Type:** MCP server
- **Install:** `agentstack add mcp-kirkderp-rbinilspy`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [kirkderp](https://agentstack.voostack.com/s/kirkderp)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [kirkderp](https://github.com/kirkderp)
- **Source:** https://github.com/kirkderp/rbinilspy

## Install

```sh
agentstack add mcp-kirkderp-rbinilspy
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# rbinilspy

[](LICENSE)
[](rust-toolchain.toml)
[](https://dotnet.microsoft.com)

MCP server for ILSpy-based .NET assembly analysis.

`rbinilspy` manages persistent ILSpy sessions with an in-memory C# worker process,
loads .NET assemblies for analysis, and exposes 17 tools as named
[Model Context Protocol](https://modelcontextprotocol.io) tools over stdio.

## Tools

**Session Management**
- `dn_open` / `dn_close` / `dn_sessions`  --  open/close/list persistent ILSpy sessions
- `dn_metadata`  --  assembly metadata: types count, namespaces count

**Discovery & Navigation**
- `dn_namespaces`  --  list namespaces with type counts, filter, and pagination
- `dn_types`  --  list types with name/namespace filter and pagination
- `dn_search`  --  search types or cached member names by substring
- `dn_type_info`  --  type metadata: base types, interfaces, attributes, modifiers

**Decompilation**
- `dn_decompile`  --  full type decompilation to C# (with result caching)
- `dn_decompile_method`  --  decompile a single method (token-efficient, no full type dump)
- `dn_members`  --  list methods/properties/fields (with result caching)
- `dn_il`  --  raw CIL disassembly
- `dn_search_source`  --  grep decompiled C# source for a pattern

**Assembly Analysis**
- `dn_references`  --  external assembly dependencies
- `dn_usages`  --  find usages of a pattern across decompiled types
- `dn_resources`  --  list embedded resources
- `dn_raw_cmd`  --  passthrough for arbitrary ilspycmd invocations

## Requirements

- **.NET 10 SDK** (for worker build)
- **ILSpy CLI** -- `dotnet tool install -g ilspycmd`
- **Rust stable** toolchain (for building the MCP server)

## Quick Start

```bash
# Build the C# worker
cd ilspy-worker && dotnet publish -c Release -o bin/publish

# Build and run the MCP server
cd .. && cargo build --workspace
RBM_CACHE_DIR=./cache cargo run -p rbm-server
```

The server speaks the MCP protocol over stdio. Configure your MCP client:

```json
{
  "mcpServers": {
    "rbinilspy": {
      "command": "/path/to/rbinilspy/target/debug/rbinilspy",
      "args": []
    }
  }
}
```

## Configuration

| Variable | Default | Description |
| --- | --- | --- |
| `RBM_CACHE_DIR` | `./rbinilspy-cache` | Cache root |
| `RBM_TOOL_TIMEOUT_SECS` | 30 | Per-tool timeout (seconds) |
| `RBM_ILSPY_WORKER` | auto‑detected | Path to the C# worker (binary or project dir) |
| `RBM_ILSPY_CMD` | `ilspycmd` | Path to the ILSpy CLI executable |
| `RBM_ILSPY_CMD_TIMEOUT_MS` | 60000 | ilspycmd subprocess timeout (milliseconds) |

## Architecture

```
MCP Client
  -> stdio JSON-RPC
  -> rbinilspy server (Rust)
  -> C# worker process (stdin/stdout JSON-RPC)
  -> ilspycmd subprocess (per-decompilation)
```

Assemblies are opened once and cached in the C# worker's memory. Decompiled
output and member listings are cached per type for the session lifetime.

## Project Structure

```
crates/
  rbm-core/      Cache paths, config, error types
  rbm-server/    MCP server binary (rbinilspy)
ilspy-worker/    C# persistent worker for ilspycmd
```

## License

MIT  --  see [LICENSE](LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [kirkderp](https://github.com/kirkderp)
- **Source:** [kirkderp/rbinilspy](https://github.com/kirkderp/rbinilspy)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** yes
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-kirkderp-rbinilspy
- Seller: https://agentstack.voostack.com/s/kirkderp
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
