### Run Headless MCP Server with Initial Binary Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Starts a headless MCP server with an initial executable. Requires idalib installation. ```sh uv run idalib-mcp --host 127.0.0.1 --port 8745 path/to/executable ``` -------------------------------- ### Full-Featured Local Configuration Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md Start the MCP client in a full-featured local mode using the default configuration. This setup automatically discovers IDA. ```bash uv run ida-pro-mcp --install # Start MCP client; auto-discovers IDA ``` -------------------------------- ### Start Instruction Pointer Functions Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_ida.rst Get and set the start instruction pointer (IP) of the program. ```APIDOC ## inf_get_start_ip() ### Description Gets the start instruction pointer (IP) of the program. ### Method GET ### Endpoint /inf/start_ip ## inf_set_start_ip(v: ida_idaapi.ea_t) ### Description Sets the start instruction pointer (IP) of the program. ### Method POST ### Endpoint /inf/start_ip ### Parameters #### Request Body - **v** (ida_idaapi.ea_t) - Required - The start instruction pointer to set. ``` -------------------------------- ### Install MCP Server and IDA Plugin Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md Use the --install argument to deploy the MCP server and IDA plugin. Targets can be specified as a comma-separated list, or an interactive menu will appear if omitted. The --scope parameter determines if the installation is project-specific or global. ```bash ida-pro-mcp --install ``` ```bash ida-pro-mcp --install claude,cursor ``` ```bash ida-pro-mcp --install --scope project ``` -------------------------------- ### install_hexrays_callback(callback) Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_hexrays.rst Installs a handler for decompiler events. Returns false if the installation fails. ```APIDOC ## install_hexrays_callback(callback) ### Description Install handler for decompiler events. ### Parameters #### Path Parameters - **callback** (function) - Required - Handler to install. ### Returns - bool - False if failed. ``` -------------------------------- ### Start EA Functions Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_ida.rst Get and set the start effective address (EA) of the program. ```APIDOC ## inf_get_start_ea() ### Description Gets the start effective address (EA) of the program. ### Method GET ### Endpoint /inf/start_ea ## inf_set_start_ea(v: ida_idaapi.ea_t) ### Description Sets the start effective address (EA) of the program. ### Method POST ### Endpoint /inf/start_ea ### Parameters #### Request Body - **v** (ida_idaapi.ea_t) - Required - The start effective address to set. ``` -------------------------------- ### Run IDA Pro MCP as a GUI Plugin Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/README.md Use this command to start the IDA Pro MCP in proxy-based GUI plugin mode. It automatically discovers a running IDA instance and requires no installation. ```bash ida-pro-mcp # Auto-discovers running IDA ``` -------------------------------- ### Install and Run IDA Pro MCP in Headless Mode Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/README.md Install the ida-pro-mcp package and run the idalib-mcp command with the path to your binary for headless analysis. ```bash pip install ida-pro-mcp uv run idalib-mcp --stdio path/to/binary.exe ``` -------------------------------- ### Install IDA Pro MCP Manually Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/overview.md Installs the ida-pro-mcp tool using pip and then runs the installation command. This is for manual installation, typically for the GUI plugin. ```bash pip install ida-pro-mcp ida-pro-mcp --install ``` -------------------------------- ### Run Headless MCP Server Without Initial Binary Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Starts a headless MCP server without an initial executable, allowing arbitrary files to be opened later using idb_open(...). Requires idalib installation. ```sh uv run idalib-mcp --host 127.0.0.1 --port 8745 ``` -------------------------------- ### Start IDA Pro MCP in Headless HTTP Mode Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/README.md Run idalib-mcp with host and port configurations to start the server in headless HTTP mode. MCP clients can then connect to the specified address. ```bash uv run idalib-mcp --host 127.0.0.1 --port 8745 binary.exe ``` -------------------------------- ### Install and Run IDA Pro MCP Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Installs and runs the IDA Pro MCP server. Ensure symbolic links are enabled for your device before running. ```sh uv run ida-pro-mcp --install ``` -------------------------------- ### Install IDA Pro MCP via pip (GUI) Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Uninstall the existing MCP plugin and install the latest version from GitHub using pip for GUI installation. ```sh pip uninstall ida-pro-mcp pip install https://github.com/mrexodia/ida-pro-mcp/archive/refs/heads/main.zip ``` -------------------------------- ### Start Stack Pointer Functions Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_ida.rst Get and set the start stack pointer (SP) of the program. ```APIDOC ## inf_get_start_sp() ### Description Gets the start stack pointer (SP) of the program. ### Method GET ### Endpoint /inf/start_sp ## inf_set_start_sp(v: ida_idaapi.ea_t) ### Description Sets the start stack pointer (SP) of the program. ### Method POST ### Endpoint /inf/start_sp ### Parameters #### Request Body - **v** (ida_idaapi.ea_t) - Required - The start stack pointer to set. ``` -------------------------------- ### start_process Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_dbg.rst Starts a new process under the debugger. This function can be called with optional arguments for the executable path, command-line arguments, and starting directory. ```APIDOC ## start_process ### Description Starts a new process under the debugger. This function can be called with optional arguments for the executable path, command-line arguments, and starting directory. ### Parameters #### Path Parameters - **path** (str) - Optional - Path to the executable to start. - **args** (str) - Optional - Arguments to pass to the process. - **sdir** (str) - Optional - Starting directory for the process. ### Returns - **-1** - Impossible to create the process. - **0** - The starting of the process was cancelled by the user. - **1** - The process was properly started. ``` -------------------------------- ### install_command_interpreter Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Install command line interpreter (ui_install_cli). ```APIDOC ## install_command_interpreter(py_obj: PyObject *) -> int ### Description Install command line interpreter (ui_install_cli). ### Parameters #### Path Parameters - **py_obj** (PyObject *) - Description: None ### Returns - int: None ``` -------------------------------- ### Start Headless HTTP Mode Supervisor Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md Start the supervisor for headless HTTP mode MCP server. Ensure the correct host, port, and binary path are specified. ```bash uv run idalib-mcp --host 127.0.0.1 --port 8745 /path/to/binary ``` -------------------------------- ### Install IDA Plugin via MCP CLI Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Run this command to install the IDA Plugin after configuring MCP servers manually. ```sh ida-pro-mcp --install ``` -------------------------------- ### Install IDA Pro MCP via Claude Code Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/overview.md Installs the ida-pro-mcp plugin using the Claude Code marketplace. First, it adds the marketplace, then installs the specific plugin. ```bash claude plugin marketplace add mrexodia/claude-marketplace claude plugin install ida-pro-mcp@mrexodia ``` -------------------------------- ### prev_head Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Gets the start address of the previous defined item. It searches backward from a given address, including a specified minimum address in the search range. ```APIDOC ## prev_head ### Description Gets the start address of the previous defined item. Searches backward from `ea`, including `minea` in the range. ### Parameters - **ea** (ida_idaapi.ea_t) - The address to begin the search from. - **minea** (ida_idaapi.ea_t) - The minimum address to include in the search range. ### Returns - **ida_idaapi.ea_t** - The start address of the previous defined item, or BADADDR if none exists. ``` -------------------------------- ### Set Installation Scope for Install/Uninstall Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md Use the --scope argument with --install or --uninstall to define whether the operation applies to the current project ('project') or the user's global configuration ('global'). ```bash ida-pro-mcp --install --scope project ``` ```bash ida-pro-mcp --install --scope global ``` -------------------------------- ### NW_INITIDA Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idaapi.rst Notification constant for when IDA starts. ```APIDOC ## NW_INITIDA ### Description Notify when the IDA starts. Its callback is of the form: `def notify_when_callback(nw_code)` ### Value `4` ``` -------------------------------- ### ev_out_segstart Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst Produces the start of a segment. ```APIDOC ## ev_out_segstart ### Description Function to produce start of segment. ### Parameters #### Path Parameters - **ctx** (outctx_t *) - Required - Output context. - **s** (segment_t *) - Required - Segment information. ### Returns - **1**: ok - **0**: not implemented ``` -------------------------------- ### Binary-Specific Test Example Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/devdocs/test-framework.md An example of a binary-specific test that is only executed when a particular binary (e.g., 'crackme03.elf') is loaded. Use sparingly for cases not triggerable by generic inputs. ```python @test(binary="crackme03.elf") def test_crackme_specific_edge_case(): """Tests a code path that requires specific binary structure""" # Only runs when crackme03.elf is loaded ... ``` -------------------------------- ### Install/Uninstall MCP Server Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/CLAUDE.md Commands to install or uninstall the IDA Pro MCP server. Use the `--install` or `--uninstall` flags. ```bash uv run ida-pro-mcp --install ``` ```bash uv run ida-pro-mcp --uninstall ``` -------------------------------- ### ev_out_header Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst Generates the starting text for the disassembled output. ```APIDOC ## ev_out_header(outctx: outctx_t *) ### Description Function to produce start of disassembled text. ### Parameters #### Path Parameters - **outctx** (outctx_t *) - Required - Output context. ``` -------------------------------- ### Start Segment Functions Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_ida.rst Get and set the start selector for the code segment. ```APIDOC ## inf_get_start_ss() ### Description Gets the start selector for the stack segment. ### Method GET ### Endpoint /inf/start_ss ## inf_set_start_ss(v: sel_t) ### Description Sets the start selector for the stack segment. ### Method POST ### Endpoint /inf/start_ss ### Parameters #### Request Body - **v** (sel_t) - Required - The start selector for the stack segment. ``` ```APIDOC ## inf_get_start_cs() ### Description Gets the start selector for the code segment. ### Method GET ### Endpoint /inf/start_cs ## inf_set_start_cs(v: sel_t) ### Description Sets the start selector for the code segment. ### Method POST ### Endpoint /inf/start_cs ### Parameters #### Request Body - **v** (sel_t) - Required - The start selector for the code segment. ``` -------------------------------- ### ev_setup_til Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst Sets up default type libraries after a new file is loaded into the database. The processor module can use this callback to load type libraries, set up the memory model, and perform other actions necessary for the type system. ```APIDOC ## ev_setup_til() -> int ### Description Setup default type libraries. (called after loading a new file into the database). The processor module may load tils, setup memory model and perform other actions required to set up the type system. This is an optional callback. ### Returns * void: ``` -------------------------------- ### apply_startup_sig Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_funcs.rst Applies a startup signature file to a specified address. It takes the address and the signature filename (without path and extension) and returns a boolean indicating success. ```APIDOC ## apply_startup_sig(ea: ida_idaapi.ea_t, startup: str) -> bool ### Description Apply a startup signature file to the specified address. ### Parameters #### Path Parameters - **ea** (ida_idaapi.ea_t) - Required - address to apply the signature to; usually idainfo::start_ea - **startup** (str) - Required - the name of the signature file without path and extension ### Returns - **bool** - true if successfully applied the signature ``` -------------------------------- ### read_selection_start Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/idc.rst Gets the starting address of the currently selected range in the disassembly. ```APIDOC ## read_selection_start() ### Description Get start address of the selected range. ### Returns * BADADDR - the user has not selected an range ``` -------------------------------- ### ready_to_run Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Called when all UI elements have been initialized. Automatic plugins may hook to this event. ```APIDOC ## ready_to_run ### Description Called when all UI elements have been initialized. Automatic plugins may hook to this event to perform their tasks. ### Returns - void ``` -------------------------------- ### Get Start of Next Defined Item Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Retrieves the starting address of the next defined item. Use this to navigate forwards through defined code or data segments. ```python ida_bytes.next_head(ea, maxea) ``` -------------------------------- ### Get Start of Previous Defined Item Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Retrieves the starting address of the previous defined item. Use this to navigate backwards through defined code or data segments. ```python ida_bytes.prev_head(ea, minea) ``` -------------------------------- ### chunk_start Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Gets the starting address of the contiguous address block containing the given address. ```APIDOC ## chunk_start ### Description Get start of the contiguous address block containing 'ea'. ### Method `chunk_start(ea: ida_idaapi.ea_t) -> ida_idaapi.ea_t` ### Parameters #### Path Parameters - **ea** (ida_idaapi.ea_t) - Required - The address to check. ### Returns - **ida_idaapi.ea_t**: The start address of the block, or BADADDR if 'ea' doesn't belong to the program. ``` -------------------------------- ### Segments Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/idautils.rst Gets a list of segment start addresses for all segments (sections) present in the binary image. ```APIDOC ## Segments ### Description Get list of segments (sections) in the binary image. ### Method `idautils.Segments()` ### Returns A list of segment start addresses. ``` -------------------------------- ### get_item_head Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Gets the start address of the item at a given address. If no item exists at the address, the address itself is returned. ```APIDOC ## get_item_head ### Description Gets the start address of the item at 'ea'. If there is no current item, then 'ea' will be returned. ### Parameters - **ea** (ida_idaapi.ea_t) - The address to query. ### Returns - **ida_idaapi.ea_t** - The start address of the item at 'ea'. ``` -------------------------------- ### Specify Initial Binary for Headless Supervisor Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md Provide an optional initial binary path to the headless supervisor. If specified, the supervisor opens the binary immediately and returns a session ID. ```bash uv run idalib-mcp --stdio path/to/binary.exe ``` ```bash uv run idalib-mcp --host 127.0.0.1 --port 8745 path/to/binary.exe ``` -------------------------------- ### Get Function Chunks Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/idautils.rst Retrieves a list of contiguous blocks (chunks) that make up a function. Each chunk is represented by its start and end addresses. ```Python Chunks(start) ``` -------------------------------- ### Profile All Functions by Size Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/api-analysis.md Example of how to profile all functions in the database, sorted by size in descending order. This is useful for identifying the largest functions. ```python # Profile all functions with size filter result = func_profile({ "addr": "*", "count": 100, "sort_by": "size", "descending": True }) ``` -------------------------------- ### Getting the Selected Address Range in IDA Pro Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.md Returns the start and end addresses of the currently selected range in the disassembly view. ```python start_ea, end_ea = read_selection() if start_ea != BADADDR: print(f"Selected range: {start_ea:#x} - {end_ea:#x}") ``` -------------------------------- ### Get List of Segments Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/idautils.rst Retrieves a list of all segment start addresses in the binary image. Segments typically correspond to sections in the executable file. ```Python Segments() ``` -------------------------------- ### Get Item Head Address Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Returns the starting address of the item (instruction or data) at the given address. If no item exists, the address itself is returned. ```python ida_bytes.get_item_head(ea) ``` -------------------------------- ### Running Specific Tests via CLI Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/devdocs/test-framework.md Command-line example for running tests, specifically targeting a function using a pattern. ```bash ida-mcp-test tests/crackme03.elf --pattern "test_my_function" ``` -------------------------------- ### List Available MCP Client Targets Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md The --list-clients argument displays all available MCP client targets that can be installed. ```bash ida-pro-mcp --list-clients ``` -------------------------------- ### Activate idalib with uv (Windows) Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Activate the idalib environment using uv on Windows. Ensure idalib is globally activated and uv is installed. ```bash # windows uv run "C:\\Program Files\IDA Professional 9.3\idalib\python\py-activate-idalib.py" ``` -------------------------------- ### next_head Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Gets the start address of the next defined item. It searches forward from a given address, excluding a specified maximum address from the search range. ```APIDOC ## next_head ### Description Gets the start address of the next defined item. Searches forward from `ea`, not including `maxea` in the range. ### Parameters - **ea** (ida_idaapi.ea_t) - The address to begin the search from. - **maxea** (ida_idaapi.ea_t) - The maximum address not to include in the search range. ### Returns - **ida_idaapi.ea_t** - The start address of the next defined item, or BADADDR if none exists. ``` -------------------------------- ### Get Next Non-Tail Byte Address Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Finds the address of the succeeding byte that is not a tail byte. Useful for identifying the start of instruction or data sequences. ```python ida_bytes.next_not_tail(ea) ``` -------------------------------- ### Get Previous Non-Tail Byte Address Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_bytes.rst Finds the address of the preceding byte that is not a tail byte. Useful for identifying the start of instruction or data sequences. ```python ida_bytes.prev_not_tail(ea) ``` -------------------------------- ### Using a Simple Text Viewer in IDA Pro Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.md Demonstrates the use of `simplecustviewer_t` for creating a basic text-based custom viewer. This is a fundamental building block for custom UI elements. ```python # Example usage would involve creating a class inheriting from simplecustviewer_t # and implementing its methods. ``` -------------------------------- ### Get First Segment Addresses Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/devdocs/test-framework.md Retrieves the start and end addresses of the first segment in the IDA database. Used for tests needing segment information. ```python seg = get_first_segment() if not seg: return start_addr, end_addr = seg result = get_bytes({"addr": start_addr, "size": 16}) ``` -------------------------------- ### read_range_selection Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Gets the address range for the selected range boundaries in a view. Returns 0 if no range is selected, or 1 if successful, filling the start and end EA values. ```APIDOC ## read_range_selection ### Description Get the address range for the selected range boundaries, this is the convenient function for read_selection(). ### Parameters * **v** (TWidget *) - view, nullptr means the last active window containing addresses. ### Returns * **ea_t *, ea_t *** - 0: no range is selected, 1: ok, start ea and end ea are filled ``` -------------------------------- ### GetInstructionList() Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/idautils.rst Returns a list of instructions supported by the current processor module. ```APIDOC ## GetInstructionList() ### Description Returns the instruction list of the current processor module ### Returns List of instruction mnemonics. ``` -------------------------------- ### request_start_process Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_dbg.rst Posts a request to start a process in the debugger. This is an asynchronous operation. ```APIDOC ## request_start_process ### Description Posts a request to start a process in the debugger. This is an asynchronous operation. ### Parameters #### Path Parameters - **path** (str) - Optional - Path to the executable to start. - **args** (str) - Optional - Arguments to pass to the process. - **sdir** (str) - Optional - Starting directory for the process. ### Returns - **-1** - Impossible to create the process. - **0** - The starting of the process was cancelled by the user. - **1** - The process was properly started. ``` -------------------------------- ### initing_database Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Called when database initialization has started. This event is triggered for both new and old databases. ```APIDOC ## initing_database ### Description Called when database initialization has started. This event is called for both new and old databases. ### Returns void See also ui_database_inited. ``` -------------------------------- ### pyscv_init Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Initializes a Python link for a custom viewer. ```APIDOC ## Function: pyscv_init ### Description Initializes a Python link for a custom viewer, likely setting up the necessary Python object and associating it with a title. ### Parameters - **py_link** (PyObject *): The Python object representing the link. - **title** (str): The title for the custom viewer. ### Returns - **PyObject ***: The initialized Python object for the custom viewer. ``` -------------------------------- ### Initialize Hex-Rays Plugin Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_hexrays.rst Initializes the Hex-Rays plugin, preparing it for use. ```APIDOC ## ida_hexrays.init_hexrays_plugin ### Description Initializes the Hex-Rays plugin, performing necessary setup operations before it can be used. ### Function Signature `ida_hexrays.init_hexrays_plugin()` ### Returns - `bool`: True if initialization was successful, False otherwise. ``` -------------------------------- ### Get Segment Combination Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_segment.rst Gets the text representation of the segment combination code, digestible by IBM PC assembler. ```APIDOC ## get_segment_combination ### Description Get text representation of segment combination code. ### Parameters #### Path Parameters - **comb** (uchar) - Required - The combination code. ### Returns - **str** - Text representation of the combination code. ``` -------------------------------- ### Get Segment Alignment Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_segment.rst Gets the text representation of the segment alignment code, digestible by IBM PC assembler. ```APIDOC ## get_segment_alignment ### Description Get text representation of segment alignment code. ### Parameters #### Path Parameters - **align** (uchar) - Required - The alignment code. ### Returns - **str** - Text representation of the alignment code. ``` -------------------------------- ### make_code Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst An instruction is being created. ```APIDOC ## make_code ### Description An instruction is being created. ### Method (Not specified, likely an event callback) ### Parameters * **insn** (const insn_t*) - Pointer to the instruction being created. ``` -------------------------------- ### add_segment_translation Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_segment.rst Adds a segment translation, mapping a segment's start address to an overlayed segment's start address. ```APIDOC ## add_segment_translation ### Description Adds a segment translation, mapping a segment's start address to an overlayed segment's start address. ### Method `add_segment_translation(segstart: ida_idaapi.ea_t, mappedseg: ida_idaapi.ea_t) -> bool` ### Parameters #### Path Parameters - **segstart** (ida_idaapi.ea_t) - The start address of the segment to add translation to. - **mappedseg** (ida_idaapi.ea_t) - The start address of the overlayed segment. ### Returns - **bool** - 1: ok, 0: too many translations or bad segstart. ### Constants - **MAX_SEGM_TRANSLATIONS**: Maximum number of segment translations. ``` -------------------------------- ### API Function Signature Example Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/CLAUDE.md Illustrates API conventions including type hints and docstring usage for MCP tool descriptions. The docstring becomes the MCP tool description. ```python def my_api(addrs: Annotated[str, "Addresses (0x401000, main) or list"]) -> list[dict]: ... ``` -------------------------------- ### ev_asm_installed Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst Called after setting a new assembler. ```APIDOC ## ev_asm_installed ### Description Called after setting a new assembler. ### Parameters #### Path Parameters - **asmnum** (int) - Required - See also ev_newasm. ``` -------------------------------- ### TypedDict Schema Example Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/README.md Example of a Python function using TypedDict and Annotated for type safety, enabling IDE features and schema validation. ```python def list_funcs( queries: Annotated[ list[ListQuery] | ListQuery, "Pagination and filter queries" ] ) -> list[Page[Function]]: """List functions with optional filtering and pagination.""" ``` -------------------------------- ### Run IDA Pro MCP in Headless HTTP Mode Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/INDEX.md Starts the IDA Pro MCP as a standalone supervisor for multiple databases using HTTP transport. Specify the binary path to analyze. ```bash uv run idalib-mcp --stdio path/to/binary uv run idalib-mcp --host 0.0.0.0 --port 8745 path/to/binary ``` -------------------------------- ### Add and Decorate a New Tool Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/overview.md Example of adding a new tool to IDA Pro MCP. It demonstrates decorating the function with `@tool` and `@idasync`, and includes type hints and a docstring. ```python @tool @idasync def my_new_tool( addr: Annotated[str, "Address to process"] ) -> dict: """Process address and return result.""" ea = parse_address(addr) return {"addr": hex(ea), "result": ...} ``` -------------------------------- ### choose_til Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Opens a dialog to choose a type library (TIL). ```APIDOC ## choose_til ### Description Choose a type library (ui_choose, chtype_idatil). ### Returns - **str**: true: 'buf' was filled with the name of the selected til, false: otherwise ``` -------------------------------- ### buffer Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idd.rst Creates a string buffer. The returned value is a byref object. Use r.value to get the contents and r.size to get the buffer's size. ```APIDOC ## buffer ### Description Creates a string buffer. The returned value (r) will be a byref object. Use r.value to get the contents and r.size to get the buffer's size. ### Method staticmethod ### Parameters #### Path Parameters - **str** (string) - Optional - The initial string content for the buffer. - **size** (integer) - Optional - The size of the buffer. Defaults to 0. - **fill** (bytes) - Optional - The byte value to fill the buffer with if size is specified and str is not. Defaults to '\x00'. ### Returns A byref object representing the string buffer. ``` -------------------------------- ### Test Headless Mode with JSON-RPC Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/configuration.md Performs a minimal test of headless mode by starting a server, sending an initialization request via netcat, and checking for a response. ```bash uv run idalib-mcp --stdio /tmp/test_binary & sleep 2 echo '{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}' | nc localhost 8745 ``` -------------------------------- ### List Available Tests from Command Line Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/devdocs/test-framework.md Lists all available tests for a specified executable without running them. Useful for understanding the test suite. ```bash # List available tests ida-mcp-test tests/crackme03.elf --list ``` -------------------------------- ### ui_get_widget_type Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Get the type of the TWidget. ```APIDOC ## ui_get_widget_type ### Description Get the type of the TWidget. ### Parameters #### Path Parameters - **widget** (TWidget *) - Required - The widget to get the type of. ### Returns - **twidget_type_t** - The type of the widget. ``` -------------------------------- ### choose_entry Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_kernwin.rst Opens a dialog to choose an entry point in the analyzed program. ```APIDOC ## choose_entry ### Description Choose an entry point (ui_choose, chtype_entry). ### Parameters #### Path Parameters - **title** (str) - chooser title ### Returns - **ida_idaapi.ea_t**: ea of selected entry point, BADADDR if none selected ``` -------------------------------- ### Minimal Prompt for Reverse Engineering with MCP Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md A basic prompt strategy for LLM-assisted reverse engineering using IDA Pro and MCP tools. Emphasizes inspecting decompilation, renaming, type changes, and using the `int_convert` tool for number bases. ```markdown Your task is to analyze a crackme in IDA Pro. You can use the MCP tools to retrieve information. In general use the following strategy: - Inspect the decompilation and add comments with your findings - Rename variables to more sensible names - Change the variable and argument types if necessary (especially pointer and array types) - Change function names to be more descriptive - If more details are necessary, disassemble the function and add comments with your findings - NEVER convert number bases yourself. Use the `int_convert` MCP tool if needed! - Do not attempt brute forcing, derive any solutions purely from the disassembly and simple python scripts - Create a report.md with your findings and steps taken at the end - When you find a solution, prompt to user for feedback with the password you found ``` -------------------------------- ### get_nodename Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_dirtree.rst Gets the nodename attribute. ```APIDOC ## get_nodename ### Description Gets the nodename attribute. ``` -------------------------------- ### IDA Directories Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_diskio.md Functions for querying and managing IDA installation and user directories. ```APIDOC ## IDA Directories ### Path Queries - `idadir(subdir)` - Get IDA install directory or subdirectory - `get_user_idadir()` - Get user data directory ($IDAUSR or default) - `get_ida_subdirs(subdir, flags)` - List all search paths for resource - `getsysfile(filename, subdir)` - Search for file in IDA paths ### Subdirectory Constants - `CFG_SUBDIR` - Configuration files - `IDC_SUBDIR` - IDC scripts - `IDS_SUBDIR` - IDS files (function signatures) - `IDP_SUBDIR` - Processor modules - `LDR_SUBDIR` - Loader modules - `SIG_SUBDIR` - FLIRT signatures - `TIL_SUBDIR` - Type libraries - `PLG_SUBDIR` - Plugins - `THM_SUBDIR` - Themes ### Search Flags - `IDA_SUBDIR_IDP` - Append processor name - `IDA_SUBDIR_IDADIR_FIRST` - Search $IDADIR before $IDAUSR - `IDA_SUBDIR_ONLY_EXISTING` - Only return existing directories ``` -------------------------------- ### load_and_run_plugin Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_loader.rst Loads and immediately runs a specified plugin. ```APIDOC ## load_and_run_plugin ### Description Loads and then executes a plugin in a single operation. ### Method `load_and_run_plugin(name: str, arg: size_t) -> bool` ### Parameters #### Path Parameters - **name** (str) - Required - The name or path of the plugin to load. - **arg** (size_t) - Required - The argument to pass to the plugin's run function. ### Returns - **bool**: `True` if the plugin was loaded and run successfully, `False` otherwise. ``` -------------------------------- ### Mcode Utility Functions Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_hexrays.rst Utility functions for working with Mcode, including getting error descriptions, checking if a block must be closed, checking if propagation is possible, negating relations, swapping relations, and getting signed/unsigned Mcode. ```APIDOC ## Mcode Utility Functions ### `ida_hexrays.hx_get_merror_desc` ### `ida_hexrays.hx_must_mcode_close_block` ### `ida_hexrays.hx_is_mcode_propagatable` ### `ida_hexrays.hx_negate_mcode_relation` ### `ida_hexrays.hx_swap_mcode_relation` ### `ida_hexrays.hx_get_signed_mcode` ### `ida_hexrays.hx_get_unsigned_mcode` ### `ida_hexrays.hx_mcode_modifies_d` ``` -------------------------------- ### ev_out_header Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst Produces the start of the disassembled text. ```APIDOC ## ev_out_header ### Description Function to produce start of disassembled text. ### Parameters #### Path Parameters - **outctx** (outctx_t *) - Required - Output context. ### Returns - **void**: ``` -------------------------------- ### Activate idalib with uv (macOS) Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/README.md Activate the idalib environment using uv on macOS. Ensure idalib is globally activated and uv is installed. ```bash # macos uv run "/Applications/IDA Professional 9.3.app/Contents/MacOS/idalib/python/py-activate-idalib.py" ``` -------------------------------- ### ev_out_segstart Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_idp.rst Generates the text for the start of a segment. ```APIDOC ## ev_out_segstart(outctx: outctx_t *, seg: segment_t *) ### Description Function to produce start of segment. ### Parameters #### Path Parameters - **outctx** (outctx_t *) - Required - Output context. - **seg** (segment_t *) - Required - Segment information. ### Returns - **1**: ok - **0**: not implemented ``` -------------------------------- ### dbg_start Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/_autodocs/api-debug.md Starts the debugger process. This function initiates the debugger and prepares it for debugging operations. It returns a dictionary indicating success or failure. ```APIDOC ## dbg_start ### Description Starts the debugger process. This function initiates the debugger and prepares it for debugging operations. It returns a dictionary indicating success or failure. ### Method POST ### Endpoint /mrexodia/ida-pro-mcp?ext=dbg&call=dbg_start ### Parameters None ### Request Example ```json { "ok": true } ``` ### Response #### Success Response (200) - **ok** (bool) - True if the debugger started successfully, false otherwise. - **error** (string) - Optional. Description of the error if `ok` is false. #### Response Example ```json { "ok": true } ``` ``` -------------------------------- ### request_step_into Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_dbg.rst Asynchronously posts a request to execute a single instruction in the current thread. ```APIDOC ## request_step_into ### Description Posts a request to perform a step into operation, executing the next instruction in the current thread. This is an asynchronous operation. ### Returns - bool: Indicates if the request was successfully posted. ``` -------------------------------- ### block_chains_size Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/skills/idapython/docs/ida_hexrays.rst Get the number of elements in block_chains_t. ```APIDOC ## block_chains_size ### Description Get the number of elements in block_chains_t. ### Parameters * `set` (block_chains_t) - The block_chains_t to get the size of. ### Returns size_t - The number of elements in the block_chains_t. ``` -------------------------------- ### Basic Test Execution from Command Line Source: https://github.com/mrexodia/ida-pro-mcp/blob/main/devdocs/test-framework.md Executes tests for a specified executable file using the command-line interface. This is the fundamental way to run tests externally. ```bash # Basic usage ida-mcp-test tests/crackme03.elf ```