Skip to content
VS Code

JavaLens for VS Code

io.github.pzalutski-pixel/javalens

63 semantic Java analysis tools via Eclipse JDT: navigation, refactoring, code intelligence.

client:VS Code transport:stdio runtime:npm

Install JavaLens in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "java-project-path",
      "description": "JAVA_PROJECT_PATH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "javalens-timeout-seconds",
      "description": "JAVALENS_TIMEOUT_SECONDS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "javalens-log-level",
      "description": "JAVALENS_LOG_LEVEL",
      "password": true
    }
  ],
  "servers": {
    "javalens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "javalens-mcp"
      ],
      "env": {
        "JAVA_PROJECT_PATH": "${input:java-project-path}",
        "JAVALENS_TIMEOUT_SECONDS": "${input:javalens-timeout-seconds}",
        "JAVALENS_LOG_LEVEL": "${input:javalens-log-level}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

JavaLens in other clients