JVM Source Lens
v1.16.0Gradle-accurate JVM classpath; fetch Java source, signatures, and class structure for agents.
Values you need
| Variable | What it is | |
|---|---|---|
JVMSRC_ALLOWED_ROOTS | optional | Optional comma-separated absolute paths; only these project roots are allowed. |
JVMSRC_CACHE_ROOT | optional | Optional absolute path for resolution and decompile caches (default: OS cache dir). |
JVMSRC_LOG_DIR | optional | Optional absolute path for failure diagnostic logs. |
JVMSRC_MAX_SOURCE_OUTPUT_CHARS | optional | Max characters returned for full-file source (default 524288). |
JVMSRC_GRADLE_TIMEOUT_MS | optional | Gradle resolution subprocess timeout in milliseconds. |
JVMSRC_CFR_PATH | optional | Optional path to a custom CFR JAR for decompilation. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add jvmsrc -- npx -y jvmsrc@1.16.0 mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"jvmsrc": {
"args": [
"-y",
"jvmsrc@1.16.0",
"mcp"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"jvmsrc": {
"args": [
"-y",
"jvmsrc@1.16.0",
"mcp"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"jvmsrc": {
"args": [
"-y",
"jvmsrc@1.16.0",
"mcp"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.jvmsrc]
command = "npx"
args = ["-y", "jvmsrc@1.16.0", "mcp"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_class_source, find_in_class_source, resolve_dependencies, search_classes, get_method_signature, get_class_structure, search_in_artifact.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json