Skip to main content
Glama

re-frida

MCP server wrapping the Frida dynamic-instrumentation toolkit. Frida injects a JavaScript engine (V8) into a target process and lets the analyst hook arbitrary functions, walk the type graph, and call into the target at runtime.

The MCP layer adds:

  • a stable session identifier — multiple scripts and hooks can be installed under one session, sharing state.

  • a strict allowlist of binary-operation shapes — Frida exposes the full V8 JS API to scripts but the MCP wrappers only call the canonical, well-understood primitives (attach, spawn, enumerate, hook, RPC).

  • soft-skip behaviour — when the frida Python module or the native libfrida are missing, every tool returns WARN with an install hint and the plugin keeps working.

Tools

Tool

What it does

check_frida

Health check — return frida version, native lib presence, USB device list

start_session

Spawn a new process under Frida (target: Android / iOS / native PID / remote endpoint)

attach_pid

Attach to a running process by host PID

script_load

Compile + load a Frida script (JavaScript) into a session

script_call

Call a method on a loaded script's exports (RPC)

enumerate_modules

List modules loaded into the session's process

enumerate_exports

List exports of a single module

hook_method

Install an Interceptor hook on a named method

rpc_export

Register a Python-side callable as an RPC export the JS side can call

end_session

Tear down a session, unload scripts, detach

Related MCP server: Frida MCP Server

Install

Frida is a heavy install (the Python module pulls in frida + frida-tools; the underlying libfrida is a native shared library shipped via PyPI wheels). To install standalone:

pip install -e ./servers/re-frida

On the target device (the phone or VM Frida is talking to), the matching frida-server binary must be running. See https://frida.re/docs/.

Run

re-frida                            # stdio transport (default for MCP)
python -m re_frida                  # equivalent

Deferred to a future run

The original Explore findings called for a Frida server; this plugin-internal scaffolding lands it so the deep-dive agents can pick it up. The Windows targets in the Live Fire stress test still use re-winedbg as the primary dynamic tool; the Android target future run is where re-frida becomes the workhorse.

Available Tools

10 tools
attach_pidA

Attach to a running process by host PID.

Args: session: session id pid: host PID of the target device_id: optional device id; empty means first available

Returns::

{
  "status": "OK",
  "session_id": "...",
  "pid": N,
  "device_id": "...",
  "kind": "attach"
}

Inputs: session (required), pid (required), device_id.

check_fridaA

Return frida version + native lib presence + USB device list.

Soft-skip behaviour: when frida Python module or the native libfrida is missing, returns status: WARN with an install hint (pip install frida frida-tools). The rest of the plugin continues to work — re-frida's tools just return errors when called.

Inputs: no named parameters.

end_sessionC

Tear down a session, unload scripts, detach from the process.

Inputs: session (required).

enumerate_exportsC

List exports of a single module.

Inputs: session (required), module (required).

enumerate_modulesA

List modules loaded in the session's target process.

Returns base address, size, and on-disk path for each module.

Inputs: session (required).

hook_methodA

Install a tracing hook on module:symbol.

The hook captures both arguments (on-enter) and the return value (on-leave) and posts messages back to the Python side for the analyst to consume. Useful for tracing the dispatcher of an encrypted-VM bytecode interpreter, the handler of an MBA-obfuscated arithmetic routine, or the userland callback of an anti-debug check.

Inputs: session (required), module (required), symbol (required).

rpc_exportB

Register a stub Python-side RPC export the script side can call.

The function is a reflective shim that returns None; the analyst wires the real Python callable by calling re_frida.runner.rpc_export(session, name, fn) from a follow-up script. The MCP layer intentionally avoids taking a Python callable as a JSON argument (which the MCP protocol can't transport).

Inputs: session (required), name (required).

script_callA

Call method on a loaded script's exports.

Args: session: session id name: script name (from script_load) method: the JS-side export to call. Scripts declare exports via rpc.exports = { myFn(arg) { ... } }. args: JSON-serialisable positional arguments timeout_s: RPC timeout (default 10s)

Returns the return value, or the error string when the JS side threw.

Inputs: session (required), name (required), method (required), args, +1 more.

script_loadA

Compile + load a Frida script (JavaScript) into a session.

Args: session: session id name: a name to look the script up by in subsequent calls source: the JavaScript source. Frida injects V8 into the target process; standard Interceptor / Java.perform / ObjC.classes APIs are available inside the script.

Returns::

{"status": "OK", "session_id": "...", "script": "...", "scripts_loaded": [...]}

Inputs: session (required), name (required), source (required).

start_sessionA

Spawn target on the named device and open a Frida session.

Args: session: analyst-chosen session id. The MCP layer keeps a table mapping session id → live Frida session. Pick something readable (e.g. "android-game"). target: package name (Android), bundle ID (iOS), or absolute path to a native binary. device_id: "usb", "local", "remote:<addr>", or a specific device id. Empty string means the first available device. spawn_args: extra argv to pass to the target on spawn. wait: when True (default), block until the spawned process is unpaused.

Returns::

{
  "status": "OK",
  "session_id": "...",
  "pid": N,
  "device_id": "...",
  "kind": "spawn"
}

Inputs: session (required), target (required), device_id, spawn_args, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: session management (start, attach, end), environment check, module/export enumeration, script loading/calling, hooking, and RPC export. No overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., attach_pid, enumerate_modules, script_load), making them predictable and easy to remember.

    Tool Count5/5

    With 10 tools, the server offers a well-scoped set for Frida-based reverse engineering: covers session lifecycle, exploration, scripting, and hooking without unnecessary clutter.

    Completeness4/5

    The tool set covers core workflows (session management, module/export enumeration, script injection, function hooking, RPC). Lacks tools for memory read/write or process listing, but these are secondary for the stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP-compliant server that enables AI systems to interact with mobile and desktop applications through Frida's dynamic instrumentation capabilities, allowing for process management, device control, JavaScript execution, and script injection.
      472
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      A comprehensive MCP server that exposes Frida's dynamic instrumentation toolkit to AI agents for process management, script injection, and memory operations. It provides over 50 tools to interact with local and mobile devices, enabling advanced capabilities like function hooking and memory analysis.
      55
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables dynamic instrumentation of processes by attaching Frida, loading JavaScript scripts, calling RPC methods, and retrieving script output through MCP.
      6
      3
      ISC
    • A
      license
      A
      quality
      C
      maintenance
      A comprehensive MCP server for Frida dynamic instrumentation, enabling AI agents to manage devices, processes, scripts, memory, and ADB operations.
      39
      39
      MIT