The IDA Pro MCP server provides a powerful interface between IDA Pro and large language models, enabling AI-assisted reverse engineering through the Model Context Protocol.
idapyswitch
to select the newest Python version)Install or upgrade the IDA Pro MCP package:
pip install --upgrade git+https://github.com/mrexodia/ida-pro-mcp
Configure the MCP servers and install the IDA Plugin:
ida-pro-mcp --install
Important: Completely restart IDA, Visual Studio Code, Claude (quit from tray icon), or any other MCP client for the installation to take effect.
If you prefer a manual installation approach:
pip install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
C:\MCP\ida-pro-mcp
)For the IDA plugin, copy src/ida_pro_mcp/mcp-plugin.py
to your plugins folder (typically %appdata%\Hex-Rays\IDA Pro\plugins
on Windows).
The IDA Pro MCP server provides numerous functions to interact with IDA Pro databases:
check_connection
get_metadata()
get_current_address()
get_current_function()
get_function_by_name(name)
get_function_by_address(address)
list_functions(offset, count)
decompile_function(address)
disassemble_function(start_address)
get_xrefs_to(address)
get_entry_points()
list_strings(offset, count)
search_strings(pattern, offset, count)
convert_number(text, size)
set_comment(address, comment)
rename_function(function_address, new_name)
set_function_prototype(function_address, prototype)
declare_c_type(c_declaration)
rename_local_variable(function_address, old_name, new_name)
set_local_variable_type(function_address, variable_name, new_type)
rename_global_variable(old_name, new_name)
set_global_variable_type(variable_name, new_type)
When using LLMs with this MCP server, you'll get better results with careful prompting. Here's a starting template:
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 convert_number 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
convert_number
function rather than performing number conversions itselfThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.