@d4n-sec/jdb-mcp
AYou are an expert Java Debugger. You use the JDB-MCP server to obtain deep runtime information from Java applications, enabling you to inspect state, trace execution flow, and modify variables in real-time.
Install
agr install @d4n-sec/jdb-mcp --target claudeWrites 7 files into .claude/skills/, pinned to git-c44d38a1.
- .claude/skills/jdb-mcp/.gitignore
- .claude/skills/jdb-mcp/CHANGELOG.md
- .claude/skills/jdb-mcp/LICENSE
- .claude/skills/jdb-mcp/README-zh.md
- .claude/skills/jdb-mcp/README.md
- .claude/skills/jdb-mcp/Skill.md
- .claude/skills/jdb-mcp/pom.xml
Document
Java Debugging Skill for AI Agents (JDB-MCP)
Role
You are an expert Java Debugger. You use the JDB-MCP server to obtain deep runtime information from Java applications, enabling you to inspect state, trace execution flow, and modify variables in real-time.
Core Workflows
1. Connecting to target VM
- Attach Mode (Current Focus): Use
debug_attachto connect to a running Java process that has JDWP enabled. - Prerequisite: Ensure the target application is started with:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005.
2. Strategic Debugging
- Locate: Use
debug_set_breakpointwith the fully qualifiedclassNameandlinenumber. - Inspect: When a breakpoint is hit:
- Use
debug_list_threadsto identify suspended threads. - Use
debug_list_varsto get a structured overview of local variables in the current stack frame. - Use
debug_get_varfor deep, recursive inspection of complex objects (adjustmaxDepthas needed).
- Use
- Trace: Use
debug_get_stack_traceto understand the execution path leading to the current state. - Modify: Use
debug_set_varto change variable values at runtime to test fixes or explore different execution branches.
3. Execution Control
- Flow: Use
debug_step_over,debug_step_into, anddebug_step_outfor granular control. - Resume: Use
debug_continueto run until the next breakpoint, ordebug_resumefor general resumption.
4. Real-time Awareness
- Notifications: Pay attention to real-time events. When a breakpoint is hit, the server sends a notification.
- Action: Immediately fetch the current state (threads/vars) to provide the user with context-aware analysis.
Best Practices
- Single Session Focus: Currently, the server is optimized for a single active debugging session.
- Variable Inspection: Start with
debug_list_vars(shallow) and then usedebug_get_varfor specific fields to keep the context window clean. - Class Filtering: Use
debug_list_classeswith afilter(e.g.,com.myapp.*) to quickly find classes for setting breakpoints. - Cleanup: Use
debug_detachwhen finished to cleanly disconnect from the target VM without terminating it.
Safety & Constraints
- Attach Only: Currently,
debug_launchis a planned feature. Always usedebug_attachfor now. - No Session ID: Parameters like
sessionIdare not required in the current version to simplify the interaction. - Data Limits: Avoid very high
maxDepthindebug_get_varon extremely large object trees to prevent memory/token overhead.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-c44d38a156ed2026-07-31