Practical overview
When it fits
Use Unidbg when a native-code investigation calls for Android library or JNI emulation, or when experimenting with iOS binary emulation. Its MCP integration is relevant when you want an AI tool to assist with an active debugging session.
Who it is for
- Developers examining Android native libraries and JNI behavior.
- Researchers and learners studying ELF or Mach-O formats and ARM assembly.
- Developers exploring experimental iOS binary emulation and runtime behavior.
- Teams using MCP-connected AI tools to assist with native-code debugging.
Documented uses
- Emulate Android native code and invoke JNI_OnLoad.
- Inspect symbols, registers, memory, call stacks and disassembled instructions.
- Set breakpoints, step through execution and trace instructions or memory access.
- Use MCP to make debugger information and operations available to a connected AI tool.
- Register repeatable custom tools for invoking target functions with different parameters.
Requirements & limits
The repository is public and specifies the Apache-2.0 license.
- The repository describes iOS emulation as experimental.
- The project is framed as educational and advises users to use it at their own risk.
- MCP debugging requires an active debugger and a connected AI tool; breakpoint mode starts the MCP server when execution pauses at a breakpoint.
- The project documents multiple backends, including Unicorn, Dynarmic, Apple M1 hypervisor and Linux KVM support.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Start an MCP server at an unidbg breakpoint
Pause emulation at a breakpoint and expose unidbg debugging tools through MCP.
Before you start
- An unidbg emulator and emulation logic.
- A debugger attached to the emulator and a breakpoint address.
- An AI tool that can connect to the MCP server; Cursor is given as an example.
Steps
Attach the debugger with
emulator.attach()and add a breakpoint withdebugger.addBreakPoint(address).Run the emulation logic and wait for the breakpoint to pause the emulator.
Type
mcpin the console to start the MCP server; optionally usemcp 9239to specify the port.Configure the AI tool to connect to
http://localhost:9239/ssewhen using port 9239.
Expected outcome
The AI tool can use unidbg debugging tools while the emulator is paused, including register, memory, disassembly, stepping, and tracing tools.
Guide limitations
- In breakpoint mode, the process exits and MCP shuts down when execution completes without hitting a breakpoint.
- After execution resumes, another breakpoint can pause the debugger again.
Register a repeatable custom MCP tool
Expose a custom target-function operation so an AI tool can rerun it with different parameters.
Before you start
- An unidbg emulator and a loaded native library.
- A custom
McpToolimplementation and an attached debugger. - An AI tool configured to connect to the MCP server.
Steps
Create an
McpToolkitand register anMcpToolwith a name, description, parameter names, and anexecuteimplementation that calls the target function.Start the toolkit with
toolkit.run(emulator.attach()).When the debugger breaks, type
mcpin the console, ormcp 9239to specify a port.Configure the AI tool to connect to
http://localhost:9239/ssewhen using port 9239.
Expected outcome
The native library is loaded once, and the process and MCP server remain active for subsequent executions through the custom tool.
Guide limitations
- The example's target-function call is a placeholder; the repository does not provide the implementation for a specific library or function.
- The documented custom-tool mode keeps the process alive for subsequent runs, unlike breakpoint mode, which exits when execution completes without another breakpoint.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 9 October 2026
- Original website title
- zhkl0228/unidbg · Official homepage title · retained in its source language

