
JVM Source Lens
Let your coding agent read real Java source, signatures, and class structure from Gradle-resolved classpaths instead of guessing from stubs or outdated docs.
Overview
JVM Source Lens is a MCP server for the Build phase that exposes Gradle-accurate Java source, signatures, and class structure to coding agents.
What is this MCP server?
- Resolves JVM classpath the same way Gradle does for faithful type and dependency context
- Fetches Java source, method signatures, and class structure for agent reasoning
- Optional JVMSRC_ALLOWED_ROOTS to restrict which project roots the server may touch
- Optional JVMSRC_CACHE_ROOT for custom on-disk cache location
- Ships as npm jvmsrc 1.9.0 with stdio MCP via npx mcp
- Server version 1.9.0 on npm package jvmsrc
- stdio transport via npx jvmsrc mcp
- Two optional env vars: JVMSRC_ALLOWED_ROOTS and JVMSRC_CACHE_ROOT
Community signal: 3 GitHub stars.
What problem does it solve?
Agents working on Java backends often invent APIs because they cannot see the resolved classpath your Gradle build actually uses.
Who is it for?
Indie builders maintaining Java/Kotlin services who want Claude Code or Cursor to read the same classes Gradle resolves locally.
Skip if: Pure frontend or Node-only stacks with no JVM toolchain, or teams that forbid local Java installs on agent machines.
What do I get? / Deliverables
After you register jvmsrc, your agent can query real sources and type structure from your project’s JVM dependencies while you code.
- Agent-accessible Java source and signature queries tied to your build
- Safer scoped reads when allowed roots are configured
- Repeatable stdio MCP wiring for backend sessions
Recommended MCP Servers
Journey fit
Backend implementation and integration work is where agents need ground-truth JVM types from the actual project classpath. Classpath-accurate source and structure lookup is a backend concern when wiring Spring, Kafka, or custom Java services.
How it compares
Classpath-aware JVM source bridge, not a generic web-search or documentation MCP.
Common Questions / FAQ
Who is JVM Source Lens for?
Solo and small-team builders on Gradle-based Java or Kotlin backends who need agents to inspect real library source instead of guessing.
When should I use JVM Source Lens?
Use it while implementing APIs, debugging classpath or signature mismatches, or exploring unfamiliar JVM dependencies during the build phase.
How do I add JVM Source Lens to my agent?
Add an MCP stdio entry that runs npx -y jvmsrc mcp, ensure Java and Node 20+ are installed, and optionally set JVMSRC_ALLOWED_ROOTS and JVMSRC_CACHE_ROOT.