GhidrAssistMCP
CLAUDE.md761 starsChanged 5 months agoMITView on GitHub
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
All components extend appropriate Ghidra base classes (AbstractAnalyzer, AbstractProgramWrapperLoader, etc.)
- Very specific: line 66
Always use the build command: GHIDRA_INSTALL_DIR=/home/jtang613/tools/ghidra_11.4_PUBLIC/ /opt/gradle/bin/gradle buildExtension
- Distinctive: line 69
No formal test suite currently exists
- Distinctive: line 71
Test tools individually through the Configuration tab
- Very specific: line 82
All tools support an optional program_name parameter to target specific programs
- Very specific: line 83
Use list_programs tool to see all open programs
- Very specific: line 88
All tools extend McpTool interface with getName(), getDescription(), getInputSchema(), and execute()
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build and Development Commands
Building the Extension
# Set GHIDRA_INSTALL_DIR environment variable first
export GHIDRA_INSTALL_DIR=/path/to/ghidra
# Build the extension
gradle distributeExtension
# Or specify Ghidra path directly
gradle -PGHIDRA_INSTALL_DIR=/path/to/ghidra distributeExtensionProject Structure
This is a Ghidra extension project with the following key components:
- Main Plugin:
GhidrAssistMCPPlugin.java- Core plugin with UI provider and actions - Analyzer:
GhidrAssistMCPAnalyzer.java- Custom analyzer for binary analysis - Loader:
GhidrAssistMCPLoader.java- Custom loader for specific file formats - Exporter:
GhidrAssistMCPExporter.java- Custom exporter functionality - File System:
GhidrAssistMCPFileSystem.java- Custom file system implementation
Key Directories
src/main/java/ghidrassistmcp/- Main Java source codesrc/test/java/- Test filesdata/- Language specifications (SLEIGH files)ghidra_scripts/- Ghidra scriptslib/- External dependenciesdist/- Built extension output
Development Notes
- Extension uses Ghidra's plugin architecture with standard lifecycle methods
- All components extend appropriate Ghidra base classes (AbstractAnalyzer, AbstractProgramWrapperLoader, etc.)
- Built extension will be placed in
dist/directory - Language specifications in
data/languages/define custom processor architectures - Help documentation is in
src/main/help/
Dependencies
- Requires Ghidra installation with matching Gradle version
- Uses Ghidra's buildExtension.gradle for build configuration
- MCP SDK (io.modelcontextprotocol.sdk:mcp:0.9.0) for Model Context Protocol support
- Jetty 11.0.20 for embedded HTTP server
- Jackson 2.17.0 for JSON processing
MCP Server
The extension includes an embedded MCP (Model Context Protocol) server that:
- Runs on port 8080 by default
- Provides SSE endpoint at
/mcp/sseand HTTP request endpoint at/mcp/message - Automatically tracks the currently loaded program
- Exposes Ghidra analysis capabilities via MCP tools:
get_program_info: Get basic program informationlist_functions: List all functions in the programget_function_info: Get detailed function information
Build Requirements
- Java 25 or higher
- Gradle version matching your Ghidra installation
- Internet connection for dependency downloads from Maven Central
Build Command Notes
- Always use the build command:
GHIDRA_INSTALL_DIR=/home/jtang613/tools/ghidra_11.4_PUBLIC/ /opt/gradle/bin/gradle buildExtension
Testing
- No formal test suite currently exists
- Manual testing through Ghidra UI and MCP client connections
- Test tools individually through the Configuration tab
Core Architecture
The extension follows a plugin-based architecture:
- Plugin Layer:
GhidrAssistMCPPluginmanages lifecycle, Ghidra integration, and multi-program tracking via ProgramManager service - Server Layer:
GhidrAssistMCPServerhandles HTTP/SSE MCP protocol - Backend Layer:
GhidrAssistMCPBackendmanages tool registry, execution, and program resolution - UI Layer:
GhidrAssistMCPProviderprovides configuration and logging interface - Tool Layer: 39 individual tools implementing the
McpToolinterface
Multi-Program Support
- All tools support an optional
program_nameparameter to target specific programs - Use
list_programstool to see all open programs - Program resolution supports exact, case-insensitive, and partial name matching
MCP Tools System
Tools are dynamically registered and can be enabled/disabled:
- All tools extend
McpToolinterface withgetName(),getDescription(),getInputSchema(), andexecute() - Tools are organized into categories: Analysis, Modification, Navigation, and Advanced
- Backend maintains tool registry with enable/disable states
- UI provides real-time tool management and activity logging
Development Workflow
- Build with
gradle buildExtension - Install generated ZIP from
dist/directory in Ghidra - Enable plugin in Ghidra's Configure Plugins dialog
- Access UI via Window → GhidrAssistMCP
- Configure server settings and test tools through UI
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

