find_classLABSCO SUMMARY
Read the library, not the guess.
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.
What it is
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.
What you get
find_class— give a workspace directory and a class name, get the jar and location it resolves toget_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
Requirements
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.
Setup effort
One command — docker run -i gradle-class-finder-mcp
USE CASES
Checking what a dependency's class really does
Resolve the class from the project's dependencies and read the implementation instead of relying on documentation.
Tracking down where a class comes from
Ask by short name and find out which jar in the tree actually provides it, which is where version conflicts show up.
Reading a Kotlin library without sources
Decompile the class as Kotlin rather than reading bytecode, then reason about the API from what is there.
2 tools
Listed in project docs. Your client may show a different list.
get_source_codeBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- docker on PATH
- Gradle 8.5
- Docker 20.10 or later
Where it runs
Both documented setups run the server on your machine.
INSTALLATION
Connect your client
Server setup
docker run -i gradle-class-finder-mcpMCP Clients
Claude Desktop — Java
{
"mcpServers": {
"gradle-class-finder": {
"command": "java",
"args": [
"-jar",
"<YOUR_PATH_TO_GRADLE_CLASS_FINDER_MCP>"
]
}
}
}Claude Desktop — Docker
{
"mcpServers": {
"gradle-class-finder": {
"command": "docker",
"args": [
"run",
"-i",
"gradle-class-finder-mcp"
]
}
}
}