renef-mcp
Dynamic instrumentation toolkit for Android applications on ARM64 devices, providing native hooking, memory manipulation, and runtime patching for security analysis.
Targets ARM64 architecture for dynamic instrumentation, including native function hooking and memory operations on Android devices.
Framework detection and analysis for Flutter applications, enabling security assessment of Flutter-based Android apps.
Framework detection and analysis for React Native applications, supporting security testing of React Native Android apps.
Framework detection and analysis for Unity applications, facilitating security evaluation of Unity-based Android apps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@renef-mcp hook native function JNI_OnLoad in libnative-lib.so"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Renef MCP Server (v0.4.0)

MCP server for Renef v0.4.0 — Dynamic instrumentation toolkit for Android ARM64 reverse engineering and security analysis.
Powered by Renef v0.4.0's pure-Python framed TCP client (talks directly to renef_server over 127.0.0.1:1907 — no CLI subprocess, no prompt scraping, works on macOS, Linux, and Windows). Compatible with both mcp SDK v1.x (FastMCP) and v2.x (MCPServer).
Features
Core & Framed Protocol:
renef_spawn(signal-based or--pause/--holdspawn gate),renef_attach(PID or package name),renef_resume,renef_exec(arbitrary multiline Lua),renef_rpc(JSON expression evaluation),renef_events(dedicated v0.4.0@eventschannel for hook output &send()JSON events),renef_verbose,renef_resetHooking & Native Calling: Inline trampoline & PLT/GOT (
caller=) native hooks, deferred hooks, async hooks,Interceptor.replace/revert,NativeFunction(int/ptr/bool/string/float/double), Android 12+ safe Java/ART hooks (args.skip,onLeaveString/primitive override, individualunhook j0),hookgenMemory & Passive Memdump: Safe maps-checked
renef_mem_read(hex/hexdump/string/u8..u64/pointer),renef_mem_write(auto-patch),renef_mem_search(strings & hex wildcards),renef_mem_manage(alloc/allocStr/free/protect),renef_mem_dump, and injection-free / ptrace-freerenef_memdump_passive(/proc/<pid>/maps&/proc/<pid>/mem)Modules, Disassembly & Process:
renef_module_list,renef_module_find,renef_module_exports(glob wildcards viaModule.findExportByName+.symtab),renef_module_sections, Capstone ARM64renef_disassemble,renef_detect_framework,renef_process(ranges,threads,thread_id, PAC-awarebacktrace)Java & JNI:
renef_java_classes(Java.enumerateLoadedClasses),renef_java_call(Java.usestatic/constructor/instance calls),renef_java_method_info(Java.methodInfo),renef_jni(Jni.*raw helpers)System Instrumentation:
renef_syscall(Syscall.trace/category/traceAll/untrace/stop/list/active),renef_file(read/write/exists/readlink/fdpath),renef_os(getpid/listdir/kill/tgkill),renef_kcov(Linux KCOV kernel coverage)Server & ADB Management:
renef_server(deploys v0.4.0renef_server+/data/local/tmp/libagent.sowith SELinuxchcon, start/kill/restart/status/logs),renef_port_forward(including gadget mode),adb_devices,adb_device_status,adb_appRecipes, API Reference & SSL Pinning Knowledge Base:
renef_recipes+ MCP resources (renef://api-reference,renef://recipes,renef://recipes/{name},techniques://ssl_pinning/{platform}) +renef_lua_guideprompt
Related MCP server: Reversecore_MCP
Screenshots
Installation
pip install renef-mcpConfiguration
Add to your MCP client configuration:
{
"mcpServers": {
"renef": {
"command": "renef-mcp"
}
}
}Optional environment variables:
RENEF_HOST—renef_serverTCP host (default:127.0.0.1)RENEF_PORT—renef_serverTCP port (default:1907)RENEF_DEVICE_ID— target ADB device serial when multiple devices are connected
Development & Tests
pip install -e ".[dev]"
pytest -vDocumentation
Homepage: https://renef.io
Renef tool: https://github.com/Byterialab/renef
Repository: https://github.com/Ahmeth4n/renef-mcp
License
MIT License - Copyright (c) 2025-2026 Byteria
Available Tools
47 toolsadb_appA
Inspect, list, start, or force-stop Android apps via ADB.
Actions:
current: Get currently focused app (package, activity, PID, UID)list: List installed packages viapm list packages(optional substringfilter)start: Launch an app viaam start(optionalactivity)start_monkey: Launch an app viamonkey -p <package_name> -c LAUNCHER 1stop: Force-stop an app viaam force-stop <package_name>
Args:
action: "current", "list", "start", "start_monkey", or "stop"
package_name: Android package name (required for "start", "start_monkey", "stop")
activity: Optional activity name for action="start"
filter: Optional case-insensitive substring filter for action="list"
Returns: JSON result with app information or command output
Inputs: action (required), filter, activity, package_name. Returns: result
adb_devicesB
List connected Android devices (adb devices -l).
Returns: Connected ADB devices output
Inputs: no named parameters. Returns: result
adb_device_statusA
Check Android device root & SELinux status, and optionally toggle SELinux mode.
Args: selinux_action: Optional - "disable" (Permissive / setenforce 0) or "enable" (Enforcing / setenforce 1). Leave empty to inspect only.
Returns: JSON report with root status, su/Magisk checks, and SELinux state
Inputs: selinux_action. Returns: result
renef_attachA
Attach to a running Android process by PID or package name and inject libagent.so.
Uses Renef's signal-based injector (no ptrace).
Args: target: Process ID (e.g., "12345") or running package name (e.g., "com.example.app") timeout: Injection timeout in seconds (default: 30.0)
Returns: JSON status with attached PID
Inputs: target (required), timeout. Returns: result
renef_commandA
Send a raw command directly to renef_server over the framed TCP transport.
Works both with an active target session (e.g., hooks, sec libc.so, md 0x... 64)
and for sessionless server commands (e.g., ping, la, memdump <pid> --maps).
Args: command: Raw renef_server command string timeout: Reply timeout in seconds (default: 35.0)
Returns: Raw text response from renef_server
Inputs: command (required), timeout. Returns: result
renef_detect_frameworkA
Detect the Android app's framework by checking loaded native libraries.
Identifies Flutter, React Native, Unity, Xamarin, Cordova/Ionic, NativeScript, or
Android Native, and recommends the matching techniques://ssl_pinning/{platform} URI.
Returns: JSON object with detected frameworks, matched libraries + hex base addresses, and resource hints
Inputs: no named parameters. Returns: result
renef_disassembleA
Disassemble ARM64 instructions at a target address using Module.disassemble (Capstone).
Validates that the entire address range is mapped and readable before disassembling, so bad addresses return a clean error instead of crashing the target app.
Args: address: Starting virtual address (e.g., "0x7f8a12340") count: Number of ARM64 instructions to decode (1..1024, default: 16)
Returns:
JSON object with human-readable listing and structured instructions
(including is_branch, is_call, is_jump)
Inputs: address (required), count. Returns: result
renef_eventsA
Collect hook output, syscall trace lines, and structured send({...}) JSON events.
In Renef v0.4.0, hook callbacks and syscall tracers emit to a dedicated event channel
separate from normal command replies. Call this tool to retrieve buffered events or wait
up to wait_ms milliseconds for new ones.
Args:
wait_ms: Milliseconds to wait for incoming events (0 = immediate drain, max 30000)
include_logcat: Also fetch recent RENEF_LUA lines from Android logcat as fallback
Returns:
JSON object with events (structured send() payloads), output (printed hook/trace
lines), and optionally logcat
Inputs: wait_ms, include_logcat. Returns: result
renef_execA
Execute single-line or multi-line Lua 5.4 code in the target process.
Uses Renef v0.4.0's framed protocol and safe quoting (no 64 KB limit, no temp files,
safe with newlines, quotes, //, and ~). Returns printed output and exact Lua
compile/runtime error messages.
IMPORTANT: Use Renef Lua API (hook, Interceptor, NativeFunction, Memory,
Module, Process, Thread, Java, Jni, Syscall, OS, File, KCov, send),
NOT Frida JS syntax. See renef://api-reference.
Args: lua_code: Lua code to execute in the target process timeout: Silence timeout in seconds (default: 30.0)
Returns:
JSON object with ok, output, error, and any queued event hint
Inputs: lua_code (required), timeout. Returns: result
renef_fileA
Filesystem operations executed inside the target process context (File.* API).
Runs with the target app's UID/SELinux context, so it can read the app's private data
files (/data/data/<pkg>/...) and dump in-memory payloads directly to disk.
Actions:
read: Read file contents ->File.read(path)write: Dump target memory[address, address+size)to a device file (max 100MB) ->File.write(path, addr, size)exists: Check if file exists ->File.exists(path)readlink: Resolve a symlink target ->File.readlink(path)fdpath: Get filesystem path for an open file descriptor (/proc/self/fd/<fd>) ->File.fdpath(fd)
Args: action: "read", "write", "exists", "readlink", or "fdpath" path: File path on device (required for all actions except "fdpath") fd: File descriptor number (required for "fdpath") address: Source memory address in target (required for "write") size: Number of bytes to dump from memory (required for "write", max 100MB)
Returns: JSON object with operation result
Inputs: action (required), fd, path, size, +1 more. Returns: result
renef_hook_generateA
Generate a Renef Lua hook template using the server's hookgen command.
Examples:
renef_hook_generate("libnative.so", "0x1234")— template for offsetrenef_hook_generate("libc.so", "malloc")— template for symbol in libraryrenef_hook_generate("malloc")— search symbol across loaded libraries
Args:
lib_name: Library name, or symbol name if offset_or_symbol is omitted
offset_or_symbol: Optional hex offset or symbol name inside lib_name
Returns: Generated Lua hook template
Inputs: lib_name, offset_or_symbol. Returns: result
renef_hook_javaA
Install a Java/ART method hook (Android 12+ safe JNI twin engine; fallback on older Android).
Java hook argument layout in Lua callbacks:
Instance methods:
args[0]= ArtMethod* (internal),args[1]=this,args[2]= arg1, ...Static methods:
args[0]= ArtMethod*,args[1]= arg1, ...skip_original=Truesetsargs.skip = truein onEnter (CRITICAL for bypassing void methods like SSL pinning checks without triggering exceptions).return_valueoverrides the return value in onLeave: e.g."false","true","0","42", or'JNI.string("HOOKED")'.When
signatureis omitted, discovers all declared overloads ofmethod_namevia Java reflection and installs the hook on each overload.Java hooks appear in
renef_hooks_list()as[j0],[j1], ... and can be removed withrenef_unhook("j0")orrenef_unhook("all").
Args:
class_name: Class name (dots or slashes accepted, normalized to "com/example/Main")
method_name: Java method name (e.g., "isRooted", "checkServerTrusted")
signature: Optional JNI signature (e.g., "()Z", "(Ljava/lang/String;)Ljava/lang/String;").
Leave empty to discover and hook all declared overloads via reflection.
on_enter: Optional Lua body for onEnter (args in scope)
on_leave: Optional Lua body for onLeave (retval in scope)
skip_original: If True, sets args.skip = true in onEnter to skip calling the original method
return_value: Optional Lua expression returned from onLeave (e.g., "false", 'JNI.string("ok")')
Returns: JSON status confirming installation
Inputs: class_name (required), method_name (required), on_enter, on_leave, +3 more. Returns: result
renef_hook_nativeA
Install a native ARM64 hook on a library function by hex offset or export symbol name.
Supports all Renef v0.4.0 native hook features:
Inline trampoline hooks (default) or PLT/GOT targeted hooks (
caller="libfoo.so"or"*")Custom Lua
on_enter(args[0..7]= x0-x7) andon_leave(retval= x0; return value overrides x0)Default argument/return logging when both
on_enterandon_leaveare omittedFire-and-forget async hooks (
asynchronous=True) for high-frequency observation-only hooksDeferred hooks: if
lib_nameis not loaded yet (e.g., underrenef_spawn(..., pause=True)), the hook is automatically installed the instant the library loads!
Args:
lib_name: Library name (e.g., "libc.so", "libnative.so")
target: Hex offset (e.g., "0x1234") or export symbol name (e.g., "open", "SSL_read")
on_enter: Optional Lua body for onEnter (args table in scope; e.g., 'print(Memory.readStr(args[0]))')
on_leave: Optional Lua body for onLeave (retval in scope; e.g., 'return 0')
caller: Optional caller library for PLT/GOT hooking (e.g., "libapp.so" or "*")
asynchronous: If True, runs onEnter off the hot path (observation-only, no onLeave)
Returns: JSON status with hook ID (or deferred flag) and details
Inputs: target (required), lib_name (required), caller, on_enter, +2 more. Returns: result
renef_hooks_listB
List all active native and Java hooks with their IDs (0, j0, ...) and hit counts.
Returns: Formatted list of active native and Java hooks from the agent
Inputs: no named parameters. Returns: result
renef_interceptorA
Replace or revert a native function using Renef v0.4.0's Interceptor API.
action="replace": Replaces(lib_name, target)so the original never runs (unless invoked viaNativeFunctioninside the replacement callback).replacementcan be an integer constant (e.g.,"0","1","-1"), boolean ("true"/"false"), or a Lua function string ("function(args) return 0 end").action="revert": Restores original bytes / GOT entry and removes the hook/replacement.
Args:
action: "replace" or "revert"
lib_name: Library name (e.g., "libnative.so", "libc.so")
target: Hex offset (e.g., "0x1234") or export symbol name (e.g., "ptrace")
replacement: (for "replace") Integer/bool constant or Lua function function(args) ... end
caller: Optional caller library name for PLT/GOT replacement (e.g., "libapp.so")
Returns: JSON status
Inputs: action (required), target (required), lib_name (required), caller, +1 more. Returns: result
renef_java_callA
Call a Java static method, construct an instance, or call/release a boxed JavaObject.
Uses Renef v0.4.0's Java.use(class):call(...) / :new(...) and instance handles.
Examples:
Static call:
class_name="java/lang/System",method_name="currentTimeMillis",signature="()J"Constructor:
class_name="java/io/File",constructor=True,signature="(Ljava/lang/String;)V",args=["/data/local/tmp"]Instance call:
instance_handle=1,method_name="exists",signature="()Z"Release handle:
instance_handle=1,release=True
Args:
class_name: Java class name (dots or slashes accepted; required unless instance_handle > 0)
method_name: Method name (required unless constructor=True or release=True)
signature: JNI method/constructor signature (e.g., "()Ljava/lang/String;", "(Ljava/lang/String;)V")
args: Optional argument list (strings, ints, bools, floats, or None)
constructor: If True, constructs a new instance via :new(signature, ...)
instance_handle: Existing JavaObject handle returned by a previous call/constructor
release: If True with instance_handle > 0, releases the target-side JNI reference
timeout: RPC timeout in seconds (default: 30.0)
Returns:
JSON object with the return value (or {handle, raw_hex} for returned Java objects)
Inputs: args, release, timeout, signature, +4 more. Returns: result
renef_java_classesA
Enumerate loaded Java classes from the app's dex files (Java.enumerateLoadedClasses).
Args: pattern: Optional case-insensitive substring filter (e.g., "okhttp", "com.example", "Trust") limit: Maximum class names to return (default: 200, max: 2000)
Returns: JSON object with total matches and list of class names
Inputs: limit, pattern. Returns: result
renef_java_method_infoB
Inspect ART metadata for a Java method using Java.methodInfo.
Returns the ArtMethod* pointer, access flags, quick entry point, JNI native function pointer
(if native) and whether it is bound, plus native, static, and hooked booleans.
Args: class_name: Java class name (dots or slashes accepted, e.g., "com/example/NativeBridge") method_name: Method name (e.g., "checkLicense") signature: JNI signature (e.g., "(Ljava/lang/String;)Z")
Returns: JSON object with ART method details
Inputs: signature (required), class_name (required), method_name (required). Returns: result
renef_jniA
Raw JNI string & reference helpers (Jni.* API — distinct from JNI.* return tags).
Actions:
new_string: Create a Java String from UTF-8 text ->Jni.newStringUTF(value)(returns ref pointer)get_string: Read UTF-8 text from ajstringor raw ARTString*pointer ->Jni.getStringUTF(ref)string_length: Get UTF-16 character length of ajstring/ ARTString*->Jni.getStringLength(ref)delete_ref: Delete a JNI global reference ->Jni.deleteGlobalRef(ref)
Args: action: "new_string", "get_string", "string_length", or "delete_ref" value: UTF-8 string value (required for "new_string") ref: JNI reference / ART String* address (required for "get_string", "string_length", "delete_ref")
Returns: JSON object with JNI operation result
Inputs: action (required), ref, value. Returns: result
renef_kcovA
Kernel coverage collection via Linux KCOV (KCov.* API; requires kernel CONFIG_KCOV=y).
Manages a session-wide _kcov handle in the target's Lua VM.
Actions:
start: Open/sys/kernel/debug/kcovwith optionalbuf_size(default 256K entries) and enable recordingenable: Re-enable recording on the open_kcovhandledisable: Pause recording (buffer preserved forcollect/edges)count: Return number of recorded kernel PCs without copyingcollect: Collect recorded kernel PC addresses (hex list, capped atmax_entries)edges: Compute AFL-style unique kernel edge hashes and total edge countreset: Clear the KCOV buffer for a fresh measurementstop: Disable and close the KCOV handle
Args:
action: "start", "enable", "disable", "count", "collect", "edges", "reset", or "stop"
buf_size: Number of PC entries for action="start" (0 = default 256K entries / 2MB)
max_entries: Maximum PCs/edges returned in JSON (default: 256, max: 8192)
Returns: JSON object with coverage state or collected kernel PCs/edges
Inputs: action (required), buf_size, max_entries. Returns: result
renef_list_appsA
List installed applications on the Android device via renef_server (no injection needed).
Args: filter: Optional substring filter for package names (e.g., "chrome", "example")
Returns: JSON object with count and sorted package names
Inputs: filter. Returns: result
renef_load_scriptA
Load and execute one or more local Lua script files in the target process.
Reads the file(s) on the host and sends them over Renef v0.4.0's framed protocol (supports scripts of any size with full Lua error reporting).
Args: script_paths: Path to a Lua file, or space-separated paths to multiple files (e.g., "hook.lua" or "taint_filter.lua root_emulator_bypass.lua") timeout: Execution timeout per script in seconds (default: 30.0)
Returns: JSON summary with per-script execution results
Inputs: script_paths (required), timeout. Returns: result
renef_mem_dumpA
Dump or disassemble target memory via server-side md (/proc/<pid>/mem).
Args:
address: Target memory address (e.g., "0x7f8a1c2b0")
size: Number of bytes to dump (1..4096, default: 64)
disassemble: If True, disassemble ARM64 instructions (-d flag)
Returns: Formatted hex dump or ARM64 disassembly from renef_server
Inputs: address (required), size, disassemble. Returns: result
renef_memdump_passiveA
Injection-free, ptrace-free passive memory read via renef_server (/proc/<pid>/maps & /proc/<pid>/mem).
Does NOT spawn, attach, inject libagent.so, or call ptrace. Ideal for inspecting
anti-tamper / anti-debug targets before deciding whether to inject.
Modes:
maps(default): Lists memory mappings from/proc/<pid>/maps(optional substringfilter).dump: Reads raw bytes in[start_addr, end_addr)directly from/proc/<pid>/mem. Ifoutput_pathis provided, writes the binary dump to that host file.
Args:
pid: Target process PID on the Android device
mode: "maps" (default) or "dump"
start_addr: Start hex address (required for mode="dump", e.g., "0x7f10000000")
end_addr: End hex address (required for mode="dump", e.g., "0x7f10004000")
filter: Optional substring filter for mode="maps" lines (e.g., "libapp.so", "r-xp")
output_path: Optional host file path to write the maps text or raw binary dump
Returns: JSON object with maps lines or dump metadata/hex preview
Inputs: pid (required), mode, filter, end_addr, +2 more. Returns: result
renef_mem_manageA
Allocate, free, or change page permissions in target process memory (Renef v0.4.0 API).
Actions:
alloc: Allocatesizebytes with permissionsprot(e.g.,"rw-","rwx","r-x") ->Memory.allocalloc_str: Allocate a NUL-terminated copy oftextin target memory ->Memory.allocStrfree: Free memory allocated ataddress(optionalsize) ->Memory.freeprotect: Change memory protection of[address, address+size)toprot->Memory.protect
Args: action: "alloc", "alloc_str", "free", or "protect" address: Memory address (required for "free" and "protect") size: Byte size (required for "alloc" and "protect"; optional for "free") text: String content (required for "alloc_str") prot: Permission string like "rw-", "r-x", "rwx" (default: "rw-")
Returns: JSON object with result address or confirmation
Inputs: action (required), prot, size, text, +1 more. Returns: result
renef_mem_readA
Safely read memory from the target process (checks /proc/self/maps first to avoid crashes).
Supported formats:
hex(default): Raw bytes as hex + printable ASCII preview (sizedefaults to 64, max 1MB)hexdump: Formatted classic hexdump (Memory.hexdump,sizedefaults to 64)string: NUL-terminated UTF-8/C string (Memory.readStr,sizedefaults to 256)u8,u16,u32,u64,pointer: Little-endian unsigned integer
Args: address: Target memory address (e.g., "0x7f8a1c2b0") size: Number of bytes for hex/hexdump (default 64) or max length for string (default 256) format: Output format - "hex", "hexdump", "string", "u8", "u16", "u32", "u64", "pointer"
Returns: JSON object with the read value (or formatted hexdump)
Inputs: address (required), size, format. Returns: result
renef_mem_searchA
Search target process memory for a string, hex byte sequence, or wildcard hex pattern.
Pattern formats:
Plain string:
"secret","https://api"Hex bytes:
"DEADBEEF"or"FD 7B ?? A9"(??matches any byte)
Args: pattern: String or hex/wildcard search pattern lib_name: Optional library name to scope the search (e.g., "libnative.so") limit: Maximum matches to return (default: 100)
Returns: JSON object with total hit count and structured match records
Inputs: pattern (required), limit, lib_name. Returns: result
renef_mem_writeA
Write bytes or integers to target process memory (with optional code-page patching).
When
patch=True(or writing to read-only/executable code pages), usesMemory.patchwhich automatically handlesmprotectand instruction cache flushing.Supports
type:"hex"(e.g."C0035FD6"= ARM64RET),"u8","u16","u32","u64".
Args:
address: Target memory address (e.g., "0x7f8a1c2b0")
value: Hex bytes string (for type="hex") or integer string (decimal or "0x..." hex)
type: Data type - "hex" (default), "u8", "u16", "u32", "u64"
patch: Force Memory.patch (auto mprotect for RX/RO code pages)
Returns: JSON status confirming bytes written
Inputs: value (required), address (required), type, patch. Returns: result
renef_module_exportsA
List or search exported (.dynsym) or full (.symtab) symbols of a loaded library.
Uses Renef v0.4.0's
Module.findExportByName(lib, pattern)whenpatternis set andinclude_symbols=False. Supports glob wildcards (*,?) — e.g."SSL_*","*verify*", or exact names like"fopen".Set
include_symbols=Trueto read.symtab(Module.symbols, empty for stripped binaries).
Args:
lib_name: Library name (e.g., "libc.so", "libssl.so", "linker64")
pattern: Optional glob pattern ("pthread_*", "*open*") or exact symbol name
include_symbols: If True, inspect .symtab (Module.symbols) instead of .dynsym
limit: Maximum symbols to return (default: 200)
Returns: JSON object with base address, match counts, and symbol list with offsets
Inputs: lib_name (required), limit, pattern, include_symbols. Returns: result
renef_module_findA
Find the base address of a loaded library in the target process (Module.find).
Args: lib_name: Library name (e.g., "libc.so", "libflutter.so"). Supports partial matches.
Returns:
JSON object with found, base, and base_hex
Inputs: lib_name (required). Returns: result
renef_module_listA
List loaded modules/libraries in the target process with base addresses and sizes.
Args: filter: Optional case-insensitive substring filter on module name or path (e.g., "ssl", "flutter") limit: Maximum entries to return (default: 200)
Returns: JSON object with total count and module records
Inputs: limit, filter. Returns: result
renef_module_sectionsA
List ELF sections of a loaded library (sec <lib_name>).
Args: lib_name: Library name (e.g., "libnative.so", "libflutter.so")
Returns: Formatted ELF section list from renef_server
Inputs: lib_name (required). Returns: result
renef_native_callA
Call a native ARM64 function directly inside the target process via NativeFunction.
Supports up to 8 integer/pointer args (x0-x7) and 8 float/double args (d0-d7).
Explicit calls via NativeFunction DO trigger installed hooks on the target address.
Supported types for ret_type and arg_types:
"int", "long", "pointer", "bool", "string", "void", "float", "double".
Args: address: Target function address (e.g., "0x7f8a12340") ret_type: Return type (default: "pointer") arg_types: Optional list of argument types (e.g., ["pointer", "int"]) args: Optional list of argument values (ints, hex address strings starting with "0x", floats, bools, or strings). Note: if an argument's declared type is "pointer" and you pass a hex string like "0x7f0000", it is converted to an integer pointer. timeout: Call timeout in seconds (default: 30.0)
Returns:
JSON object with ok, result, and hex formatting for pointer returns
Inputs: address (required), args, timeout, ret_type, +1 more. Returns: result
renef_osA
OS-level helpers executed inside the target process (OS.* API).
Actions:
getpid: Get the target process's PID (OS.getpid())listdir: List non-dot entries of a directory on device (OS.listdir(path))kill: Send a POSIX signal to a PID (OS.kill(pid, signal))tgkill: Send a POSIX signal to a specific thread (OS.tgkill(pid, tid, signal))
Args: action: "getpid", "listdir", "kill", or "tgkill" path: Directory path on device (required for "listdir", e.g., "/proc/self/task") pid: Target process/thread-group ID (required for "kill" and "tgkill") tid: Target thread ID (required for "tgkill") signal: POSIX signal number (required for "kill" and "tgkill", e.g., 9, 15, 19)
Returns: JSON object with operation result
Inputs: action (required), pid, tid, path, +1 more. Returns: result
renef_pingA
Check connectivity to renef_server and report session status.
Optionally updates the target host/port (defaults to RENEF_HOST/RENEF_PORT or 127.0.0.1:1907).
Args: host: Optional host override (e.g., "127.0.0.1") port: Optional TCP port override (e.g., 1907)
Returns: JSON status including pong, framing protocol support, and active target info
Inputs: host, port. Returns: result
renef_port_forwardA
Manage ADB TCP port forwarding rules for renef_server or rootless gadget mode.
Actions:
status(default): List all active ADB port forwardsadd: Addadb forward tcp:<local_port> <remote>(defaults to configured port -> RuntimeInit UDS; or ifgadget_pid > 0, forwards tolocalabstract:renef_pl_<gadget_pid>)remove: Remove forwarding rule fortcp:<local_port>remove_all: Remove all ADB port forwarding rules
Args:
action: "status", "add", "remove", or "remove_all"
local_port: Local TCP port (0 = use configured RENEF_PORT / 1907)
remote: Remote endpoint (default: "localabstract:com.android.internal.os.RuntimeInit",
or e.g. "tcp:1907" when server runs with --transport TCP)
gadget_pid: Optional PID for gadget mode (localabstract:renef_pl_<pid>)
Returns: JSON status with active rules or operation result
Inputs: action, remote, gadget_pid, local_port. Returns: result
renef_processA
Inspect target process memory ranges, threads, thread ID, and stack backtrace.
Actions:
info(default): PID (OS.getpid), current agent thread ID (Thread.id), and thread countranges: Enumerate/proc/self/mapsviaProcess.enumerateRanges()(optional substringfilteron path or perms like"r-xp")threads: Enumerate all live thread IDs viaProcess.enumerateThreads()thread_id: Current agent thread ID (Thread.id())backtrace: PAC-aware stack backtrace (Thread.backtrace())
Args:
action: "info", "ranges", "threads", "thread_id", or "backtrace"
filter: Optional substring filter for action="ranges" (matches path or perms)
limit: Maximum entries for action="ranges" (default: 200)
Returns: JSON object with requested process/thread data
Inputs: limit, action, filter. Returns: result
renef_recipesA
List, inspect, or run bundled Renef v0.4.0 pentest recipes and example Lua scripts.
Recipes are templates (not universal drop-ins) — use action="get" to read and tailor
their CONFIG table before running, or action="run" to execute directly in the target.
Actions:
list(default): List bundled recipes and examplesget: Return the full Lua source of a recipe/example bynamerun: Execute a bundled recipe/example directly in the active target session
Args:
action: "list", "get", or "run"
name: Script name (with or without .lua, e.g., "ssl_pinning_bypass", "taint_filter")
category: "recipes" (default) or "examples"
timeout: Execution timeout in seconds for action="run" (default: 30.0)
Returns: JSON list of scripts, Lua source text, or execution result
Inputs: name, action, timeout, category. Returns: result
renef_resetA
Reset the Renef session or perform a full device/server hard reset.
Modes:
session(default): Closes the local TCP connection and clears session state. Fast and safe.hard: Closes local session, kills target app (if specified/tracked), kills and restartsrenef_serveron the Android device, refreshes ADB port forwarding, optionally redeploys v0.4.0 binaries (renef_server+/data/local/tmp/libagent.so), and verifies withping.
Args: mode: Reset mode - "session" (default) or "hard" redeploy: (hard mode only) Re-push renef_server and libagent.so to device kill_app: (hard mode only) Package name or PID to force-stop/kill
Returns: JSON status with step-by-step reset results
Inputs: mode, kill_app, redeploy. Returns: result
renef_resumeA
Resume a target process that was spawned with renef_spawn(..., pause=True).
Detaches the ptrace spawn gate so app code runs and any deferred hooks install as their target libraries load.
Returns: JSON status with server response
Inputs: no named parameters. Returns: result
renef_rpcB
Evaluate a Lua expression in the target process and return its structured JSON value.
Uses Renef v0.4.0's rpc command: Lua tables become JSON arrays/objects, booleans stay
true/false, and errors return exact Lua error messages.
Examples:
- OS.getpid() -> 12345
- {pid = OS.getpid(), tid = Thread.id()} -> {"pid": 12345, "tid": 12360}
- Module.find("libc.so") -> base address integer
Args: expression: Lua expression to evaluate timeout: Silence timeout in seconds (default: 30.0)
Returns:
JSON object with ok and value
Inputs: expression (required), timeout. Returns: result
renef_serverA
Manage the on-device Android renef_server daemon and libagent.so deployment.
Uses Renef v0.4.0 device paths:
/data/local/tmp/renef_server(chmod +x)/data/local/tmp/libagent.so(chmod 777+chcon u:object_r:app_data_file:s0)
Actions:
status(default): Check deployment of both binaries and whetherrenef_serveris runningdeploy: Push v0.4.0renef_serverandlibagent.soto device with proper permissions/SELinux contextstart: Setup ADB port forward (tcp:<port>) and startrenef_serverin background as rootkill: Stop runningrenef_serverand close local sessionrestart: Kill and startrenef_serverlogs: Show tail of/data/local/tmp/renef.log(optionally truncate withclear_logs=True)
Args:
action: "status", "deploy", "start", "kill", "restart", or "logs"
lines: Number of log lines for action="logs" (default: 100)
clear_logs: If True with action="logs", clear the log file after reading
Returns: JSON status or server logs
Inputs: lines, action, clear_logs. Returns: result
renef_spawnA
Spawn an Android app and inject the Renef v0.4.0 agent (libagent.so).
Default injection (pause=False) is signal-based (NO ptrace, immune to TracerPid checks).
With pause=True, uses the ptrace spawn gate to freeze the main thread before app code runs
so deferred hooks on not-yet-loaded libraries catch the very first call.
Anti-debug note: pause=True sets TracerPid != 0 while paused. Prefer pause=False against
targets suspected of anti-debug/ptrace checks unless early-hook timing is specifically needed.
Args:
package_name: Android package name (e.g., "com.example.app")
pause: Freeze the app at startup via ptrace spawn gate (default: False)
hold: When pause=True, keep the app frozen across multiple exec/hook calls until
renef_resume() is explicitly called (default: True)
timeout: Spawn & injection timeout in seconds (default: 30.0)
Returns: JSON status with spawned PID and next-step guidance
Inputs: package_name (required), hold, pause, timeout. Returns: result
renef_syscallA
Trace Linux/Android syscalls in the target process (Syscall.* API).
Actions:
trace: Trace specific syscalls (syscalls=["openat", "read", "connect"], optionalcaller="libapp.so") OR trace an entirecategory("file","network","memory","process","ipc")trace_all: Trace all supported syscalls (Syscall.traceAll())untrace: Stop tracing specific syscalls (syscalls=[...])stop: Stop all active syscall tracing (Syscall.stop())list: List available traceable syscalls (optionalcategoryfilter)active: Show currently active syscall traces
Note: Syscall trace lines are delivered on the separate event channel — call renef_events
to read captured syscall traces!
Args: action: "trace", "trace_all", "untrace", "stop", "list", or "active" syscalls: List of syscall names (for "trace" / "untrace") category: Syscall category ("file", "network", "memory", "process", "ipc") caller: Optional caller library filter when tracing named syscalls (e.g., "libtarget.so")
Returns: JSON status or list of syscalls/active traces
Inputs: action (required), caller, category, syscalls. Returns: result
renef_unhookA
Remove native hook(s), Java hook(s), or all hooks from the target process.
In Renef v0.4.0, Java hooks can also be removed individually by their j<id> ID
(as shown in renef_hooks_list).
Args: hook_id: Hook ID to remove: "all" (default), native ID like "0", or Java ID like "j0"
Returns: JSON status with server reply
Inputs: hook_id. Returns: result
renef_verboseA
Toggle verbose debug logging inside the injected agent (verbose on / verbose off).
Args: enabled: True to enable verbose agent logs, False to disable
Returns: JSON status with server reply
Inputs: enabled (required). Returns: result
search_techniquesA
Search across technique documentation with optional platform filtering.
Performs full-text search across all documentation files in a technique category, returning matching lines with file context. Supports regex patterns for advanced searching.
Args: query: Search term or regex pattern (e.g., "OkHttp", "Trust.*Manager") technique: Technique category to search (default: "ssl_pinning") platform: Filter to specific platform (optional, e.g., "flutter", "android") case_sensitive: Enable case-sensitive search (default: False) context_lines: Number of context lines before/after match (default: 2)
Returns: Markdown formatted search results with: - File name and line number - Matched line - Context lines (before/after) - Limited to 50 results
Examples: Basic search: search_techniques("OkHttp")
Platform-specific:
search_techniques("HttpClient", platform="flutter")
Regex pattern:
search_techniques("Trust.*Manager", case_sensitive=True)
With more context:
search_techniques("frida", context_lines=5)
Inputs: query (required), platform, technique, context_lines, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 47 tools
The set is broad and many tools have overlapping boundaries, especially memory inspection (renef_mem_read, renef_mem_dump, renef_memdump_passive), hooking (renef_hook_native, renef_interceptor), and command execution (renef_command, renef_exec, renef_rpc). Detailed descriptions usually clarify the intended distinction, but an agent could still misselect among similar memory/hook/command tools.
Most names are snake_case and prefixed with renef_ or adb_, but the set mixes conventions: some tools lack the prefix (search_techniques), and related concepts use inconsistent forms such as renef_mem_dump versus renef_memdump_passive. Names remain readable, but the pattern is not fully predictable.
At 47 tools, the surface is very large for a single MCP server. Many operations are split across separate tools or could be consolidated into the existing action-parameterized tools, making the set feel heavy even for a comprehensive reverse-engineering toolkit.
The surface covers the core Android dynamic-analysis workflow well: device/server management, spawn/attach, app listing, native and Java hooks, memory operations, module inspection, disassembly, syscall tracing, KCOV, and Java/JNI helpers. There are minor gaps such as process listing and host-side file transfer, but the domain is broadly covered.
Maintenance
Related MCP Connectors
Hosted iOS app intelligence and creative research MCP server.
Remote MCP server to control your Android phone from AI assistants with per-app permissions.
Related MCP Servers
- AlicenseAqualityCmaintenanceA comprehensive MCP server for Frida dynamic instrumentation, enabling AI agents to manage devices, processes, scripts, memory, and ADB operations.3940MIT
- AlicenseNot gradedqualityBmaintenanceAn enterprise-grade MCP server for AI-powered reverse engineering. Enables AI agents to perform comprehensive binary analysis through natural language commands.172 PyPI226MIT
- AlicenseBqualityDmaintenanceMCP server for iOS reverse engineering, enabling static analysis of IPA/Mach-O binaries and dynamic instrumentation via Frida for tasks like IAP interception and FairPlay decryption.324MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that exposes dynamic binary instrumentation, memory editing, pointer scanning, and scripting capabilities to AI agents, enabling real-time process inspection and modification.MIT