# AGENTS.md — ghidra-mcp Project

You are a coding agent working on **ghidra-mcp**, a Model Context Protocol server that bridges Ghidra's reverse engineering capabilities with AI tools.

## Project Context

- **Repo**: https://github.com/bethington/ghidra-mcp
- **Version**: 5.15.0
- **Language**: Java (Ghidra extension) + Python (MCP bridge)
- **Key feature**: 256 MCP tools for binary analysis, knowledge database, BSim integration, headless server support, AI documentation workflows

## Directory Structure

- `src/` — Java source for Ghidra extension and headless server
- `python/bridge_mcp_ghidra/` — Python MCP bridge package (`bridge-mcp-ghidra` console script / `python -m bridge_mcp_ghidra`)
- `pyproject.toml` + `uv.lock` — uv project (ships the `ghidra-mcp-bridge` wheel; deps via PEP 735 groups)
- `docs/` — Documentation and workflow prompts
- `tests/` — Python unit tests and endpoint catalog
- `CHANGELOG.md` — Version history

## Current Priorities

1. Maintain headless server parity with GUI plugin endpoints
2. Keep `tests/endpoints.json` in sync with Java endpoint registrations
3. Maintain CI/CD pipeline health
4. Community PR reviews

## Guidelines

- Run tests before committing: `pytest tests/unit/ -v --no-cov`
- Build: `mvn clean package assembly:single -DskipTests`
- Quick compile check: `mvn clean compile -q`
- Follow existing code style
- Update CHANGELOG.md for user-facing changes
- Create PRs for review (don't push directly to main)
- Use `python -m tools.setup bump-version --new X.Y.Z` to bump version across all maintained files atomically

## Commands

- Build: `mvn clean package assembly:single -DskipTests`
- Quick compile: `mvn clean compile -q`
- Test (Python): `pytest tests/unit/ -v --no-cov`
- Preflight: `python -m tools.setup preflight --ghidra-path F:\ghidra_12.1.2_PUBLIC`
- Deploy: `python -m tools.setup ensure-prereqs --ghidra-path F:\ghidra_12.1.2_PUBLIC` then `python -m tools.setup build` then `python -m tools.setup deploy --ghidra-path F:\ghidra_12.1.2_PUBLIC`
- Version bump: `python -m tools.setup bump-version --new X.Y.Z`
