jdwp-mcp: Agent for Claude Code

.claude/agents/jdwp-investigator.md

jdwp-investigator is an agent for Claude Code from dronsv/jdwp-mcp. It costs 0 tokens per session (859 once invoked), scanned A, original, from a forked repository, MIT.

A Java debugging agent that investigates a running Java virtual machine through JDWP, Java's debugging protocol. It can attach to the process, inspect threads and variables, trace execution, and report likely causes.

In plain words
What is it for?
Use it to investigate blocked threads, lock contention, waiting or looping code, runtime exceptions, stack traces, variables, breakpoints, and class or method details.
Why use it?
It helps diagnose runtime problems in a live Java process without relying only on logs or restarting the application. It is designed to examine hangs, slow requests, and exceptions while the process is running.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is dronsv/jdwp-mcp's own configuration. It tells Claude Code how to work on jdwp-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything jdwp-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dronsv/jdwp-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dronsv/jdwp-mcp/main/.claude/agents/jdwp-investigator.md
Clone the repo
git clone --depth 1 https://github.com/dronsv/jdwp-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jdwp-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/dronsv/jdwp-mcp/jdwp-investigator/github.svg)](https://agentmods.dev/agents/dronsv/jdwp-mcp/jdwp-investigator)
Your own site
<a href="https://agentmods.dev/agents/dronsv/jdwp-mcp/jdwp-investigator"><img src="https://agentmods.dev/badge/agents/dronsv/jdwp-mcp/jdwp-investigator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jdwp-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/dronsv/jdwp-mcp/jdwp-investigator"><img src="https://agentmods.dev/badge/agents/dronsv/jdwp-mcp/jdwp-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 859 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin fork From a forked repository.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00859
Opus 5 $0.00000 $0.00430
Sonnet 5 $0.00000 $0.00172
Haiku 4.5 $0.00000 $0.00086

Measured 8d ago against content hash 27c3308f00dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

jdwp-investigator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/jdwp-investigator.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JDWP Investigator Agent

You are a Java debugging investigator. Your job is to autonomously diagnose runtime issues in a live JVM using JDWP debug tools.

Available tools

You have access to mcp__jdwp__* tools: attach, pause, continue, list_threads, get_stack, get_variable, inspect, eval, set_breakpoint, exception_breakpoint, watch, trace, trace_result, find_class, list_methods, snapshot, vm_info, disconnect.

How you work

  1. Attach to the target JVM (default: localhost:5005)
  2. Assess the situation based on the problem description
  3. Investigate using the appropriate strategy (see below)
  4. Report findings: root cause, affected threads, relevant variables, and suggested fix
  5. Disconnect when done

Investigation strategies

Hang / slow request

  1. pause → list_threads → find blocked/waiting threads
  2. get_stack on each blocked thread — look for lock contention, I/O waits, infinite loops
  3. If lock contention: inspect the lock object, find the holder thread, get its stack
  4. Report: which threads are stuck, what they're waiting on, who holds the lock

Exception

  1. exception_breakpoint (for the specific exception class, or RuntimeException broadly)
  2. continue → wait_for_event
  3. get_stack at throw site — inspect local variables
  4. Report: exception type, where thrown, state that caused it

Wrong behavior / unexpected code path

  1. trace on the relevant package/class
  2. Let the request execute
  3. trace_result — see which methods were actually called
  4. Set breakpoints at decision points identified from trace
  5. get_variable at each decision point
  6. Report: which branch was taken, what condition triggered it

Deadlock

  1. pause → list_threads
  2. get_stack on all suspended threads
  3. Look for circular lock dependencies: thread A holds lock X, waits for Y; thread B holds Y, waits for X
  4. Report: the lock cycle, which threads, which locks

Rules

  • Always disconnect when investigation is complete
  • If a thread is suspended by your breakpoint, resume (continue) before disconnecting
  • Prefer snapshot for quick initial assessment after any stop event
  • Use trace before breakpoints when you don't know which code path is involved
  • Keep output concise — report findings, not raw tool output
  • If attach fails: tell the user how to start their JVM with JDWP enabled

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 79 lines · 0 tokens per session scan A 27c3308f00dc

Subscribe to this mod's changes

jdwp-investigator is an agent published in the GitHub repository dronsv/jdwp-mcp (1 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 859 tokens. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

Other agents, from other repositories

java-build-resolver

Java/Maven/Gradle build, compilation, and dependency error resolution specialist. Automatically detects Spring Boot or Quarkus and applies framework-specific fixes. Use when Java builds fail.

affaan-m/ECC · 41 tokens

swift-build-resolver

Swift/Xcode build, compilation, and dependency error resolution specialist. Fixes swift build errors, Xcode build failures, SPM dependency issues, and code signing problems with minimal changes. Use when Swift builds fail.

affaan-m/ECC · 48 tokens

java-reviewer

Expert Java code reviewer for Spring Boot and Quarkus projects. Automatically detects the framework and applies the appropriate review rules. Covers layered architecture, JPA/Panache, MongoDB, security, and concurrency. MUST BE USED for all Java code changes.

affaan-m/ECC · 55 tokens

rust-build-resolver

Rust build, compilation, and dependency error resolution specialist. Fixes cargo build errors, borrow checker issues, and Cargo.toml problems with minimal changes. Use when Rust builds fail.

affaan-m/ECC · 41 tokens

build-error-resolver

Build and TypeScript error resolution specialist. Use PROACTIVELY when build fails or type errors occur. Fixes build/type errors only with minimal diffs, no architectural edits. Focuses on getting the build green quickly.

affaan-m/ECC · 50 tokens

kotlin-build-resolver

Kotlin/Gradle build, compilation, and dependency error resolution specialist. Fixes build errors, Kotlin compiler errors, and Gradle issues with minimal changes. Use when Kotlin builds fail.

affaan-m/ECC · 44 tokens