
d4n-sec/jdb-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Java Debugger MCP Server. Enables AI agents to debug live Java apps via JDI with breakpoints, stack tracing, and variable inspection.
개요
JDB-MCP is a Model Context Protocol (MCP) server based on the Java Debug Interface (JDI). It enables AI agents (such as Claude, Cline, Trae) to perform deep runtime debugging of Java applications. - : Supports both stdio (standard VSCode integration) and http (for remote/curl debugging). - : - Attach to running processes (debug_attach) - Supports any Java application (SpringBoot, Maven, Gradle, etc.) with JDWP enabled. - Breakpoint management (debug_set_breakpoint, debug_set_watchpoint) - Flow control (Step Over, Step Into, Step Out, Resume) - State inspection (Stack trace inspection, deep structured variable traversal) - Thread & Class inspection (debug_list_threads, debug_list_classes) - Dynamic modification (Change variable values at runtime) - : Currently focused on single-session debugging, eliminating the need for complex sessionId management. - : The target Java application must be started manually with JDWP options enabled.
README
원문 README의 일부입니다. 원문 보기.
JDB-MCP: Java Debugger MCP Server
JDB-MCP is a Model Context Protocol (MCP) server based on the Java Debug Interface (JDI). It enables AI agents (such as Claude, Cline, Trae) to perform deep runtime debugging of Java applications.
Demo
Key Capabilities
- Multi-transport Support: Supports both
stdio(standard VSCode integration) andhttp(for remote/curl debugging). - Full-featured Debugging (Attach Mode Only):
- Attach to running processes (
debug_attach) - Supports any Java application (SpringBoot, Maven, Gradle, etc.) with JDWP enabled. - Breakpoint management (
debug_set_breakpoint,debug_set_watchpoint) - Flow control (Step Over, Step Into, Step Out, Resume)
- State inspection (Stack trace inspection, deep structured variable traversal)
- Thread & Class inspection (
debug_list_threads,debug_list_classes) - Dynamic modification (Change variable values at runtime)
- Attach to running processes (
- Simplified Design: Currently focused on single-session debugging, eliminating the need for complex
sessionIdmanagement. - Manual Debug Mode Required: The target Java application must be started manually with JDWP options enabled.
- Real-time Awareness: Leveraging MCP Notifications, AI agents are immediately notified when a breakpoint is hit.
Installation & Build
Prerequisites
- JDK 17+ (with JDI module)
Build fatJAR
# Build all modules and generate JARs in the `release/` directory
mvn clean package
# Or build for a specific JDK version:
# For JDK 17+ (Recommended)
mvn clean package -pl jdb-mcp-jdk17 -am
# For JDK 7 (Legacy Support)
mvn clean package -pl jdb-mcp-jdk7 -am
The executable JARs will be located in the release/ directory:
release/jdb-mcp.jar(JDK 17+)release/jdb-mcp-jdk7.jar(JDK 7)
Configuration & Usage
Startup Options
--transport: Set transport mode (default:stdio).--notifications: Enable real-time AI notifications (default:true).
For detailed tool parameter analysis, please refer to the Parameter Guide.
Usage in VSCode (Cline/Claude Dev)
Add the following configuration to your MCP settings:
{
"mcpServers": {
"jdb-debugger": {
"command": "java",
"args": [
"-jar",
"path/to/jdb-mcp.jar"
]
}
}
}
How to Debug (Attach Mode)
Important: You must manually start your target Java application with JDWP enabled.
- Start your project:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar your-app.jar - In the AI chat, request:
Attach to localhost:5005 and debug...
Tool List
debug_attach: Attach to an existing debug port via Socket.debug_list_threads: List all threads and their status.debug_list_classes: List loaded classes with optional filtering.
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"jdb-debugger": {
"command": "java",
"args": [
"-jar",
"path/to/jdb-mcp.jar"
]
}
}
}