renef-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Renef v0.4.0 MCP Server — Dynamic instrumentation toolkit for Android ARM64 (Lua 5.4). IMPORTANT: Renef is NOT Frida. Never use Frida JS syntax (Java.perform, Interceptor.attach, Module.findExportByName with Frida callbacks). Read the renef://api-reference resource for the exact Renef v0.4.0 Lua API, and renef://recipes or renef_recipes for ready-to-run pentest scripts. Hook and syscall output is delivered on a separate event channel — call renef_events to collect hook output and structured send() events.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| adb_appA | Inspect, list, start, or force-stop Android apps via ADB. Actions:
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 Returns: JSON result with app information or command output |
| 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 |
| adb_devicesB | List connected Android devices ( Returns: Connected ADB devices output |
| 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 |
| renef_commandA | Send a raw command directly to renef_server over the framed TCP transport. Works both with an active target session (e.g., Args: command: Raw renef_server command string timeout: Reply timeout in seconds (default: 35.0) Returns: Raw text response from renef_server |
| renef_eventsA | Collect hook output, syscall trace lines, and structured 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 Args:
wait_ms: Milliseconds to wait for incoming events (0 = immediate drain, max 30000)
include_logcat: Also fetch recent Returns:
JSON object with |
| 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, IMPORTANT: Use Renef Lua API ( Args: lua_code: Lua code to execute in the target process timeout: Silence timeout in seconds (default: 30.0) Returns:
JSON object with |
| 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 |
| 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 |
| 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 |
| renef_resetA | Reset the Renef session or perform a full device/server hard reset. Modes:
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 |
| renef_resumeA | Resume a target process that was spawned with 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 |
| renef_rpcB | Evaluate a Lua expression in the target process and return its structured JSON value. Uses Renef v0.4.0's Examples:
- Args: expression: Lua expression to evaluate timeout: Silence timeout in seconds (default: 30.0) Returns:
JSON object with |
| renef_spawnA | Spawn an Android app and inject the Renef v0.4.0 agent (libagent.so). Default injection ( Anti-debug note: 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 Returns: JSON status with spawned PID and next-step guidance |
| renef_verboseA | Toggle verbose debug logging inside the injected agent ( Args: enabled: True to enable verbose agent logs, False to disable Returns: JSON status with server reply |
| renef_hook_generateA | Generate a Renef Lua hook template using the server's Examples:
Args:
lib_name: Library name, or symbol name if Returns: Generated Lua hook template |
| 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:
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 ( Returns: JSON status confirming installation |
| 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:
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 ( Returns: JSON status with hook ID (or deferred flag) and details |
| renef_hooks_listB | List all active native and Java hooks with their IDs ( Returns: Formatted list of active native and Java hooks from the agent |
| renef_interceptorA | Replace or revert a native function using Renef v0.4.0's
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 Returns: JSON status |
| renef_native_callA | Call a native ARM64 function directly inside the target process via Supports up to 8 integer/pointer args (x0-x7) and 8 float/double args (d0-d7).
Explicit calls via Supported types for 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 |
| 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 Args: hook_id: Hook ID to remove: "all" (default), native ID like "0", or Java ID like "j0" Returns: JSON status with server reply |
| renef_java_callA | Call a Java static method, construct an instance, or call/release a boxed JavaObject. Uses Renef v0.4.0's Examples:
Args:
class_name: Java class name (dots or slashes accepted; required unless Returns:
JSON object with the return value (or |
| renef_java_classesA | Enumerate loaded Java classes from the app's dex files ( 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 |
| renef_java_method_infoB | Inspect ART metadata for a Java method using Returns the 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 |
| renef_jniA | Raw JNI string & reference helpers ( Actions:
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 |
| renef_mem_dumpA | Dump or disassemble target memory via server-side Args:
address: Target memory address (e.g., "0x7f8a1c2b0")
size: Number of bytes to dump (1..4096, default: 64)
disassemble: If True, disassemble ARM64 instructions ( Returns: Formatted hex dump or ARM64 disassembly from renef_server |
| renef_mem_manageA | Allocate, free, or change page permissions in target process memory (Renef v0.4.0 API). Actions:
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 |
| renef_mem_readA | Safely read memory from the target process (checks /proc/self/maps first to avoid crashes). Supported formats:
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) |
| renef_mem_searchA | Search target process memory for a string, hex byte sequence, or wildcard hex pattern. Pattern formats:
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 |
| renef_mem_writeA | Write bytes or integers to target process memory (with optional code-page patching).
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 Returns: JSON status confirming bytes written |
| renef_memdump_passiveA | Injection-free, ptrace-free passive memory read via renef_server ( Does NOT spawn, attach, inject Modes:
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 Returns: JSON object with maps lines or dump metadata/hex preview |
| 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 Returns: JSON object with detected frameworks, matched libraries + hex base addresses, and resource hints |
| renef_disassembleA | Disassemble ARM64 instructions at a target address using 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 |
| renef_module_exportsA | List or search exported (
Args:
lib_name: Library name (e.g., "libc.so", "libssl.so", "linker64")
pattern: Optional glob pattern ( Returns: JSON object with base address, match counts, and symbol list with offsets |
| renef_module_findA | Find the base address of a loaded library in the target process ( Args: lib_name: Library name (e.g., "libc.so", "libflutter.so"). Supports partial matches. Returns:
JSON object with |
| 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 |
| renef_module_sectionsA | List ELF sections of a loaded library ( Args: lib_name: Library name (e.g., "libnative.so", "libflutter.so") Returns: Formatted ELF section list from renef_server |
| renef_processA | Inspect target process memory ranges, threads, thread ID, and stack backtrace. Actions:
Args:
action: "info", "ranges", "threads", "thread_id", or "backtrace"
filter: Optional substring filter for Returns: JSON object with requested process/thread data |
| 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 Actions:
Args:
action: "list", "get", or "run"
name: Script name (with or without Returns: JSON list of scripts, Lua source text, or execution 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") |
| renef_port_forwardA | Manage ADB TCP port forwarding rules for Actions:
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 Returns: JSON status with active rules or operation result |
| renef_serverA | Manage the on-device Android Uses Renef v0.4.0 device paths:
Actions:
Args:
action: "status", "deploy", "start", "kill", "restart", or "logs"
lines: Number of log lines for Returns: JSON status or server logs |
| renef_fileA | Filesystem operations executed inside the target process context ( Runs with the target app's UID/SELinux context, so it can read the app's private data
files ( Actions:
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 |
| renef_kcovA | Kernel coverage collection via Linux KCOV ( Manages a session-wide Actions:
Args:
action: "start", "enable", "disable", "count", "collect", "edges", "reset", or "stop"
buf_size: Number of PC entries for Returns: JSON object with coverage state or collected kernel PCs/edges |
| renef_osA | OS-level helpers executed inside the target process ( Actions:
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 |
| renef_syscallA | Trace Linux/Android syscalls in the target process ( Actions:
Note: Syscall trace lines are delivered on the separate event channel — call 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 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| renef_lua_guide | Return a concise Renef v0.4.0 Lua scripting guide (anti-Frida guardrails + API reference). Args: task: Optional description of the instrumentation task you are planning |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_api_reference | Authoritative Renef v0.4.0 Lua API reference for Android ARM64 instrumentation. |
| list_recipes_resource | Overview and index of all bundled Renef v0.4.0 pentest recipes. |
| list_ssl_pinning_platforms | List all available SSL pinning platforms with descriptions. Returns structured information about supported platforms including: - Platform keys and display names - Detection keywords for each platform - File structure information - Usage instructions and aliases URI: techniques://ssl_pinning Returns: Markdown formatted list of platforms |
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.