Skip to main content
Glama

IDA Pro MCP サーバー

AI アシスタントが IDA Pro と対話してリバース エンジニアリングやバイナリ分析のタスクを実行できるようにするモデル コンテキスト プロトコル (MCP) サーバー。

概要

このプロジェクトは、AIアシスタントと、ソフトウェアのリバースエンジニアリングに使用される人気の逆アセンブラおよびデバッガであるIDA Proとの橋渡しとなるものです。3つの主要コンポーネントで構成されています。

  1. IDA Pro リモート コントロール プラグイン( ida_remote_server.py ): IDA Pro 機能をリモートで制御するための HTTP サーバーを作成する IDA Pro プラグイン。

  2. IDA リモート クライアント( idaremoteclient.ts ): IDA Pro リモート コントロール サーバーと対話するための TypeScript クライアント。

  3. MCP サーバー( index.ts ): IDA Pro 機能を AI アシスタントに公開するモデル コンテキスト プロトコル サーバー。

Related MCP server: Binary Ninja MCP Server

特徴

  • IDA ProでAIアシスタントからPythonスクリプトを実行する

  • バイナリに関する情報を取得します。

    • 文字列

    • 輸入品

    • 輸出

    • 機能

  • 高度なバイナリ分析機能:

    • 命令内の即値を検索する

    • バイナリ内のテキスト文字列を検索する

    • 特定のバイトシーケンスを検索する

    • アドレス範囲の逆アセンブリを取得する

  • 標準化されたインターフェースを通じてIDA Proの操作を自動化

  • コンポーネント間の安全な通信

前提条件

  • IDA Pro 8.3以降

  • Node.js 18以降

  • タイプスクリプト

使用例 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"}

MCPサーバーの使用例

Roo出力

インストール

1. IDA Proリモートコントロールプラグインをインストールする

  1. ida_remote_server.pyを IDA Pro プラグイン ディレクトリにコピーします。

    • Windows: %PROGRAMFILES%\IDA Pro\plugins

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

    • Linux: /opt/idapro/plugins

  2. IDA Pro を起動し、バイナリ ファイルを開きます。

  3. プラグインは127.0.0.1:9045で HTTP サーバーを自動的に起動します。

2. MCPサーバーをインストールする

  1. このリポジトリをクローンします:

    git clone <repository-url>
    cd ida-server
  2. 依存関係をインストールします:

    npm install
  3. プロジェクトをビルドします。

    npm run build
  4. AI アシスタントの MCP 設定ファイルで MCP サーバーを構成します。

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

使用法

MCP サーバーをインストールして構成すると、AI アシスタントに次のツールが提供されます。

実行IDAコマンド

IDA Pro Python スクリプトを実行します。

パラメータ:

  • scriptPath (必須): 実行するスクリプトファイルへの絶対パス

  • outputPath (オプション): スクリプトの出力を保存する絶対パス

例:

# 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

AI アシスタントは、このスクリプトを次のように使用できます。

<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>

検索即時値

バイナリの命令内の即値を検索します。

パラメータ:

  • value (必須): 検索する値 (数値または文字列)

  • radix (オプション):数値変換の基数(デフォルト:16)

  • startAddress (オプション): 検索の開始アドレス

  • endAddress (オプション): 検索の終了アドレス

例:

<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>

検索テキスト

バイナリ内のテキスト文字列を検索します。

パラメータ:

  • text (必須): 検索するテキスト

  • caseSensitive (オプション): 検索で大文字と小文字を区別するかどうか (デフォルト: false)

  • startAddress (オプション): 検索の開始アドレス

  • endAddress (オプション): 検索の終了アドレス

例:

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

検索バイトシーケンス

バイナリ内の特定のバイトシーケンスを検索します。

パラメータ:

  • bytes (必須): 検索するバイトシーケンス(例:3つのNOPの場合は「90 90 90」)

  • startAddress (オプション): 検索の開始アドレス

  • endAddress (オプション): 検索の終了アドレス

例:

<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>

get_disassembly

アドレス範囲の逆アセンブリを取得します。

パラメータ:

  • startAddress (必須): 逆アセンブリの開始アドレス

  • endAddress (オプション): 逆アセンブリの終了アドレス

  • count (オプション): 逆アセンブルする命令の数

例:

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

get_functions

バイナリから関数のリストを取得します。

パラメータ:

  • 不要

例:

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

get_exports

バイナリからエクスポートのリストを取得します。

パラメータ:

  • 不要

例:

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

get_strings

バイナリから文字列のリストを取得します。

パラメータ:

  • 不要

例:

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

IDA Pro リモート コントロール API

IDA Pro リモート コントロール プラグインは、次の HTTP エンドポイントを公開します。

  • GET /api/info : プラグイン情報を取得する

  • GET /api/strings : バイナリから文字列を取得する

  • GET /api/exports : バイナリからエクスポートを取得する

  • GET /api/imports : バイナリからインポートを取得する

  • GET /api/functions : 関数リストを取得する

  • GET /api/search/immediate : 命令内の即値を検索

  • GET /api/search/text : バイナリ内のテキストを検索する

  • GET /api/search/bytes : バイナリ内のバイトシーケンスを検索

  • GET /api/disassembly : アドレス範囲の逆アセンブリを取得する

  • POST /api/execute : Python スクリプト (JSON/フォーム) を実行

  • POST /api/executebypath : ファイルパスからPythonスクリプトを実行する

  • POST /api/executebody : 生のボディからPythonスクリプトを実行する

セキュリティに関する考慮事項

IDA Proリモートコントロールプラグインは、セキュリティ上の理由から、デフォルトで127.0.0.1 (ローカルホスト)のみをリッスンします。これにより、IDA Proインスタンスへのリモートアクセスが防止されます。

リモート アクセスを許可する必要がある場合は、 ida_remote_server.pyのDEFAULT_HOST変数を変更できますが、セキュリティへの影響に注意してください。

発達

ソースから構築

npm run build

テストの実行

npm test

ライセンス

このプロジェクトはMITライセンスの下で提供されています。詳細はLICENSEファイルをご覧ください。

著者

フロリアン・ドレクスラー (@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
    ResponsivenessOutdated data

    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