For Claude Code, Cursor, Codex & every MCP agent
The IDE your AI agent is missing — for Java, Kotlin and every JVM jar.
Members, method bodies, usages, type hierarchies and call graphs for any JVM jar, Maven coordinate or the JDK — one precise answer per command.
curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh | bashQuickstart Connect your agent Star on GitHub
Apache-2.0 · JDK 21+ · Linux, macOS, Windows · read-only: never runs code from the jars it inspects
jdx members java.util.HashMap --limit 5
members of java.util.HashMap
constructors declared on java.util.HashMap:
constructor public HashMap()
constructor public HashMap(int initialCapacity)
constructor public HashMap(int initialCapacity, float loadFactor)
constructor public HashMap(java.util.Map<? extends K, ? extends V> m)
methods declared on java.util.HashMap:
method public V compute(K key, java.util.function.BiFunction<? super K, ? super V, ? extends V> remappingFunction)
+ 7 from java.lang.Object (--from java.lang.Object to expand)
5 of 53 members shown (--limit 53 to see more)
source: java.base (jrt)
jdx body 'java.util.HashMap#get(java.lang.Object)'
java.util.HashMap#get(java.lang.Object)
source: src.zip · java.base/java/util/HashMap.java:562-565
public V get(Object key) {
Node<K,V> e;
return (e = getNode(key)) == null ? null : e.value;
}
next: jdx show java.util.HashMapProof, not promises
One real task — list Gson's API, then show only
toJson(Object) — measured on gson-2.14.0:
| Approach | calls | bytes in context (~tokens) |
|---|---|---|
unzip + javap + grep + sed |
5 | ~17.5 KB (~4.4k) — and head -200 misses the method (line 542 of 1265) |
jdx members + jdx body |
2 | ~4.6 KB (~1.2k) — exact method, 267 bytes (~67 tokens) |
The body alone: 267 bytes vs 60,590 (javap -c, 226×) vs 58,251 (full
Gson.java, 218×). Tokens ≈ bytes/4. Reproduce it: sh docs/bench-compare.sh.
An IDE, not a better javap
- Inherited members resolved transitively
With generic substitution — the agent never walks a class hierarchy by hand again.
- A real index
So find usages, implementors, and call hierarchy work across an entire classpath, not just one jar.
- Sources when they exist, decompilation when they don't
Uniformly, behind one command.
- True Kotlin signatures
From
@Metadata:suspend, properties, default arguments,@JvmNamemappings — not the misleading JVM projection. - Javadoc/KDoc
Including documentation inherited from a supertype.
jdx samplesReal call sites from the classpath as usage examples. Evidence instead of recollection.
jdx literalsSearch string constants (
LDC/ConstantValue) and.propertieskeys/values across a workspace for resource keys, log messages, and markers (issue #86). No moreunzip | tr | grep.jdx servicesList
META-INF/servicesSPI providers across a workspace (issue #25). Answer "who providescom.foo.Spi?" without unzipping jars.jdx modulesList JPMS
module-infodescriptors (requires / exports / opens / uses / provides) across jars and the running JDK (issue #25).jdx manifestList
META-INF/MANIFEST.MFattributes across a workspace (issue #25): main attributes by default (Main-Class,Multi-Release, …);--entriesfor per-entry (JarEntry) sections.jdx resourcesList non-class resource paths (
META-INF/…,.properties, versionedMETA-INF/versions/…copies, …) across a workspace (issue #25);--catprints the unique match's text (binary payloads refuse to dump bytes).jdx diff a.jar b.jarThe public-API diff for a dependency upgrade, with every difference named as a rule (
MEMBER_REMOVED,RETURN_TYPE_CHANGED, …) atbreaking/suspicious/info, and a--fail-ongate for CI.
Built for agents, not humans
- Minimal correct output.
Bounded, with an explicit hint for getting the rest. Never a file dump when a method was asked for.
- Never guesses.
An ambiguous reference exits
2and lists every candidate as a copy-pasteable reference. - Machine-legible outcomes.
Distinct exit codes for not found, ambiguous, no index, bad usage — branch without parsing prose.
--jsonfor everything. - Provenance on every answer
Which jar, sources, lexer, or bytecode, which decompiler.
jdx batchMany queries, one process, one index load.
- Four front-ends over one engine:
One-shot CLI, MCP server, a daemon, and a local HTTP/JSON API.
jdx help --agentA compact paste-ready block for
CLAUDE.md/ system prompts.
One command per question
Every IDE gesture an agent needs, as a command with a precise, bounded answer. Click any for real output.
jdx show <type>Go to declarationjdx members <type> --inheritedCode completion after.jdx outline <type>File structurejdx signature <member>Parameter infojdx doc <symbol>Quick documentationjdx body <member>Open the methodjdx source <type>Open the file / decompilejdx search <pattern>Search types/packages/modules (pass --kind method|field for members)jdx resolve <name>What is this symbol?jdx ls [package]External library browser (packages/types)jdx tree [artifact]External library browser (artifacts)jdx usages <symbol>Find usagesjdx annotated <annotation>Classes/members carrying an annotation (recipes: deprecated|forRemoval|test|bean)jdx hierarchy <type>Type hierarchyjdx implementors <type>Who implements this?jdx callers <member>Call hierarchy (in)jdx calls <member>Call hierarchy (out)jdx samples <symbol>Real call sites as usage examplesjdx literals <text>Search string constants (LDC / ConstantValue / .properties)jdx services [pattern]META-INF/services SPI providersjdx modules [pattern]JPMS module-info (requires/exports/opens/…)jdx manifest [pattern]META-INF/MANIFEST.MF attributes (--entries for JarEntry)jdx resources [pattern]non-class resource paths (--cat text, --check mod metadata)jdx diff <old> <new>Public-API diff + binary-compat warnings (upgrades)jdx versionPrint the jdx versionjdx upgrade [--check]Self-update from GitHub Releasesjdx doctorSelf-diagnosis (JDK, index, AppCDS, daemon, workspace)jdx ws create|Project and library configurationlist| info| remove| add| use jdx cache info|Index and cache maintenancegc| clear jdx kotlin installFetch the Kotlin PSI sidecar (Kotlin sources)jdx daemon start|Warm background JVM (5-min idle shutdown)stop| status| restart jdx serve [--port 7070]Local HTTP/JSON APIjdx setup --agent opencode|Wire jdx into an agent (OpenCode, Claude Code, Cursor, Kilo Code, Cline, Codex CLI, GitHub Copilot CLI, Antigravity, Windsurf, Aider/AiderDesk)claude-code| cursor| kilo| cline| codex| copilot| antigravity| windsurf| aider --scope project| system jdx mcpMCP stdio server (typed jdx_* tools)jdx batchMany queries, one process (NDJSON in/out)jdx bench [--iterations 3]Benchmark the read path (timings + §15 targets; --include-usages times the live scan)jdx help [--agent]This cheat sheet
Guides
Task pages for finding a class, reading a jar, decompiling without a GUI, reading its Javadoc, reading a Kotlin API from a jar, picking a mixin target, diffing two versions, and wiring an agent.
- Find class in jarList classes in a jar, and search jar files or Maven dependencies.
- Read and decompile a JAR from the terminalList a jar, open one method, and view source.
- Read Javadoc from a jar in the terminalJavadoc of a class or method in a jar, a Maven dependency, or the JDK.
- Read a Kotlin library API from a compiled jarSuspend, nullability, and properties from Kotlin metadata in a jar.
- A javap alternative for class filesSignatures, one method's bytecode, callers, and implementors.
- JD-GUI alternative: decompile a jar without a GUIA command line Java decompiler for one class, a search, or one method.
- Inspect a Minecraft mod jarMembers, source, and a decompiled method, without remapping.
- Find which mod causes it in a Minecraft modpackWhich jar logs a message, ships a duplicate class, or mixes into a class.
- Find which mod adds an item, block, or translation keySearch in-game names and lang keys across a mods folder.
- Find a Mixin target in Minecraft from the terminalMixin target method, method descriptor, and injection point.
- See what changed between two Minecraft or mod versions with jdx diffPublic API changes between two mapped jars, then one member.
- Java MCP server for JVM bytecodeTyped tools for Claude Code, Cursor, and Codex.
- Read Java dependencies without a source dumpOutline and one method body, for a smaller answer.
- API diff for a Java dependency upgradeWhat a new jar version breaks, as named rules.
Works with your agent
One MCP server, wired in with one command: jdx setup --agent <name> --scope project.
Same task, two agents
Left: an agent with javap and grep. Right: the same agent with jdx. Task: find every System.exit call site in java.base.
Questions
What is jdx?
jdx is an IDE for AI agents, as a command line tool. It answers the questions an IDE answers for a human — what members a class has, what a method does, who calls it, what implements an interface, what an upgrade breaks — for any JVM jar, Maven coordinate, class or source directory and the JDK. It ships as a CLI and as an MCP server. See the introduction.
Which AI agents does it work with?
Any agent that speaks the Model Context Protocol or can run shell commands. jdx setup wires it into Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, Antigravity, OpenCode, Kilo Code and Cline with one command; other MCP clients take a one-line config. Clients that install an MCP Bundle use the jdx-mcp-<version>.mcpb asset from the release. See Use with AI agents, An MCP server for Java and Kotlin bytecode, and Installation.
How is it different from javap, unzip and grep?
Those tools answer one low-level question each, so an agent chains several of them and reads large outputs into its context. jdx answers the actual question in one command: only the method you asked for, inherited members resolved transitively with generics, usages across every jar, real source when a sources jar exists, and a labelled decompilation when it does not. On a measured task it used 2 calls and about a quarter of the bytes. See Find which JAR contains a class, Read and decompile a JAR from the terminal, Read Javadoc from a jar, A javap alternative, and the README benchmark.
Does it run code from the jars it inspects?
No. jdx parses bytecode with ASM and never loads inspected classes, so no static initialiser or any other code from those jars ever runs. It also never writes outside its own cache, config and runtime directories.
Does it need the library's sources?
No. With a -sources.jar (or a source directory, or the JDK's src.zip) it shows real source. Without one it decompiles with Vineflower and marks the result as reconstructed, and --engine javap shows raw bytecode. When Vineflower returns only a $VF: Could not decompile… stub (common for suspend lambdas), the default ladder falls through to javap automatically instead of serving the stub. Structure always comes from bytecode, so member lists and signatures are exact either way. jdx doc reads javadoc from those sources. A library class with no paired -sources.jar, and a JDK class whose distribution ships no src.zip, each exit 1 and the message names the missing sources. See Read Javadoc from a jar in the terminal.
Give your agent an IDE in 30 seconds
curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh | bash