Get the FREE Ultimate OpenClaw Setup Guide →

jdwp

Java debugging for LLMs via JDWP and Model Context Protocol

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio navicore-jdwp-mcp cargo run --release \
  --env RUST_LOG="info"

How to use

The jdwp MCP server provides a bridge between Java applications protected by the Java Debug Wire Protocol (JDWP) and Claude Code / LLM tooling. It enables remote debugging of JVMs by attaching to a JDWP-enabled target, managing breakpoints, inspecting stack frames and variables, and controlling execution (pause, resume, step over/into/out). You can issue natural-language style commands to connect to a running JVM, set breakpoints by class and line, view stacks with local variables, evaluate expressions in the current frame, and manage threads. The server translates MCP JSON-RPC calls to JDWP protocol messages, handles summarization and context filtering to keep responses concise for the LLM, and maintains session state across interactions.

How to install

Prerequisites:

  • Rust toolchain (rustc and cargo)
  • Java application to debug with JDWP enabled
  • Access to the repository (clone of jdwp-mcp)

Installation steps:

  1. Clone the repository: git clone https://github.com/your-org/jdwp-mcp.git cd jdwp-mcp

  2. Build the MCP server in release mode: cargo build --release

  3. Run the MCP server: cargo run --release

  4. Ensure your Java application is started with JDWP enabled, e.g.: java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar myapp.jar

  5. Connect Claude Code (or your MCP client) to the running server using the configured endpoint (defaulting to localhost and the port handled by your runtime).

Notes:

  • You may wish to set environment variables or adjust logging for debugging purposes (see RUST_LOG in the example config).
  • If you deploy in Kubernetes or Docker, provide the appropriate port-forwarding or service exposure to reach the JDWP port.

Additional notes

Tips and considerations:

  • Ensure the JDWP agent is enabled on the target JVM before attempting to connect.
  • Breakpoints can be set by class name and line number; use fully-qualified names to avoid ambiguity.
  • The MCP server supports stack inspection, breakpoint management, and expression evaluation; complex object graphs may require summarization to avoid overwhelming the LLM.
  • If you encounter networking issues, verify firewall rules and that the JDWP port is reachable from the MCP server.
  • Use the available tools list as a quick reference for the supported MCP commands (debug.attach, debug.set_breakpoint, etc.).

Related MCP Servers

Sponsor this space

Reach thousands of developers