Gradle-accurate JVM classpath; fetch Java source, signatures, and class structure for agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by JVM Source Lens.
search_classesFind a class by simple name or glob; returns compact FQN + lib name lists
get_class_structureRetrieves class overview (purpose + method names) or declared signatures
get_method_signatureFetches real overloads for a method, with parameter names and generics
find_in_class_sourcePerforms regex or substring searches inside a resolved class
get_class_sourceRetrieves method bodies or line ranges (used as a last resort)
search_in_artifactGreps text across all classes in one resolved dependency JAR
An MCP server and CLI that gives your coding agent the one thing it's missing on JVM codebases: the actual classpath.
You use an IDE to write Java. Your coding agent doesn't have one.
When your agent hits an unfamiliar library type β say, a superclass from a proprietary internal library β it spends 25+ turns walking ~/.gradle/caches, opening JARs by hand with jar tf, picking one by guesswork, and trying to answer a question your IDE would answer in one keystroke: does this superclass have a public utility method called X?
jvmsrc queries your build tool (Gradle) for this project's resolved classpath, then hands your agent real source, real signatures, and real structure β for the exact version your build actually uses.
jvmsrc CLI β Same engine, scriptable, pipe-friendly, and useful on its own when you just want to read a class.
Claude Code resolving HandlerInterceptor signatures via jvmsrc β 3 calls, correct answer, no cache walking.
On JVM projects with private libraries and no public Javadocs, jvmsrc is a force multiplier:
jvmsrc (The 25-turn blind grind)User: Override the audit hook from
AbstractTradingServiceβ is there a public utility method on it we should reuse?Agent:
- Searches workspace for AbstractTradingService.java β
0 hits- Runs:
find ~/.gradle -name "trading-core*"- Finds 4 versions:
2.1.0,2.3.0,2.4.1,3.0.0-SNAPSHOT- Guesses: Picks
trading-core-2.4.1.jar(the project actually uses3.0.0-SNAPSHOT!)- Runs:
jar tfandjavap -pon the wrong JAR- [22 turns later] "I don't see a utility method, you'll have to implement it yourself."
Reality:
3.0.0-SNAPSHOTaddedmaskSensitiveFields()as a protected helper exactly for this case. The agent didn't hallucinate β it was just blind.
jvmsrc (The 3-turn instant resolution)User: Override the audit hook from
AbstractTradingServiceβ is there a public utility method on it we should reuse?Agent:
search_classes("AbstractTradingService")β Finds FQN & exact resolved library.get_class_structure(scope: "overview")β DiscoversmaskSensitiveFields()in3.0.0-SNAPSHOT.get_method_signature("maskSensitiveFields")β Gets accurate signature and generics.Result: Writes the override correctly on the first try. No cache walking, no guessing, no wrong version.
jvmsrc queries your active build tool (e.g., Gradle) for the exact resolved classpath configuration.Or use it directly via npx:
[!IMPORTANT]
Requires Node β₯ 20 and Java onPATH(for CFR decompiler +javap).
Paste this into your AI assistant config (Cursor, Claude Code, Windsurf, etc.), then restart the host:
Optional: jvmsrc config (or jvmsrc config --project /path/to/gradle-project) prints a paste-ready block plus environment hints. Most users can skip it and copy the snippet above.
The MCP server runs over stdio via jvmsrc mcp. The default config needs no environment variables:
Only needed when your Gradle build requires credential env vars for a private Maven/Artifactory/Nexus-style repo. MCP hosts often do not inherit your interactive shell, so those vars must be set on the jvmsrc MCP process (then restart the server).
REPO_USER / REPO_PASS below are sample names only β they are not required by jvmsrc. Use whatever variable names your projectβs Gradle scripts document:
Omit the env block entirely when the project does not need them.
| Tool | What it does |
|---|---|
search_classes | Find a class by simple name or glob; returns compact FQN + lib name lists |
get_class_structure | Retrieves class overview (purpose + method names) or declared signatures |
get_method_signature | Fetches real overloads for a method, with parameter names and generics |
find_in_class_source | Performs regex or substring searches inside a resolved class |
get_class_source | Retrieves method bodies or line ranges (used as a last resort) |
search_in_artifact | Greps text across all classes in one resolved dependency JAR |
resolve_dependencies | Analyzes the actual dependency graph this project uses |
[!TIP]
Every source response includessourceAvailable:truefor real sources (Javadoc, parameter names, generics),falsefor CFR decompilation (structure reliable, names may be synthetic).
[!NOTE]
Multimodule: omitmodulePathand jvmsrc auto-picks the unique owning module; on a miss it lists candidatemodulePaths. Methods:search_classesmatches declared method names when the index has source enrichment; for body text in a known JAR usesearch_in_artifact.get_class_sourcemethodNamesalso walks superclasses for unmatched names.
| Tool | Approach | Gap |
|---|---|---|
Cache Indexers / ~/.gradle grep | Scan global caches | No per-project resolved version |
Static Parsers (e.g., build.gradle parser) | Parse declarations only | Misses transitive dependencies, BOMs, dynamic versions |
mcp-javadoc / path-only CFR | User supplies manual JAR paths | No automatic build/classpath resolution |
| Gradle MCP (Tooling API) | Task/build focused | Not optimized for classpath-accurate FQN source lookup |
jvmsrc | Queries actual build tool & caches | Version-correct sources and signatures for agents |
Primarily Java + Spring Boot projects on Gradle. Other JVM languages (Kotlin, Scala) and Android work today on a best-effort basis and are on the roadmap as first-class targets β see ROADMAP.md.
If you're on Maven or Bazel, it's planned but not shipping yet. Star the repo or open an issue and I'll prioritize accordingly.
Runtime: Node.js β₯ 20, Java on PATH.
Project types: JVM codebases (Java, Kotlin, Scala, Groovy). jvmsrc calls the build tool, not your editor.
| Build system | Status |
|---|---|
| Gradle | Supported β multimodule included |
| Maven, Bazel | Planned (SPEC.md) |
Point -p / projectRoot at the Gradle root (settings.gradle(.kts) or root build.gradle(.kts)). Uses ./gradlew when present, else gradle on PATH. Maven-only trees get an explicit unsupported error.
Early software; the supported path is narrow:
| Area | Today |
|---|---|
| Build tool | Gradle only |
| Integration | Groovy init script (--init-script) β not a Gradle Portal plugin |
| Classpaths | Standard JVM + Kotlin MPP jvm* configurations when Gradle exposes them |
| Output | Java-shaped .java text (sources JAR, inter-project src, or CFR) |
Composite builds, Android-only layouts, and exotic configurations are not fully validated. See ROADMAP.md.
JVMSRC_ALLOWED_ROOTS to lock down which projects jvmsrc may resolve.Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/jvm-source-lens)<a href="https://allmcps.com/mcp/jvm-source-lens"><img src="https://allmcps.com/api/badge/jvm-source-lens?style=directory" alt="JVM Source Lens on AllMCPs" /></a>