Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/fgforrest/mcp-jdwp-java/claude-mdgit clone --depth 1 https://github.com/FgForrest/mcp-jdwp-javaWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01387 | $0.01387 |
| Opus 5 | $0.00694 | $0.00694 |
| Sonnet 5 | $0.00277 | $0.00277 |
| Haiku 4.5 | $0.00139 | $0.00139 |
Grade A, and why
mcp-jdwp-java CLAUDE.md 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build Commands
# Run from the reactor root. Builds both modules.
# Prefer ./mvnw (the bundled Maven Wrapper) — it pins the Maven version and
# does not require Maven to be installed system-wide. Plain `mvn` works too
# if it is on PATH.
./mvnw compile # Compile only
./mvnw clean package -DskipTests # Full build (produces jdwp-mcp-server/target/mcp-jdwp-java.jar)
# Build only the MCP server (skips the sandbox module entirely):
./mvnw -pl jdwp-mcp-server -am clean package -DskipTests
The repository is a 2-module Maven reactor:
jdwp-mcp-server/— the real MCP server. Contains all genuine unit tests;./mvnw -pl jdwp-mcp-server testruns them.jdwp-sandbox/— deliberately broken Java classes used as JDWP debugging targets ("test flights"). Sandbox tests are expected-to-fail by design and are skipped by default so a normal./mvnw teststays green. Run them explicitly during a test flight with:./mvnw -pl jdwp-sandbox test -DskipTests=false.
The compiler requires --add-modules jdk.jdi (configured in jdwp-mcp-server/pom.xml). At runtime, the JAR must also be launched with --add-modules jdk.jdi.
Architecture
This is a Spring Boot MCP Server that lets Claude Code inspect and control running Java applications via JDWP (Java Debug Wire Protocol). It connects directly to a target JVM's JDWP port (default 5005).
Claude Code ──MCP/STDIO──> Spring Boot MCP Server ──JDI──> Target JVM (port 5005)
Core Components
- JDWPTools — Exposes ~30 MCP tools via
@McpToolannotations. This is the main interface: connection, thread/stack/variable inspection, breakpoints, stepping, and watcher evaluation. All tool methods return formattedStringresponses. - JDIConnectionService — Singleton holding the persistent
VirtualMachine(JDI) connection. Manages object caching (ConcurrentHashMap<Long, ObjectReference>) and smart collection rendering (ArrayList, HashMap, HashSet internals). Also drives classpath discovery for expression evaluation. - BreakpointTracker — Maintains a registry of breakpoints with synthetic integer IDs (since JDI
BreakpointRequesthas no user-facing ID). Tracks the last thread that hit a breakpoint. - JdiEventListener — Daemon thread consuming the JDI event queue. Updates
BreakpointTrackeron breakpoint/step events. Breakpoint events do NOT auto-resume — threads stay suspended for user inspection.
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.
- 2d ago First seen · 76 lines · 1,387 tokens per session scan A c400464d039f
mcp-jdwp-java CLAUDE.md is an instructions file published in the GitHub repository FgForrest/mcp-jdwp-java (24 stars, last pushed 1mo ago), licensed MIT. It adds 1,387 tokens to every session, about $0.0069 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
jdbg AGENTS.md
Instructions for PieceOfFall/jdbg, covering agents.md — java-agent-debugger (jdbg), what this project is (one paragraph), binding constraints (do not violate without asking), mcp server rules and jdi sidecar rules.
jdbg CLAUDE.md
Instructions for PieceOfFall/jdbg, covering claude.md — java-agent-debugger (jdbg), what this project is (one paragraph), binding constraints (do not violate without asking), mcp server rules and jdi sidecar rules.
jdwp-mcp CLAUDE.md
Claude Code instructions for dronsv/jdwp-mcp, covering claude.md, what this is, build commands, architecture and jdwp-client crate.
DebugMCP AGENTS.md
Instructions for microsoft/DebugMCP, covering agent guidelines for debugmcp, project overview, architecture, key components and documentation maintenance.
jlink-mcp CLAUDE.md
Instructions for Klievan/jlink-mcp, covering j-link mcp server, building, testing, vscode extension (native mcp integration) and standalone mcp server (for claude desktop / claude code).
debug-that CLAUDE.md
Instructions for theodo-group/debug-that, covering debug-that — debugger cli for ai agents, project overview, tech stack, project structure and commands.