2.2 KiB
| description | applyTo |
|---|---|
| Workflow rules for updating and validating the local Ghidra MCP server used by Crusader reverse-engineering tasks | ** |
Ghidra MCP Server Update Workflow
Use these instructions when making changes in the local Ghidra MCP source at K:/mcp/GhidraMCP from this workspace.
Scope
- Treat K:/mcp/GhidraMCP as the source of truth for server and bridge behavior.
- Keep Crusader task notes and MCP implementation aligned.
- Prefer small, verifiable batches of MCP changes.
Update Rules
-
Read ghidra_mcp_wishlist.md before changing the server.
-
Implement wishlist items in both layers when applicable:
-
Java plugin endpoint in src/main/java/com/lauriewired/GhidraMCPPlugin.java.
-
Python MCP bridge wrapper in bridge_mcp_ghidra.py.
-
Keep backward compatibility for endpoint naming when practical by adding aliases instead of removing old routes.
-
For POST endpoints, preserve existing form-urlencoded parameter handling and add
application/jsonsupport when evolving request parsing; if a route still only accepts one format, return a structured unsupported-content-type error instead of a missing-parameter failure. -
Keep xref and analysis outputs machine-friendly and evidence-rich (addresses, ref type, classification, function context).
-
Terminal execution rule: When running multi-line Python for testing or server-side scripts, do not paste multi-line code into interactive terminals. Always write the code to a temporary
.pyfile and execute it with the Python interpreter. This prevents paste-related failures and preserves the intended execution environment.
Verification Rules
- After server edits, run a Maven validation from K:/mcp/GhidraMCP.
- Minimum validation command: mvn test.
- If packaging changes are involved, also run mvn clean package assembly:single.
- Report failures with the exact failing phase and first actionable error.
Crusader Workflow Tie-In
- If a missing MCP operation forced a fallback to PyGhidra, append a concise entry to ghidra_mcp_wishlist.md.
- When a wishlist item is completed, update its status note so open gaps remain accurate.
- Keep changes minimal and focused on concrete reverse-engineering workflow needs.