When an assistant is reasoning about a third-party class, the honest answer usually needs the actual code — and in a Gradle project that code is inside a jar with no sources attached. This closes that gap: name the class, get the source, including a Kotlin-aware decompilation when the sources are missing.
A Java MCP server that resolves a Gradle project's dependencies, locates a class by name across them and the JDK, and returns its source code or a decompilation. It understands short class names, so you can ask without the full package path.
- `find_class` — give a workspace directory and a class name, get the jar and location it resolves to
- `get_source_code` — give a jar path and a class name, get the source or decompiled code back
- Lookup across the project's declared dependencies and the JDK's own classes
- Smart resolution from a simple class name rather than a fully qualified one
- Kotlin classes recognised and decompiled as Kotlin rather than as raw bytecode
- A Docker image as an alternative to running the jar, with local project directories mounted in
JDK 17 or higher, and Gradle 8.5 or higher if you are not using the included wrapper. Build with `./gradlew shadowJar` — the plain jar task will not produce a runnable server — and point your client at `java -jar` with the resulting jar. For the Docker route, build the image and run it with `-i`, mounting the project you want analysed. JVM options go through JAVA_OPTS. Resolution needs the target project to have a valid Gradle configuration and network access to its Maven repositories. MIT licensed.
One command — docker run -i gradle-class-finder-mcp
