JVM Source Lens

v1.16.0
io.github.Sintexer/jvmsrc Checked 14 hours ago Published 2 months ago

Gradle-accurate JVM classpath; fetch Java source, signatures, and class structure for agents.

Values you need

VariableWhat it is
JVMSRC_ALLOWED_ROOTSoptional Optional comma-separated absolute paths; only these project roots are allowed.
JVMSRC_CACHE_ROOToptional Optional absolute path for resolution and decompile caches (default: OS cache dir).
JVMSRC_LOG_DIRoptional Optional absolute path for failure diagnostic logs.
JVMSRC_MAX_SOURCE_OUTPUT_CHARSoptional Max characters returned for full-file source (default 524288).
JVMSRC_GRADLE_TIMEOUT_MSoptional Gradle resolution subprocess timeout in milliseconds.
JVMSRC_CFR_PATHoptional 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 mcp
Add 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

  1. 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).
  2. Restart or reload the client so it starts the server.
  3. 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.
  4. 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