Skip to main content
Glama

Servidor IDA Pro MCP

Un servidor de Protocolo de Contexto de Modelo (MCP) que permite a los asistentes de IA interactuar con IDA Pro para tareas de ingeniería inversa y análisis binario.

Descripción general

Este proyecto conecta los asistentes de IA con IDA Pro, un popular desensamblador y depurador utilizado para la ingeniería inversa de software. Consta de tres componentes principales:

  1. Complemento de control remoto de IDA Pro ( ida_remote_server.py ): un complemento de IDA Pro que crea un servidor HTTP para controlar de forma remota las funciones de IDA Pro.

  2. Cliente remoto IDA ( idaremoteclient.ts ): un cliente TypeScript para interactuar con el servidor de control remoto IDA Pro.

  3. Servidor MCP ( index.ts ): un servidor de protocolo de contexto de modelo que expone la funcionalidad de IDA Pro a los asistentes de IA.

Related MCP server: Binary Ninja MCP Server

Características

  • Ejecute scripts de Python en IDA Pro desde asistentes de IA

  • Recuperar información sobre los binarios:

    • Instrumentos de cuerda

    • Importaciones

    • Exportaciones

    • Funciones

  • Capacidades avanzadas de análisis binario:

    • Búsqueda de valores inmediatos en las instrucciones

    • Buscar cadenas de texto en el binario

    • Buscar secuencias de bytes específicas

    • Obtener desmontaje para rangos de direcciones

  • Automatice las operaciones de IDA Pro a través de una interfaz estandarizada

  • Comunicación segura entre componentes

Prerrequisitos

  • IDA Pro 8.3 o posterior

  • Node.js 18 o posterior

  • Mecanografiado

Ejemplo de uso ida_remote_server.py

curl -X POST -H "Content-Type: application/json" -d '{"script":"print(\"Script initialization...\")"}' http://127.0.0.1:9045/api/execute
{"success": true, "output": "Script initialization...\n"}

Ejemplo de uso del servidor MCP

Salida de Roo

Instalación

1. Instale el complemento de control remoto IDA Pro

  1. Copie ida_remote_server.py a su directorio de complementos de IDA Pro:

    • Windows: %PROGRAMFILES%\IDA Pro\plugins

    • macOS: /Applications/IDA Pro.app/Contents/MacOS/plugins

    • Linux: /opt/idapro/plugins

  2. Inicie IDA Pro y abra un archivo binario.

  3. El complemento iniciará automáticamente un servidor HTTP en 127.0.0.1:9045 .

2. Instalar el servidor MCP

  1. Clonar este repositorio:

    git clone <repository-url>
    cd ida-server
  2. Instalar dependencias:

    npm install
  3. Construir el proyecto:

    npm run build
  4. Configure el servidor MCP en el archivo de configuración MCP de su asistente de IA:

    {
      "mcpServers": {
        "ida-pro": {
          "command": "node",
          "args": ["path/to/ida-server/dist/index.js"],
          "env": {}
        }
      }
    }

Uso

Una vez instalado y configurado, el servidor MCP proporciona la siguiente herramienta a los asistentes de IA:

comando_ejecutar_ida

Ejecuta un script de Python de IDA Pro.

Parámetros:

  • scriptPath (obligatorio): ruta absoluta al archivo de script a ejecutar

  • outputPath (opcional): ruta absoluta donde guardar la salida del script

Ejemplo:

# Example IDA Pro script (save as /path/to/script.py)
import idautils

# Count functions
function_count = len(list(idautils.Functions()))
print(f"Binary has {function_count} functions")

# Get the first 5 function names
functions = list(idautils.Functions())[:5]
for func_ea in functions:
    print(f"Function: {ida_name.get_ea_name(func_ea)} at {hex(func_ea)}")

# Return data
return_value = function_count

El asistente de IA puede entonces usar este script con:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>run_ida_command</tool_name>
<arguments>
{
  "scriptPath": "/path/to/script.py"
}
</arguments>
</use_mcp_tool>

valor_inmediato_de_búsqueda

Busca valores inmediatos en las instrucciones del binario.

Parámetros:

  • value (obligatorio): Valor a buscar (número o cadena)

  • radix (opcional): Base para conversión de números (predeterminado: 16)

  • startAddress (opcional): Dirección de inicio para la búsqueda

  • endAddress (opcional): Dirección final para la búsqueda

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>search_immediate_value</tool_name>
<arguments>
{
  "value": "42",
  "radix": 10
}
</arguments>
</use_mcp_tool>

texto de búsqueda

Busca cadenas de texto en el binario.

Parámetros:

  • text (obligatorio): Texto a buscar

  • caseSensitive (opcional): si la búsqueda distingue entre mayúsculas y minúsculas (valor predeterminado: falso)

  • startAddress (opcional): Dirección de inicio para la búsqueda

  • endAddress (opcional): Dirección final para la búsqueda

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>search_text</tool_name>
<arguments>
{
  "text": "password",
  "caseSensitive": false
}
</arguments>
</use_mcp_tool>

secuencia_de_bytes_de_búsqueda

Busca una secuencia de bytes específica en el binario.

Parámetros:

  • bytes (obligatorio): secuencia de bytes a buscar (por ejemplo, "90 90 90" para tres NOP)

  • startAddress (opcional): Dirección de inicio para la búsqueda

  • endAddress (opcional): Dirección final para la búsqueda

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>search_byte_sequence</tool_name>
<arguments>
{
  "bytes": "90 90 90"
}
</arguments>
</use_mcp_tool>

obtener_desmontaje

Obtiene el desmontaje para un rango de direcciones.

Parámetros:

  • startAddress (obligatorio): Dirección de inicio para el desmontaje

  • endAddress (opcional): Dirección final para el desmontaje

  • count (opcional): Número de instrucciones para desmontar

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_disassembly</tool_name>
<arguments>
{
  "startAddress": "0x401000",
  "count": 10
}
</arguments>
</use_mcp_tool>

obtener_funciones

Obtiene la lista de funciones del binario.

Parámetros:

  • No se requiere ninguno

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_functions</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

obtener_exportaciones

Obtiene la lista de exportaciones del binario.

Parámetros:

  • No se requiere ninguno

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_exports</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

obtener_cadenas

Obtiene la lista de cadenas del binario.

Parámetros:

  • No se requiere ninguno

Ejemplo:

<use_mcp_tool>
<server_name>ida-pro</server_name>
<tool_name>get_strings</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>

API de control remoto de IDA Pro

El complemento de control remoto IDA Pro expone los siguientes puntos finales HTTP:

  • GET /api/info : Obtener información del complemento

  • GET /api/strings : Obtener cadenas del binario

  • GET /api/exports : Obtener exportaciones del binario

  • GET /api/imports : Obtener importaciones del binario

  • GET /api/functions : Obtener la lista de funciones

  • GET /api/search/immediate : busca valores inmediatos en las instrucciones

  • GET /api/search/text : Busca texto en el binario

  • GET /api/search/bytes : busca secuencias de bytes en el binario

  • GET /api/disassembly : Obtener el desensamblado para un rango de direcciones

  • POST /api/execute : Ejecutar script de Python (JSON/Formulario)

  • POST /api/executebypath : Ejecutar script de Python desde la ruta del archivo

  • POST /api/executebody : Ejecutar script de Python desde el cuerpo sin formato

Consideraciones de seguridad

De forma predeterminada, el complemento de control remoto de IDA Pro solo escucha en 127.0.0.1 (localhost) por razones de seguridad. Esto impide el acceso remoto a su instancia de IDA Pro.

Si necesita permitir el acceso remoto, puede modificar la variable DEFAULT_HOST en ida_remote_server.py , pero tenga en cuenta las implicaciones de seguridad.

Desarrollo

Construyendo desde la fuente

npm run build

Ejecución de pruebas

npm test

Licencia

Este proyecto está licenciado bajo la Licencia MIT. Consulte el archivo de LICENCIA para más detalles.

Autor

Florian Drechsler (@fdrechsler) fd@fdrechsler.com

Available Tools

12 tools
get_disassemblyC

Get disassembly for an address range

Inputs: startAddress (required), endAddress, count.

get_exportsB

Get list of exports from the binary

Inputs: no named parameters.

get_functionsB

Get list of functions from the binary

Inputs: no named parameters.

get_stringsB

Get list of strings from the binary

Inputs: no named parameters.

get_xrefs_fromC

Get cross-references from an address

Inputs: address (required), type.

get_xrefs_toC

Get cross-references to an address

Inputs: address (required), type.

run_ida_commandC

Execute an IDA Pro Script (IdaPython, Version IDA 8.3)

Inputs: script (required).

run_ida_command_filebasedB

(FOR IDE USAGE) Execute an IDA Pro Script (IdaPython, Version IDA 8.3)

Inputs: scriptPath (required), outputPath.

search_byte_sequenceB

Search for a byte sequence in the binary

Inputs: bytes (required), startAddress, endAddress.

search_immediate_valueC

Search for immediate values in the binary

Inputs: value (required), radix, startAddress, endAddress.

search_in_namesC

Search for names/symbols in the binary

Inputs: pattern (required), caseSensitive, type.

search_textC

Search for text in the binary

Inputs: text (required), caseSensitive, startAddress, endAddress.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have distinct purposes, but the two 'run_ida_command' variants could cause confusion as they differ only in file-based execution for IDE usage, which might not be clear to an agent without careful reading. The search tools (search_byte_sequence, search_immediate_value, search_in_names, search_text) are well-differentiated by their targets.

    Naming Consistency5/5

    Tool names follow a consistent snake_case pattern with clear verb_noun structures (e.g., get_disassembly, get_exports, search_byte_sequence). The two 'run_ida_command' tools maintain this pattern with descriptive suffixes, ensuring overall predictability.

    Tool Count5/5

    With 12 tools, this server is well-scoped for binary analysis in IDA Pro, covering core functions like disassembly, exports, functions, strings, cross-references, searches, and script execution. Each tool serves a specific purpose without bloat.

    Completeness4/5

    The toolset provides comprehensive coverage for static analysis tasks, including retrieval, searching, and script execution. A minor gap is the lack of tools for modifying the binary (e.g., patching or annotating), but this is reasonable for a read-focused analysis server.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables Large Language Models to interact with Binary Ninja for reverse engineering tasks like viewing assembly code, decompiled code, renaming functions, and adding comments.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through MCP-compatible clients.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that runs inside IDA Pro for AI tools, exposing reverse-engineering capabilities like function listing, decompilation, and analysis via HTTP.
      MIT