Reverse Engineering with Claude and the Ghidra MCP Server

Published:

Updated:

ghidra mcp with claude

Disclaimer

As an affiliate, we may earn a commission from qualifying purchases. We get commissions for purchases made through links on this website from Amazon and other third parties.

Part of our AI Tools guides

Ghidra MCP connects Claude to Ghidra’s analysis tools, giving you a direct way to inspect a binary and act on findings from your AI client. Ghidra MCP with Claude can help you review binaries without copying each result into chat. Model Context Protocol (MCP) is an open standard that lets an AI client call tools provided by a server.

The bethington project lists 219 tools, from code analysis to controlled edits. This is a practical setup and workflow guide, not a promise of reliable autonomous reverse engineering. Work only with authorized samples, and check each model suggestion against the program. Treat Claude’s names and explanations as suggestions until you confirm them in Ghidra.

Key Takeaways

  • Match the extension and bridge to the same project and release.
  • Check the Ghidra version before installing an extension.
  • Use Claude to speed up routine investigation and note-taking.
  • Verify suggested names, types, and behavior in Ghidra.
  • Test the connection with an authorized sample first.

What Ghidra MCP With Claude Can Do

The connection lets Claude ask Ghidra for analysis results and, when permitted, make changes in your project. It can support analysis, notes, and edits without the usual copy-and-paste loop.

Instead of copying a decompilation into chat, you can ask Claude to inspect Ghidra data and request tool actions. The tools can help with analysis, documentation, and controlled changes. You stay in charge of what to accept.

The bethington/ghidra-mcp project lists 219 MCP tools across binary analysis, renaming, typing, comments, structure creation, script execution, P-code emulation, and live debugging. That count is an inventory, not a score for accuracy. It does not mean every task will work or every answer will be right.

This setup can also cut routine steps for teams doing ghidra reverse engineering. You can ask Claude to gather facts, compare functions, and draft notes, then review them yourself. Teams choosing agent software can also compare how AI agent builders connect tools and manage routine work.

Use the integration to shorten repetitive investigation, not to replace your judgment about what the evidence means.

How the Ghidra MCP Connection Works

Think of the connection as a short chain: Claude sends a tool request to the bridge, which passes it to the extension running inside Ghidra. The Model Context Protocol, or MCP, is an open standard for connecting AI clients with tools.

Claude connects to the bridge, while the extension serves HTTP from inside Ghidra. The bridge is the AI-facing MCP server. The extension is the Ghidra-side HTTP service, and each part has a separate job.

When Claude requests information, the bridge sends the request to the extension. The extension works with the open Ghidra project and returns data through the same chain. Claude then uses that result in its reply or asks for another tool action.

This model context path helps explain why one part can work while another fails. Ghidra may be open, but the bridge may not start. Or the bridge may start while the extension is not enabled in the project.

Keep the two server roles clear, because each part has its own job in a working connection.

Which Ghidra MCP Project Fits Your Setup?

Choose the project by matching its documented Ghidra version and operating mode to the Ghidra installation you can maintain. The best fit is the one whose extension and bridge match your chosen setup.

These projects are distinct, and their extension builds are not interchangeable. Compare their version and operating details before you download a file.

Implementation or release Ghidra requirement Operating mode or connection detail
bethington/ghidra-mcp, tagged 7.0.0 or 7.1.0 Ghidra 12.2 Extension ZIP and Python MCP bridge wheel; stable tagged releases
LaurieWired/GhidraMCP, release 2.0, October 10, 2026 Ghidra 12.1.4 GUI or headless PyGhidra; headless mode needs Python 3.10-3.13 and GHIDRA_INSTALL_DIR
Legacy 2025 ghidraMCP setup Ghidra 11.3.2 Python bridge using http://127.0.0.1:8080/

The bethington release provides both parts: a Ghidra extension ZIP and a Python MCP bridge wheel. Its tagged releases, including 7.0.0 and 7.1.0, are stable. Release candidates and main are beta, while dev is experimental.

LaurieWired is a separate project with a different Ghidra version requirement. Its listed features include binary decompilation and analysis, automatic renaming, and lists of methods, classes, imports, and exports. For headless use, it documents PyGhidra without a running Ghidra GUI. It also documents building its extension with Java 21.

A 2025 setup that asks for Ghidra 11.3.2 uses a Python bridge and a server URL with port 8080. Those instructions do not describe the bethington release. Before downloading an extension, match it to the exact Ghidra version named for that build. LaurieWired’s version and headless steps are specific to that project.

Check Ghidra Versions and Prerequisites

For the documented bethington setup, prepare Ghidra 12.2, Java 25, and uv before you open the release files. Check all four items before installing the plugin.

The extension loads only in the exact Ghidra version for which it was built. A matching project name is not enough if the file targets another version.

  • Confirm that your Ghidra install uses version 12.2.
  • Install Java 25, the matching Java runtime.
  • Install uv, the documented tool for the direct setup path.
  • Download the extension and bridge from the same release.

These checks cover the documented bethington route. The project also documents a Python 3.10-or-newer installation route, but uv is the direct prerequisite path described for its setup.

Check the release details before you download the latest release. The extension and bridge must come from one matching release, not simply from folders with the same project name.

Keep the version check simple: compare the extension build’s Ghidra requirement with the Ghidra version you will run. If the versions differ, stop before loading the file. Do not try to load an extension built for a different Ghidra version.

Install and Enable the Ghidra Extension

Install the extension ZIP in Ghidra first, then restart the application so Ghidra can load the plugin. This installs only the Ghidra-side component, not the bridge.

The extension and bridge are separate release components. Keep the matching bridge file for the client setup, but use these steps only for the extension.

  1. Open Ghidra’s project window.
  2. Choose File > Install Extensions.
  3. Select the extension ZIP from the matching release.
  4. Restart Ghidra so it can load the extension.
  5. Enable GhidraMCPPlugin in the project’s configuration.
  6. Open the program and CodeBrowser if your implementation requires them.

Ghidra’s project settings control whether the plugin is enabled. Make sure the plugin appears in the version of Ghidra that matches its build. A successful install alone does not mean the HTTP service has started.

Some older 2025 instructions say to enable the extension and open CodeBrowser before the server starts. That CodeBrowser step belongs to that older setup, not to every release.

After you restart Ghidra, check the project configuration again if the plugin does not appear. Confirm the plugin is enabled in the Ghidra version that matches the extension.

Connect Claude Code or Claude Desktop

A monitor displays Claude client settings with a Ghidra MCP bridge command, surrounded by tech gadgets and open technical books. Notes and a coffee cup sit on the wooden desk, with programming books and framed certificates on a shelf behind it.
Connect Claude Code or Claude Desktop to the Ghidra MCP bridge by configuring the client command, as shown on the monitor.

Register the bridge executable in your Claude client so Claude can start the MCP process when you need it. Use the command for your project, since separate bridges may have different setup steps.

Claude Code’s general MCP documentation does not give Ghidra-specific commands or settings. Its guide explains how to connect MCP servers, while each Ghidra project supplies its own values.

Register the bridge in Claude Code

LaurieWired documents this Claude Code command: claude mcp add ghidra -- ghidra-mcp. Use it as an example for LaurieWired, not as a command for every project.

For bethington, register the installed bridge-mcp-ghidra executable and follow that project’s client setup. The Claude Code MCP guide covers server connections, but not Ghidra-specific settings.

Add the bridge to Claude Desktop

Claude Desktop uses an mcpServers JSON entry. Set its command to the bridge executable, then save the file in the location used by your client.

{"mcpServers":{"ghidra":{"command":"/absolute/path/bridge-mcp-ghidra","args":[]}}}

The full executable path helps when a desktop app cannot find a command by name. Replace the example path with the location on your computer. If you use Claude for other work, Claude Code and project workflows offer related context.

Use setup instructions for the same project and release that supplied your Ghidra extension.

Confirm the Server Is Running

Test the local connection at http://127.0.0.1:8089/check_connection before asking Claude to analyze a program. A successful response shows that the bethington extension can answer at its check endpoint.

Check the whole launch path, from the open Ghidra project to the client command. The client must find and start the bridge before Claude can use its tools.

  • Confirm Ghidra is open with the plugin enabled.
  • Visit the local check endpoint and look for a successful response.
  • Set the absolute path to the bridge executable.
  • Fully restart Claude after you change its configuration.

A bare command can fail when a desktop client does not inherit your shell’s PATH. PATH is the list of folders a system checks for a program. When Claude reports spawn ENOENT, it could not find the executable, so the bridge never started.

Check that the endpoint uses the right port for your selected implementation. If the client reports spawn ENOENT, replace the bare command with the bridge’s absolute path.

Use the MCP Tools to Analyze a Binary

Start by asking Claude to list a program’s functions and show the evidence behind one function’s behavior. Evidence first keeps a ghidra mcp workflow grounded in what Ghidra can show.

Use tool results to test an idea, not to confirm it by themselves. The bethington project lists 219 MCP tools for binary analysis and related work.

Start with functions and evidence

Ask for ghidra functions, decompilation, call graphs, and cross-references. These views can show what a function calls and which parts of the program point to it.

Search strings and byte patterns to ground the investigation. String tools support extraction, regular-expression search, quality filtering, and discovery of functions anchored to strings. Memory reads and array-boundary tools can add details when a data area is unclear.

Use a five-step workflow to keep the first pass focused:

  1. Request a program overview.
  2. Inspect imports and strings.
  3. Choose one function.
  4. Ask for its evidence and behavior.
  5. Verify before keeping edits.

Build names, types and structures carefully

Claude can suggest new names for functions and variables, then request renaming tools. Review every name before you keep it. A vague label can mislead later work.

Type tools help you audit variables and function inputs. The project also supports struct, union, and enum creation, along with field analysis and naming suggestions.

P-code graph analysis can follow a value forward or backward from a variable or register. Use that view when you need to see how one value affects a later result. Cross-check the result against the function’s code and data.

Document functions in repeatable batches

The function-documentation workflow has seven steps. It covers naming rules, type audits, and verification scoring, so notes follow a repeatable process instead of a one-off guess.

SHA-256 function-hash matching can carry documentation across binary versions when functions match. Batch operations can also cut repeated tool requests. The project reports a 93% reduction in API calls from batch operations, but that figure is not a speed or accuracy promise for every task.

Batch work is useful when many methods need the same kind of review. Still, read the evidence behind each proposed change. Keep a name or type change only when its supporting evidence makes sense in the disassembly.

Trace Behavior With P-Code and Debugger Tools

A computer screen displays Ghidra P-code snippets, value-flow diagrams, and debugger controls. A keyboard, mouse, and reverse-engineering books sit on the workstation, with bookshelves and personal items in the home office behind it.
P-code value flows and debugger controls help trace program behavior, turning Ghidra’s code snippets into a clearer view of how values move.

Use P-code to trace where a value comes from or where it flows next when a function’s output is unclear. Its forward and backward value tracking can help you follow input through later calculations.

Live debugging adds runtime evidence, while P-code helps trace values in the analysis. Choose the method that answers the question you have.

Follow values through P-code

Start from a variable or register, then follow its value through the graph. For example, you can trace input data to see where it changes before a function returns a result.

This can narrow a search when decompiled code has several branches. You can inspect the path that feeds a value, or see how that value flows into later steps.

Use live debugging when the case needs it

The project’s Ghidra debugger integration works with the GUI plugin and provides 16 /debugger/* endpoints through TraceRmi. It can launch, interrupt, or resume a process, step through code, and set breakpoints.

You can also read registers and memory, inspect stack traces, and translate static addresses to runtime addresses. That translation accounts for ASLR, a process that can shift where code appears in memory when a program runs.

The 16 Ghidra debugger endpoints are separate from 22 optional debugger_* tools that the bridge can proxy to an external debugger server. Those external tools are opt-in, so they are not the same as the Ghidra integration.

Choose live debugging only when you need runtime evidence that static analysis cannot settle.

Protect Your Project and Verify AI Changes

Treat an MCP server as software with access to your Ghidra work, not as a harmless chat add-on. Use trusted server code and keep the service on localhost.

Work on a copy and isolate unknown samples from sensitive systems. These steps help limit damage if a tool or sample behaves in an unexpected way.

Keep the server and sample within a safe boundary

Claude Code guidance says to trust an MCP server before connecting it. Review the code and setup for the server you choose, especially when it can change a project.

Keep unknown samples away from work files and sensitive systems. A separate test environment helps you examine a binary without exposing other data.

Review names, types and model conclusions

Tool access can change your Ghidra project. Renaming and typing operations write changes, so review the edits before you keep them.

The project’s v5.0 naming and type rules can silently fix some changes, warn about others, or reject a change with an explanation. These checks help enforce tool rules, but they do not prove that Claude’s interpretation is correct.

Check suggested names and explanations against cross-references, strings, and disassembly. A name that fits one call site may still be wrong elsewhere.

Keep a written distinction between evidence you verified and interpretations Claude only suggested.

What Claude and Ghidra MCP Will Cost

Your Claude cost depends on whether you use Claude Code through a paid plan or automate it with an API key. Ghidra and the MCP project are separate from the cost of Claude access.

Interactive use shares the Claude chat usage pool. In November 2026, Claude Pro costs $20 monthly or $17 monthly with annual billing; Claude Max costs $100 monthly.

API-key automation is billed by input and output tokens. In November 2026, Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens. Opus 5.5 costs $4 and $20, respectively.

Haiku 5.5 prompts up to 100,000 tokens cost $0.10 per million input tokens and $0.50 per million output tokens. The Batch API halves input and output rates for asynchronous jobs, and that discount can stack with prompt-cache pricing.

For more on Claude plans and automation, see Claude workflow and plan details. Estimate API use from the input and output tokens your chosen model will process.

Conclusion

A Ghidra MCP connection is most useful when it makes routine analysis easier while leaving decisions in your hands. Two points matter most: match the extension to its exact Ghidra version, and treat AI findings as proposals to verify.

Start with one authorized sample and ask Claude to inspect one function. Request the evidence behind its explanation, then compare that evidence with the disassembly before you keep any change.

That small test gives you a clear view of how the client, bridge, and extension work together. It also lets you judge whether the tools fit your reverse engineering work.

Start with one authorized sample and verify every change before you rely on it.

FAQ

Can Ghidra MCP run without opening the Ghidra interface?

Yes, LaurieWired documents a headless PyGhidra setup that works without a running Ghidra GUI. That route requires Python 3.10-3.13 and the GHIDRA_INSTALL_DIR environment setting. Headless support is specific to that project, so check its own steps and version requirements. Do not assume the bethington extension uses the same headless setup.

Can the Ghidra extension from one project work with another project’s bridge?

Do not assume that an extension from one project will work with another project’s bridge. Each project builds its own parts, and the extension and bridge may use different settings or communication rules. Use the extension and bridge released for the same project and version. Mixing them can leave the client unable to reach Ghidra.

What does spawn ENOENT mean when Claude starts the bridge?

Spawn ENOENT means Claude could not find the bridge executable, so the bridge did not start. A desktop client may not inherit the PATH used by your terminal. Set the command to the executable’s full path, then fully restart the client. Check for spelling errors and make sure the file exists at that location.

Does a 93% reduction in API calls mean Claude costs 93% less?

No, a 93% reduction in API calls does not mean Claude costs 93% less. That project-reported figure describes fewer calls from batch operations. API-key billing depends on the model’s input and output tokens, not simply the number of calls. A batch request may still process many tokens, so cost can change with the content.

Can Claude reliably identify a program or explain every function?

No, Claude cannot reliably identify every program or explain every function without error. Results can be unclear when the program’s context is missing or code has been changed. Check explanations against strings, cross-references, and disassembly. Treat a suggested name as a useful lead, not proof of what the function does.

Can Claude’s tool use change my Ghidra project?

Yes, Claude’s tool use can change your Ghidra project when you allow write tools. The bethington project includes operations such as renaming and typing, which can alter analysis data. Review each edit and work on a copy of your project. Tool rules may block or flag some edits, but they cannot prove an interpretation is correct.

About the author

Latest Posts