JDWP
С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
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
Maintainer
Works with
Installation
Manual Installation
npx jdwpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 | shStart 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.jarAdd 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"
}
}
}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__*'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.
JDWP Alternatives — Similar Developer Tools Servers
Looking for alternatives to JDWP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up JDWP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.