PcmHackMCP
БесплатноНе проверенMCP server and Ghidra plugin for reverse engineering, enabling clients like Claude to control Ghidra. Adds a run_python tool to execute arbitrary Jython scripts
Описание
MCP server and Ghidra plugin for reverse engineering, enabling clients like Claude to control Ghidra. Adds a run_python tool to execute arbitrary Jython scripts server-side.
README
PcmHackMCP
PcmHackMCP is a fork of LaurieWired/GhidraMCP (Apache-2.0): a Model Context Protocol (MCP) server plus Ghidra plugin that lets MCP clients (Claude, etc.) drive Ghidra for reverse engineering.
It keeps all of the upstream tools and adds one thing: a server-side run_python tool that executes an arbitrary Jython script inside Ghidra in a single call. Bulk work - mass renames, xref sweeps, batch comments, applying data types over many addresses - runs as one loop inside Ghidra instead of thousands of individual MCP/HTTP round-trips. Only the printed result crosses the wire.
To run alongside the original GhidraMCP without clashing, every identifier is renamed and the default port is changed:
| Upstream GhidraMCP | PcmHackMCP | |
|---|---|---|
| MCP server name | ghidra-mcp |
pcmhack-mcp |
| Ghidra module / extension | GhidraMCP |
PcmHackMCP |
| Java class | com.lauriewired.GhidraMCPPlugin |
com.pcmhack.mcp.PcmHackMCPPlugin |
| Default HTTP port | 8080 | 8765 |
| MCP bridge script | bridge_mcp_ghidra.py |
bridge_mcp_pcmhack.py |
Features
- Everything in upstream GhidraMCP (decompile, list/rename functions and data, imports/exports, xrefs, strings, set prototypes, and more).
run_python(code, timeout=600)- run an arbitrary Jython script server-side against the current program. Full GhidraScript environment is available (currentProgram, the flat API,monitor); a program transaction is opened and committed automatically; bothprint(...)andprintln(...)output is captured and returned.
Install
Prerequisites
- Ghidra 11.3.2
- Python 3.10+ and the MCP SDK:
pip install "mcp>=1.2.0,<2" "requests>=2,<3"
Ghidra plugin
- Run Ghidra
File->Install Extensions- Click
+and selectPcmHackMCP-11.3.2.zip - Restart Ghidra
- Enable PcmHackMCP in
File->Configure->Developer - Optional: change the port in
Edit->Tool Options->PcmHackMCP HTTP Server(default 8765)
MCP client (Claude Desktop example)
Claude -> Settings -> Developer -> Edit Config, then:
{
"mcpServers": {
"pcmhack": {
"command": "py",
"args": [
"-3",
"C:\\ABSOLUTE_PATH_TO\\bridge_mcp_pcmhack.py",
"--ghidra-server",
"http://127.0.0.1:8765/"
]
}
}
}
Host/port default to 127.0.0.1:8765 if not set.
Claude Code
claude mcp add pcmhack -- py -3 "C:\ABSOLUTE_PATH_TO\bridge_mcp_pcmhack.py"
run_python example
curl -s -X POST http://127.0.0.1:8765/run_python --data-binary @- <<'PY'
count = 0
for f in currentProgram.getFunctionManager().getFunctions(True):
if f.getName().startswith("FUN_"):
count += 1
print("auto-named functions:", count)
PY
The script runs inside Ghidra and returns its printed output.
Security: the embedded HTTP server binds to all interfaces and
run_pythonexecutes arbitrary code in your Ghidra session. Run it only on a trusted network.
Claude Code skill
A Claude Code skill ships with this repo at .claude/skills/pcmhack-mcp/SKILL.md. It captures the discipline for writing good run_python payloads: the whole-script model, printing results as JSON, the automatic (commit-on-error) transaction, and the Jython 2.7 traps that bite. It loads automatically when you work with run_python.
Build from source
No Maven required (it is a single source file). With JDK 17-21:
- Copy these jars from your Ghidra install into
lib/:Base.jar,Decompiler.jar,Docking.jar,Generic.jar,Project.jar,SoftwareModeling.jar,Utility.jar,Gui.jar
- Compile and package:
javac --release 17 -cp "lib/*" -d build/classes src/main/java/com/pcmhack/mcp/PcmHackMCPPlugin.java jar --create --file target/PcmHackMCP.jar --manifest src/main/resources/META-INF/MANIFEST.MF -C build/classes . - Stage an extension folder
target/ext/PcmHackMCP/containingextension.properties,Module.manifest, andlib/PcmHackMCP.jar, then zip it with thejartool:
Do not zip it with PowerShelljar --create --file target/PcmHackMCP-11.3.2.zip -C target/ext PcmHackMCPCompress-Archiveor .NETZipFile.CreateFromDirectory- on Windows PowerShell 5.1 both write backslash zip entry paths, which Ghidra's installer rejects ("Unexpected error installing extension"). Thejartool writes forward-slash paths and directory entries, which Ghidra accepts.
Or, if you have Maven installed: mvn clean package assembly:single.
Credits
Fork of GhidraMCP by LaurieWired. Licensed under Apache-2.0; see LICENSE.
Установка PcmHackMCP
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/hjtrbo/PcmHackMCPFAQ
PcmHackMCP MCP бесплатный?
Да, PcmHackMCP MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для PcmHackMCP?
Нет, PcmHackMCP работает без API-ключей и переменных окружения.
PcmHackMCP — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить PcmHackMCP в Claude Desktop, Claude Code или Cursor?
Открой PcmHackMCP на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare PcmHackMCP with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
