IL2CPP Frida MCP Server

February 24, 2026 ยท View on GitHub

A Model Context Protocol (MCP) based IL2CPP reverse engineering tool that enables AI assistants (like Claude, Kiro) to directly analyze and manipulate Unity IL2CPP applications.

Features

  • ๐Ÿ”Œ Frida Integration - Support for USB, remote, and local device connections
  • ๐Ÿ“ฆ IL2CPP Analysis - List images, classes, methods with fuzzy search support
  • ๐Ÿ” Disassembly - Method disassembly based on Frida Instruction API
  • ๐Ÿง  GC Heap Analysis - Find runtime object instances
  • ๐Ÿ“ค Import/Export - Find module import and export functions
  • ๐Ÿ› ๏ธ JS Execution - Execute arbitrary JavaScript code to manipulate Frida API

Project Structure

.
โ”œโ”€โ”€ mcp_server.py           # Entry point
โ”œโ”€โ”€ mcp_server/             # MCP Server module
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ server.py           # MCP Server core
โ”‚   โ”œโ”€โ”€ state.py            # Frida state management
โ”‚   โ”œโ”€โ”€ tools.py            # MCP tool definitions
โ”‚   โ”œโ”€โ”€ transport.py        # Transport layer (stdio/sse/http)
โ”‚   โ”œโ”€โ”€ cli.py              # Command line interface
โ”‚   โ”œโ”€โ”€ agent_loader.py     # Agent loader
โ”‚   โ””โ”€โ”€ handlers/           # Tool handlers
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ frida_handlers.py
โ”‚       โ””โ”€โ”€ il2cpp_handlers.py
โ”œโ”€โ”€ agent/                  # Frida Agent (TypeScript)
โ”‚   โ”œโ”€โ”€ index.ts            # Agent entry point
โ”‚   โ”œโ”€โ”€ core/               # Core modules
โ”‚   โ”‚   โ”œโ”€โ”€ il2cpp-helper.ts
โ”‚   โ”‚   โ”œโ”€โ”€ method-utils.ts
โ”‚   โ”‚   โ””โ”€โ”€ class-finder.ts
โ”‚   โ””โ”€โ”€ services/           # Service modules
โ”‚       โ”œโ”€โ”€ image-service.ts
โ”‚       โ”œโ”€โ”€ class-service.ts
โ”‚       โ”œโ”€โ”€ method-service.ts
โ”‚       โ”œโ”€โ”€ disasm-service.ts
โ”‚       โ”œโ”€โ”€ module-service.ts
โ”‚       โ”œโ”€โ”€ gc-service.ts
โ”‚       โ””โ”€โ”€ exec-service.ts
โ”œโ”€โ”€ _agent.js               # Compiled Agent
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ requirements.txt

Installation

# Install from source
pip install .

# Or install in development mode
pip install -e .

Option 2: Manual dependency installation

pip install -r requirements.txt

Compile Frida Agent

npm install
npm run build

Usage

Start MCP Server

# If installed via pip
il2cpp-frida-mcp                        # Interactive selection
il2cpp-frida-mcp --stdio                # stdio mode
il2cpp-frida-mcp --sse                  # SSE mode
il2cpp-frida-mcp --http                 # HTTP mode

# Or run script directly
python mcp_server.py --stdio

# Custom host and port
il2cpp-frida-mcp --sse --host 0.0.0.0 --port 9000

Configure MCP Client

Claude Desktop / Kiro

Add to your MCP configuration file:

{
  "mcpServers": {
    "il2cpp-frida": {
      "command": "il2cpp-frida-mcp",
      "args": ["--stdio"]
    }
  }
}

Or run using Python module:

{
  "mcpServers": {
    "il2cpp-frida": {
      "command": "python",
      "args": ["-m", "mcp_server", "--stdio"]
    }
  }
}

MCP Tools

Frida Basic Tools

ToolDescription
frida_list_devicesList all available Frida devices
frida_connectConnect to device and target process
frida_disconnectDisconnect Frida connection
frida_resumeResume suspended process
frida_list_processesList processes on device

IL2CPP Analysis Tools

ToolDescription
il2cpp_list_imagesList all IL2CPP images
il2cpp_list_classesList all classes in specified image
il2cpp_list_methodsList all methods in specified class
il2cpp_show_methodShow method details
il2cpp_find_classesFind classes (fuzzy match supported)
il2cpp_find_methodsFind methods (fuzzy match supported)
il2cpp_show_asmDisassemble method
il2cpp_find_exportFind export functions
il2cpp_find_importFind import functions
il2cpp_exec_jsExecute arbitrary JavaScript code
il2cpp_gc_chooseFind instances of specified class in heap
il2cpp_gc_infoGet GC heap information

Examples

1. Connect to Device

Use frida_connect to connect to the frontmost app on USB device

2. Analyze IL2CPP

List all images, then find classes containing "Player"

3. View Method Details

List all methods of PlayerController class, then view Update method details

Development

Compile Agent

npm run build     # Single build
npm run watch     # Watch mode

Dependencies

  • Python 3.10+
  • Node.js 16+
  • Frida 17+
  • frida-il2cpp-bridge

Acknowledgements

License

MIT