PCM(MCP的逆向版本),用于逆向工程的MCP。

- `get_function_by_name(name)`: 根据名称获取函数。
- `get_function_by_address(address)`: 根据地址获取函数。
- `get_current_address()`: 获取用户当前选择的地址。
- `get_current_function()`: 获取用户当前选择的函数。
- `list_functions()`: 列出数据库中的所有函数。
- `decompile_function(address)`: 使用Hex-Rays反编译给定地址处的函数。
- `disassemble_function(address)`: 获取函数的汇编代码(地址:指令;注释)。
- `get_entrypoints()`: 获取二进制文件中的所有入口点。
- `get_function_blocks(address)`: 获取函数中的所有基本块。
- `get_function_cfg(address)`: 获取函数的控制流图。
- `get_xrefs_to(address)`: 获取指向给定地址的所有交叉引用。
- `get_xrefs_from(address)`: 获取从给定地址开始的所有交叉引用。
- `set_decompiler_comment(address, comment)`: 在函数伪代码中给定地址设置注释。
- `set_disassembly_comment(address, comment)`: 在函数反汇编中给定地址设置注释。
- `rename_local_variable(function_address, old_name, new_name)`: 重命名函数中的局部变量。
- `rename_function(function_address, new_name)`: 重命名函数。
- `set_function_prototype(function_address, prototype)`: 设置函数原型。
- `set_local_variable_type(function_address, variable_name, new_type)`: 设置局部变量的类型。
- `create_structure_type(name, members, is_union)`: 创建新的结构类型。
- `get_metadata()`: 获取当前IDB的元数据。
- `repl_idapython(content)`: 运行IDAPython代码并返回结果,同时捕获标准输出和错误输出。
- `add_note(title, content, address, tags)`: 为当前二进制文件添加新的分析笔记。
- `update_note(note_id, title, content, tags)`: 更新现有笔记。
- `get_notes(file_md5, address, tag)`: 获取二进制文件的分析笔记。
- `delete_note(note_id)`: 删除分析笔记。
</details>
前置条件:
克隆仓库
git clone https://github.com/rand-tech/pcm
将pcm添加到您的mcp配置中
示例
{
"mcpServers": {
"pcm": {
"command": "uv",
"args": [
"--directory",
"path_to/pcm",
"run",
"server.py"
]
}
}
}
使用MCP
相关项目:
致谢: 本项目基于Duncan Ogilvie (@mrexodia) 的IDA Pro MCP。感谢您!
许可: 本项目根据MIT许可协议授权 - 查看LICENSE文件以获取详细信息。原始代码也根据MIT许可协议授权。