angr.mcp.server¶
Main MCP server for angr binary analysis.
- angr.mcp.server.load_binary(binary_path, auto_load_libs=False)¶
Load a binary file as an angr Project for analysis.
This is typically the first tool to call. It creates a new analysis session and returns a project_id that must be used for subsequent operations.
- angr.mcp.server.get_cfg(project_id, normalize=True, data_references=True)¶
Build or retrieve the Control Flow Graph (CFG) for a project.
The CFG is required for most analysis operations including function discovery, decompilation, and cross-reference analysis.
- Parameters:
- Return type:
- Returns:
CFG statistics including node/edge counts and functions discovered
- angr.mcp.server.list_functions(project_id, filter_plt=None, filter_syscall=None, name_pattern=None, limit=100, offset=0)¶
List all functions discovered in the binary.
Requires CFG to be built first via get_cfg.
- Parameters:
project_id (
str) – The project IDfilter_plt (
bool|None) – If True, only show PLT stubs; if False, exclude themfilter_syscall (
bool|None) – If True, only show syscalls; if False, exclude themname_pattern (
str|None) – Filter functions by name substring (case-insensitive)limit (
int) – Maximum number of functions to return (default: 100)offset (
int) – Number of functions to skip (for pagination)
- Return type:
- Returns:
List of function summaries with addresses and names
- angr.mcp.server.get_function_info(project_id, address=None, name=None, include_blocks=False)¶
Get detailed information about a specific function.
Specify either address (hex string like “0x401000”) or function name.
- Parameters:
- Return type:
- Returns:
Detailed function information including size, complexity, etc.
- angr.mcp.server.decompile_function(project_id, address=None, name=None)¶
Decompile a function to C-like pseudocode.
Specify either address (hex string) or function name.
- angr.mcp.server.get_xrefs(project_id, address, direction='to')¶
Get cross-references to or from a specific address.
- Parameters:
- Return type:
- Returns:
List of cross-references with source/destination and type
- angr.mcp.server.get_strings(project_id, min_length=4, limit=100)¶
Extract strings from the binary.
Requires CFG with data_references=True.
- angr.mcp.server.get_imports(project_id)¶
List imported symbols (external functions/variables the binary depends on).
- angr.mcp.server.get_exports(project_id)¶
List exported symbols (functions/variables this binary provides).
- angr.mcp.server.get_basic_blocks(project_id, function_address, include_disasm=True)¶
Get all basic blocks for a function.
- angr.mcp.server.get_callgraph(project_id, max_depth=None, root_address=None)¶
Get the function call graph.
- angr.mcp.server.find_functions_by_pattern(project_id, pattern, search_type='contains')¶
Search for functions by name pattern.
- angr.mcp.server.list_projects()¶
List all currently loaded projects/sessions.
- angr.mcp.server.close_project(project_id)¶
Close a project and free its resources.
- angr.mcp.server.create_server()¶
Create and return the configured MCP server instance.
- Return type:
FastMCP