LabscoMCP early access ↗
SintexerMCP SERVER

JVM Source Lens

Give a coding agent the Gradle project's actual resolved classpath — real signatures and real source for the exact library version the build uses.

by Sintexer ↗Package Registries & Dependency Supply ChainCommunity

LABSCO SUMMARY

The version the build resolves, not the version in the cache.

The failure this fixes is specific and expensive: four copies of an internal library sit in the Gradle cache, the agent picks one, and the answer is confidently wrong. Asking Gradle rather than the filesystem is what makes the signatures trustworthy, and the sourceAvailable flag is honest about when you are reading decompiled output instead of real source. Gradle-only is the real constraint to check first.

What it is

An MCP server and CLI that asks your build tool which dependencies this project actually resolves to, then serves source and signatures from those exact artifacts. The problem it removes is a familiar one: without the classpath an agent walks ~/.gradle/caches by hand, picks a JAR by guesswork, and answers from the wrong version. jvmsrc caches the resolved classpath and tracks build-file changes to stay current.

What you get

  • search_classes — find a class by simple name or glob and get compact fully-qualified names with the library each one came from
  • get_class_structure — a class overview with method names, or the declared signatures, chosen by scope
  • get_method_signature — the real overloads for a method, with parameter names and generics
  • find_in_class_source — regex or substring search inside one resolved class
  • get_class_source — method bodies or line ranges, positioned as the last resort rather than the default
  • search_in_artifact — grep across every class in one resolved dependency JAR
  • resolve_dependencies — inspect the dependency graph the project actually uses, transitive resolutions included
  • Every source response carries sourceAvailable, which is true for real sources with Javadoc and parameter names, and false when the answer came from CFR decompilation — structure reliable, names possibly synthetic

Requirements

Nothing — no account, no key, and the default configuration needs no environment variables. Node 20 or higher and Java on PATH for the CFR decompiler and javap. The package is jvmsrc (1.15.0 in package.json and server.json), installed with npm install -g jvmsrc, and the client entry runs jvmsrc with the argument mcp over stdio. Gradle only today, multimodule included; Maven and Bazel are planned, and a Maven-only tree returns an explicit unsupported error. Private repositories need their credential environment variables set on the MCP process itself, since hosts do not inherit your shell. JVMSRC_ALLOWED_ROOTS restricts which project roots it may resolve.

Setup effort

One command — npm install -g jvmsrc