Borrowing it
Nothing to install: this file belongs to FgForrest/mcp-jdwp-java. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/FgForrest/mcp-jdwp-java/main/AGENTS.mdgit clone --depth 1 https://github.com/FgForrest/mcp-jdwp-javaWrote 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.
[](https://agentmods.dev/instructions/fgforrest/mcp-jdwp-java/agents-md)<a href="https://agentmods.dev/instructions/fgforrest/mcp-jdwp-java/agents-md"><img src="https://agentmods.dev/badge/instructions/fgforrest/mcp-jdwp-java/agents-md/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.
<a href="https://agentmods.dev/instructions/fgforrest/mcp-jdwp-java/agents-md"><img src="https://agentmods.dev/badge/instructions/fgforrest/mcp-jdwp-java/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02907 | $0.02907 |
| Opus 5.5 | $0.01163 | $0.01163 |
| Sonnet 5.5 | $0.00581 | $0.00581 |
| Haiku 4.5 | $0.00291 | $0.00291 |
Grade A, and why
mcp-jdwp-java AGENTS.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 4d 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 — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to coding agents (Claude Code, Codex) when working with code in this repository. Codex reads it directly; Claude Code loads it through CLAUDE.md, which imports it.
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 50 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, ConcurrentHashMap internals). Caches the target classpath on first use by the compiler. - BreakpointTracker — Maintains a registry of breakpoints with synthetic integer IDs (since JDI
BreakpointRequesthas no user-facing ID). Keeps the last published stop's report for display; which stop is current isSuspensionSession's call. - JdiEventListener — Daemon thread consuming the JDI event queue; the event sets are processed in order on a
jdi-event-dispatcherthread, except a set raised inside an MCP-driven evaluation, which the listener suppresses and releases at once. Handlers only propose stop candidates;SuspensionSession.finishpublishes the first one or releases the set. A published stop stays suspended for user inspection. - SuspensionSession (#45) — One per connection; every routed event set is a context (QUEUED → PROCESSING → HELD | RELEASED) and only its context releases its suspension. Tools release only stops a tool has presented, plus
jdwp_suspend_threadholds — never blindly. It also runs steps, thejdwp_resetgeneration and invocation leases (admission, exemptions, ownership transfer). SuspensionWatchdog frees a dispatcher evaluation stuck on a monitor a queued set's thread holds; InvocationRunner bounds a tool's invocation at 20 s ([STILL_RUNNING], laterEVALUATION_COMPLETED_LATE). Seedocs/event-pipeline.md§ 14.
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.
- 4d ago Changed · +31 tokens per session d05bc94f72db
- 5d ago Changed · +25 tokens per session c1184a9187c6
- 6d ago Changed · +145 tokens per session f2503430b708
- 7d ago First seen · 87 lines · 2,706 tokens per session scan A a3d873e7e778
mcp-jdwp-java AGENTS.md is an instructions file published in the GitHub repository FgForrest/mcp-jdwp-java (36 stars, last pushed 5d ago), licensed MIT. It adds 2,907 tokens to every session, about $0.0116 per session on Opus 5.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-11-23.
mcp-jdwp-java AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mcp-jdwp-java AGENTS.mdFgForrest/mcp-jdwp-java | Instructions file | 36 | 5d ago | MIT | A | 2,907 | Claude Code, Codex, OpenCode |
| vibetags com-example-service-TransactionalPaymentService.instructions.mdPIsberg/vibetags | Instructions file | 26 | today | MIT | A | 104 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,303 | GitHub Copilot |