JDWP

v1.0.0Developer Toolsstable

Сonnects to live JVMs via JDWP protocol, enabling LLM agents to autonomously debug Java applications — attach to a running process, pause threads, set breakpoints (including conditional), inspect stacks with auto-resolved object fields, evaluate meth

jdwpmcpai-integration
Share:
40
Stars
0
Downloads
0
Weekly
0/5

What is JDWP?

JDWP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to сonnects to live jvms via jdwp protocol, enabling llm agents to autonomously debug java applications — attach to a running process, pause threads, set breakpoints (including conditional), inspect stac...

Сonnects to live JVMs via JDWP protocol, enabling LLM agents to autonomously debug Java applications — attach to a running process, pause threads, set breakpoints (including conditional), inspect stacks with auto-resolved object fields, evaluate meth

This server falls under the Developer Tools and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Сonnects to live JVMs via JDWP protocol, enabling LLM agents

Use Cases

Debug Java applications autonomously by attaching to live JVMs via JDWP protocol. Set conditional breakpoints and inspect object stacks with auto-resolved fields.
dronsv

Maintainer

LicenseMIT License
Languagerust
Versionv1.0.0
UpdatedMay 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx jdwp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use JDWP

jdwp-mcp is a Rust-based MCP server that connects to live Java Virtual Machines via the Java Debug Wire Protocol (JDWP), enabling AI agents to autonomously debug Java applications through natural language. It exposes tools for attaching to running JVMs, pausing threads, setting conditional breakpoints, inspecting stack frames with auto-resolved object fields, evaluating expressions, tracing method calls, and identifying deadlocks or lock contention — all within a single conversational loop. Developers use it to diagnose hanging requests, exceptions, and unexpected code paths in Java services without needing an IDE.

Prerequisites

  • Java application running with JDWP enabled (requires the -agentlib:jdwp JVM argument)
  • Python or Cargo available to install jdwp-mcp (pip install jdwp-mcp is the simplest method)
  • Network access to the JDWP port of the target JVM (default 5005)
  • An MCP-compatible client such as Claude Code or Cursor
1

Install jdwp-mcp

Install jdwp-mcp using pip, which is the simplest installation method. Alternatively use cargo or a pre-built binary.

pip install jdwp-mcp
# Or with cargo:
cargo install --git https://github.com/dronsv/jdwp-mcp
# Or pre-built binary:
curl -fsSL https://raw.githubusercontent.com/dronsv/jdwp-mcp/main/install.sh | sh
2

Start your Java application with JDWP enabled

Launch your Java application with the JDWP agent configured for TCP socket transport. Use suspend=n to allow the JVM to start normally and attach later.

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar app.jar
3

Add jdwp-mcp to your MCP client

For Claude Code, use the mcp add command. For other clients, add the server to your .mcp.json or settings file.

# Claude Code:
claude mcp add jdwp jdwp-mcp

# Or in .mcp.json:
{
  "mcpServers": {
    "jdwp": {
      "command": "jdwp-mcp"
    }
  }
}
4

Optionally enable auto-approve for jdwp tools

Debugging involves many rapid tool calls (attach, pause, inspect, step). Auto-approving jdwp tools eliminates confirmation prompts for a smoother session.

# Project-scoped auto-approve in Claude Code:
claude config set --project allowedTools 'mcp__jdwp__*'
5

Start a debugging session

Send a natural language prompt to your MCP client describing the problem. The agent attaches, pauses threads, inspects state, and reports findings.

# Example prompt:
# "Attach to localhost:5005 and find out why a query is stuck"

JDWP Examples

Client configuration

MCP configuration for jdwp-mcp in a .mcp.json file. No environment variables required — the server uses JDWP protocol over TCP.

{
  "mcpServers": {
    "jdwp": {
      "command": "jdwp-mcp"
    }
  }
}

Prompts to try

These prompts drive the jdwp-mcp tools to diagnose real Java runtime problems.

- "Attach to localhost:5005 and find out why a query is stuck"
- "Attach to localhost:5005, set an exception breakpoint for NullPointerException, wait for it to fire, then show the stack and all local variables"
- "Attach to localhost:5005 and trace method calls on com.example.service while I send an HTTP request"
- "Pause the JVM at localhost:5005 and find all blocked or waiting threads"
- "Attach to localhost:5005, find classes matching UserService, list methods with line numbers, and set a breakpoint at line 45"

Troubleshooting JDWP

Connection refused when attaching to localhost:5005

The Java application must be started with -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005. Verify with `netstat -an | grep 5005` that the port is open. For Docker or Kubernetes, ensure the port is published or port-forwarded (kubectl port-forward works well).

Pausing threads disrupts production traffic

JDWP pause operations halt all threads on the JVM. Only use jdwp-mcp in development, staging, or during controlled maintenance windows. For production diagnosis, use the trace tool which has lower impact than a full pause.

jdwp-mcp command not found after pip install

Ensure the pip install location is in your PATH. On some systems pip installs scripts to ~/.local/bin — add that to your PATH with `export PATH=$PATH:~/.local/bin`. Alternatively use the cargo or binary install method.

Frequently Asked Questions about JDWP

What is JDWP?

JDWP is a Model Context Protocol (MCP) server that сonnects to live jvms via jdwp protocol, enabling llm agents to autonomously debug java applications — attach to a running process, pause threads, set breakpoints (including conditional), inspect stacks with auto-resolved object fields, evaluate meth It connects AI assistants to external tools and data sources through a standardized interface.

How do I install JDWP?

Follow the installation instructions on the JDWP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with JDWP?

JDWP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is JDWP free to use?

Yes, JDWP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "jdwp": { "command": "npx", "args": ["-y", "jdwp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use JDWP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides