A Model Context Protocol (MCP) server for inspecting Java classes and Maven dependencies.
- Java Class Inspection: Inspect any Java class in your project or dependencies.
- JDK Visibility: Support for inspecting JDK classes with
@sinceinformation (requiresjavaHome). - Maven Integration: Deep resolution of Maven dependency graphs, including property placeholders.
- Granular Detail Levels: Support for
skeleton,basic, andfulldetail levels in class inspection. - Interface Support: Fully supports listing fields and methods for Java interfaces.
To get accurate versioning information for JDK classes, provide the javaHome parameter to the inspect_java_class tool. JLens will automatically locate src.zip and extract Javadoc info.
You can run JLens instantly using npx or uvx (requires Java 25+ installed):
# Using npx
npx -y @bhxch/jlens-mcp-server
# Using uvx
uvx jlens-mcp-serverYou can configure the server using environment variables:
JLENS_JAVA_HOME: Path to Java installation (overrides JAVA_HOME)JLENS_ARGS: Additional JVM arguments or server options
# Example
JLENS_JAVA_HOME="/path/to/jdk-25" JLENS_ARGS="-Dfile.encoding=UTF-8" npx @bhxch/jlens-mcp-serverInstall specialized AI agent skills to help your agent use JLens more effectively (requires npx skills support):
# Install Chinese Version
npx skills install https://github.com/bhxch/jlens/tree/main/skills/jlens-mcp
# Install English Version
npx skills install https://github.com/bhxch/jlens/tree/main/skills/jlens-mcp-en- User Guide: docs/user-guide/
- Developer Docs: docs/developer-docs/
- Design Plans: docs/plans/
- Test Reports: docs/developer-docs/reports/ - Test results and reports
- Scripts: scripts/ - Test and automation scripts
- Configuration: config/ - MCP Inspector and other configs
- Logs: logs/ - Temporary logs and outputs
# Recommended for JDK 25+ due to test engine compatibility
mvn clean package -DskipTestsThis will create an executable JAR file: target/jlens-mcp-server-1.1.2.jar
MIT