Skip to content
Back to search

mcp-server-idapro

A Model Context Protocol (MCP) server that enables AI assistants to interact with IDA Pro for reverse engineering and binary analysis tasks.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/fdrechsler--mcp-server-idapro/badge.svg)](/listings/fdrechsler--mcp-server-idapro)

HTML

<a href="/listings/fdrechsler--mcp-server-idapro"><img src="/api/listings/fdrechsler--mcp-server-idapro/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Install the IDA Pro Remote Control Plugin

1. Copy `ida_remote_server.py` to your IDA Pro plugins directory: - Windows: `%PROGRAMFILES%\IDA Pro\plugins` - macOS: `/Applications/IDA Pro.app/Contents/MacOS/plugins` - Linux: `/opt/idapro/plugins`

2. Start IDA Pro and open a binary file.

3. The plugin will automatically start an HTTP server on `127.0.0.1:9045`.

2. Install the MCP Server

1. Clone this repository:

   git clone <repository-url>
   cd ida-server

2. Install dependencies:

   npm install

3. Build the project:

   npm run build

4. Configure the MCP server in your AI assistant's MCP settings file:

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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 336 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # IDA Pro MCP Server
  2. A Model Context Protocol (MCP) server that enables AI assistants to interact with IDA Pro for reverse engineering and binary analysis tasks.
  3. <a href="https://glama.ai/mcp/servers/@fdrechsler/mcp-server-idapro">
  4. <img width="380" height="200" src="https://glama.ai/mcp/servers/@fdrechsler/mcp-server-idapro/badge" alt="IDA Pro Server MCP server" />
  5. </a>
  6. ## Overview
  7. This project provides a bridge between AI assistants and IDA Pro, a popular disassembler and debugger used for reverse engineering software. It consists of three main components:
  8. 1. **IDA Pro Remote Control Plugin** (`ida_remote_server.py`): An IDA Pro plugin that creates an HTTP server to remotely control IDA Pro functions.
  9. 2. **IDA Remote Client** (`idaremoteclient.ts`): A TypeScript client for interacting with the IDA Pro Remote Control Server.
  10. 3. **MCP Server** (`index.ts`): A Model Context Protocol server that exposes IDA Pro functionality to AI assistants.
  11. ## Features
  12. - Execute Python scripts in IDA Pro from AI assistants
  13. - Retrieve information about binaries:
  14. - Strings
  15. - Imports
  16. - Exports
  17. - Functions
  18. - Advanced binary analysis capabilities:
  19. - Search for immediate values in instructions
  20. - Search for text strings in the binary
  21. - Search for specific byte sequences
  22. - Get disassembly for address ranges
  23. - Automate IDA Pro operations through a standardized interface
  24. - Secure communication between components
  25. ## Prerequisites
  26. - IDA Pro 8.3 or later
  27. - Node.js 18 or later
  28. - TypeScript
  29. ### Example usage ida_remote_server.py
  30. ```bash
  31. curl -X POST -H "Content-Type: application/json" -d '{"script":"print(\"Script initialization...\")"}' http://127.0.0.1:9045/api/execute
  32. {"success": true, "output": "Script initialization...\n"}
  33. ```
  34. ### Example usage MCP Server
  35. ![Roo Output](/image.png)
  36. ## Installation
  37. ### 1. Install the IDA Pro Remote Control Plugin
  38. 1. Copy `ida_remote_server.py` to your IDA Pro plugins directory:
  39. - Windows: `%PROGRAMFILES%\IDA Pro\plugins`
  40. - macOS: `/Applications/IDA Pro.app/Contents/MacOS/plugins`
  41. - Linux: `/opt/idapro/plugins`
  42. 2. Start IDA Pro and open a binary file.
  43. 3. The plugin will automatically start an HTTP server on `127.0.0.1:9045`.
  44. ### 2. Install the MCP Server
  45. 1. Clone this repository:
  46. ```bash
  47. git clone <repository-url>
  48. cd ida-server
  49. ```
  50. 2. Install dependencies:
  51. ```bash
  52. npm install
  53. ```
  54. 3. Build the project:
  55. ```bash
  56. npm run build
  57. ```
  58. 4. Configure the MCP server in your AI assistant's MCP settings file:
  59. ```json
  60. {
  61. "mcpServers": {
  62. "ida-pro": {
  63. "command": "node",
  64. "args": ["path/to/ida-server/dist/index.js"],
  65. "env": {}
  66. }
  67. }
  68. }
  69. ```
  70. ## Usage
  71. Once installed and configured, the MCP server provides the following tool to AI assistants:
  72. ### run_ida_command
  73. Executes an IDA Pro Python script.
  74. **Parameters:**
  75. - `scriptPath` (required): Absolute path to the script file to execute
  76. - `outputPath` (optional): Absolute path to save the script's output to
  77. **Example:**
  78. ```python
  79. # Example IDA Pro script (save as /path/to/script.py)
  80. import idautils
  81. # Count functions
  82. function_count = len(list(idautils.Functions()))
  83. print(f"Binary has {function_count} functions")
  84. # Get the first 5 function names
  85. functions = list(idautils.Functions())[:5]
  86. for func_ea in functions:
  87. print(f"Function: {ida_name.get_ea_name(func_ea)} at {hex(func_ea)}")
  88. # Return data
  89. return_value = function_count
  90. ```
  91. The AI assistant can then use this script with:
  92. ```
  93. <use_mcp_tool>
  94. <server_name>ida-pro</server_name>
  95. <tool_name>run_ida_command</tool_name>
  96. <arguments>
  97. {
  98. "scriptPath": "/path/to/script.py"
  99. }
  100. </arguments>
  101. </use_mcp_tool>
  102. ```
  103. ### search_immediate_value
  104. Searches for immediate values in the binary's instructions.
  105. **Parameters:**
  106. - `value` (required): Value to search for (number or string)
  107. - `radix` (optional): Radix for number conversion (default: 16)
  108. - `startAddress` (optional): Start address for search
  109. - `endAddress` (optional): End address for search
  110. **Example:**
  111. ```
  112. <use_mcp_tool>
  113. <server_name>ida-pro</server_name>
  114. <tool_name>search_immediate_value</tool_name>
  115. <arguments>
  116. {
  117. "value": "42",
  118. "radix": 10
  119. }
  120. </arguments>
  121. </use_mcp_tool>
  122. ```
  123. ### search_text
  124. Searches for text strings in the binary.
  125. **Parameters:**
  126. - `text` (required): Text to search for
  127. - `caseSensitive` (optional): Whether the search is case sensitive (default: false)
  128. - `startAddress` (optional): Start address for search
  129. - `endAddress` (optional): End address for search
  130. **Example:**
  131. ```
  132. <use_mcp_tool>
  133. <server_name>ida-pro</server_name>
  134. <tool_name>search_text</tool_name>
  135. <arguments>
  136. {
  137. "text": "password",
  138. "caseSensitive": false
  139. }
  140. </arguments>
  141. </use_mcp_tool>
  142. ```
  143. ### search_byte_sequence
  144. Searches for a specific byte sequence in the binary.
  145. **Parameters:**
  146. - `bytes` (required): Byte sequence to search for (e.g., "90 90 90" for three NOPs)
  147. - `startAddress` (optional): Start address for search
  148. - `endAddress` (optional): End address for search
  149. **Example:**
  150. ```
  151. <use_mcp_tool>
  152. <server_name>ida-pro</server_name>
  153. <tool_name>search_byte_sequence</tool_name>
  154. <arguments>
  155. {
  156. "bytes": "90 90 90"
  157. }
  158. </arguments>
  159. </use_mcp_tool>
  160. ```
  161. ### get_disassembly
  162. Gets disassembly for an address range.
  163. **Parameters:**
  164. - `startAddress` (required): Start address for disassembly
  165. - `endAddress` (optional): End address for disassembly
  166. - `count` (optional): Number of instructions to disassemble
  167. **Example:**
  168. ```
  169. <use_mcp_tool>
  170. <server_name>ida-pro</server_name>
  171. <tool_name>get_disassembly</tool_name>
  172. <arguments>
  173. {
  174. "startAddress": "0x401000",
  175. "count": 10
  176. }
  177. </arguments>
  178. </use_mcp_tool>
  179. ```
  180. ### get_functions
  181. Gets the list of functions from the binary.
  182. **Parameters:**
  183. - None required
  184. **Example:**
  185. ```
  186. <use_mcp_tool>
  187. <server_name>ida-pro</server_name>
  188. <tool_name>get_functions</tool_name>
  189. <arguments>
  190. {}
  191. </arguments>
  192. </use_mcp_tool>
  193. ```
  194. ### get_exports
  195. Gets the list of exports from the binary.
  196. **Parameters:**
  197. - None required
  198. **Example:**
  199. ```
  200. <use_mcp_tool>
  201. <server_name>ida-pro</server_name>
  202. <tool_name>get_exports</tool_name>
  203. <arguments>
  204. {}
  205. </arguments>
  206. </use_mcp_tool>
  207. ```
  208. ### get_strings
  209. Gets the list of strings from the binary.
  210. **Parameters:**
  211. - None required
  212. **Example:**
  213. ```
  214. <use_mcp_tool>
  215. <server_name>ida-pro</server_name>
  216. <tool_name>get_strings</tool_name>
  217. <arguments>
  218. {}
  219. </arguments>
  220. </use_mcp_tool>
  221. ```
  222. ## IDA Pro Remote Control API
  223. The IDA Pro Remote Control Plugin exposes the following HTTP endpoints:
  224. - `GET /api/info`: Get plugin information
  225. - `GET /api/strings`: Get strings from the binary
  226. - `GET /api/exports`: Get exports from the binary
  227. - `GET /api/imports`: Get imports from the binary
  228. - `GET /api/functions`: Get function list
  229. - `GET /api/search/immediate`: Search for immediate values in instructions
  230. - `GET /api/search/text`: Search for text in the binary
  231. - `GET /api/search/bytes`: Search for byte sequences in the binary
  232. - `GET /api/disassembly`: Get disassembly for an address range
  233. - `POST /api/execute`: Execute Python script (JSON/Form)
  234. - `POST /api/executebypath`: Execute Python script from file path
  235. - `POST /api/executebody`: Execute Python script from raw body
  236. ## Security Considerations
  237. By default, the IDA Pro Remote Control Plugin only listens on `127.0.0.1` (localhost) for security reasons. This prevents remote access to your IDA Pro instance.
  238. If you need to allow remote access, you can modify the `DEFAULT_HOST` variable in `ida_remote_server.py`, but be aware of the security implications.
  239. ## Development
  240. ### Building from Source
  241. ```bash
  242. npm run build
  243. ```
  244. ### Running Tests
  245. ```bash
  246. npm test
  247. ```
  248. ## License
  249. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
  250. ## Author
  251. Florian Drechsler (@fdrechsler) fd@fdrechsler.com

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.