Skip to main content
Glama

frida-mcp

A simple MCP server exposing persistent, scriptable Frida dynamic instrumentation to an AI agent. Built for Windows reversing, malware/security analysis, and general dynamic debugging.

Install

pip install -e .

Requires Python 3.11+. Frida is the only runtime dependency.

Related MCP server: ya-frida-mcp

Run

FRIDA_MCP_PROJECT=./mytarget.fmcp python -m frida_mcp

Register it with your MCP client (stdio transport). All state lands in the .fmcp project directory: db.sqlite (metadata) + traces/*.jsonl (events).

Capabilities

  • Process control: spawn (gated), attach, resume, detach, kill, list modules.

  • Memory: read, write, AOB/pattern scan, ranges.

  • Hooks: add_hook, trace_api (e.g. kernel32!CreateFile*) with backtraces — all calls stream to disk.

  • eval_js: run JS in a persistent in-process context; results come back as structured typed values you can feed straight into read_memory/disassemble.

  • disassemble: read N instructions from live memory (Capstone).

  • Persistence: list_sessions / resume_session re-attach and reinstall hooks if the target is alive, or tell you to re-spawn if it died. Events, REPL history, and notes survive restarts.

Deep static analysis (xrefs, function boundaries, decompilation) is out of scope — use an IDA or x64dbg MCP for that.

Tests

pytest                       # unit tests (no target needed)
pytest -m live               # integration tests (attach to a real process)

Available Tools

19 tools
add_hookC

Hook a function (module!export or hex address); calls stream to disk.

Inputs: target (required), session_id (required).

add_noteC

Attach a freeform note to a session.

Inputs: text (required), session_id (required).

attachB

Attach to a running process by name or numeric pid (as string).

Inputs: target (required).

detachC

Detach Frida from a session (process keeps running).

Inputs: session_id (required).

disassembleB

Disassemble count instructions at address from live memory.

Inputs: address (required), session_id (required), count. Returns: result

eval_jsC

Evaluate JS in the resident agent's persistent context.

Inputs: code (required), session_id (required).

killC

Kill the target process of a session.

Inputs: session_id (required).

list_modulesC

List loaded modules in the target.

Inputs: session_id (required). Returns: result

list_notesC

List notes for a session.

Inputs: session_id (required). Returns: result

list_processesA

List processes visible to the local Frida device.

Inputs: no named parameters. Returns: result

list_sessionsA

List all sessions (alive and dead) recorded in the project.

Inputs: no named parameters. Returns: result

read_eventsC

Read captured events (hooks/repl/errors) from the trace log.

Inputs: session_id (required), limit, offset, type_filter. Returns: result

read_memoryC

Read size bytes at address (hex string) from the live process.

Inputs: size (required), address (required), session_id (required).

resumeC

Resume a gated/spawned process so it starts running.

Inputs: session_id (required).

resume_sessionC

Re-attach a prior session and reinstall its hooks if the target is alive.

Inputs: session_id (required).

scan_memoryC

AOB/pattern scan over ranges with the given protection.

Inputs: pattern (required), session_id (required), protection. Returns: result

spawnA

Spawn a program suspended (gated) so hooks can be installed first.

Inputs: program (required), gated.

trace_apiB

frida-trace style: hook all exports matching module!glob (e.g. kernel32!CreateFile*).

Inputs: pattern (required), session_id (required).

write_memoryC

Write hex-encoded bytes at address.

Inputs: address (required), hex_bytes (required), session_id (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 19 tools

    Disambiguation5/5

    Each tool targets a distinct Frida operation: lifecycle (attach, detach, spawn, resume, kill), memory (read, write, scan, disassemble), hooking (add_hook, trace_api, eval_js), listing (modules, processes, sessions, notes), and utilities (resume_session, read_events). Even similar tools like add_hook and trace_api are differentiated by specificity: add_hook for exact addresses or exports, trace_api for glob patterns. No two tools share an overlapping purpose.

    Naming Consistency3/5

    Tools use snake_case consistently, but verb patterns vary: some are bare verbs (attach, detach, kill, resume, spawn), while others are verb_noun compounds (add_hook, read_memory, list_modules). This mix of single-word and compound names creates mild inconsistency, though each name is readable and descriptive. A more uniform verb_noun pattern would improve predictability.

    Tool Count4/5

    19 tools cover a broad Frida feature set (process control, memory, hooks, scripting, event logging, and notes) without feeling overwhelming. While slightly above the typical 3–15 range, each tool addresses a core capability, and no tool seems redundant. The count is justified by the domain's complexity.

    Completeness3/5

    The tool surface covers essential operations but has notable gaps: no way to list installed hooks, remove hooks, or enumerate memory regions for scanning (though scan_memory accepts ranges). Unhooking and hook introspection are missing, and while eval_js provides scripting, a dedicated 'list scripts' tool is absent. These omissions may force agents to use workarounds.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • 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
      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
    • A
      license
      Not graded
      quality
      B
      maintenance
      An 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
    • A
      license
      Not graded
      quality
      F
      maintenance
      MCP server for reverse engineering Windows executables and related binary formats, offering static analysis, Ghidra-assisted function recovery, plugin-driven tooling, and optional isolated Windows runtime execution.
      9 npm
      239
      MIT