npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@knno/jdtls-mcp

v1.0.3

Published

MCP server for JDTLS - Java Language Server Protocol integration

Readme

@knno/jdtls-mcp

MCP (Model Context Protocol) server for JDTLS (Java Development Tools Language Server). Provides Java language server capabilities to AI coding assistants through the MCP protocol.

Installation

# Use directly with npx
npx @knno/jdtls-mcp

# Or install globally
npm install -g @knno/jdtls-mcp
jdtls-mcp

Usage

Basic Usage

# Auto-detect Java project in current directory
npx @knno/jdtls-mcp

# Specify workspace
npx @knno/jdtls-mcp --workspace /path/to/java/project

Command Line Options

| Option | Short | Description | |--------|-------|-------------| | --workspace <path> | -w | Java project root directory (contains pom.xml or build.gradle) | | --download | -d | Use downloaded JDTLS (reuse cache if available) | | --force-download | -f | Force re-download JDTLS (delete local cache first) | | --help | -h | Show help information |

Environment Variables

| Variable | Description | |----------|-------------| | JDTLS_HOME | Specify JDTLS installation directory (highest priority) |

JDTLS Discovery Order

  1. JDTLS_HOME environment variable
  2. Cached ~/.jdtls/bin/jdtls
  3. VSCode Red Hat Java extension bundled jdtls
  4. Auto-download on first use

Download Options

  • --download: Use downloaded JDTLS, prioritize local cache (extracted > archive > download)
  • --force-download: Force fresh download, delete all local caches

Available Tools

| Tool | Description | |------|-------------| | java_getDiagnostics | Get compilation errors, warnings, and code issues | | java_findReferences | Find all references to a symbol | | java_getDefinition | Go to symbol definition | | java_getHover | Get hover information | | java_searchSymbols | Search workspace symbols (including third-party libraries) | | java_getClassFileContents | Get decompiled source code from third-party libraries. Supports startLine/endLine to get partial content. | | java_getCompletions | Get code completion suggestions. Low context consumption, suitable for quickly querying class members. | | java_resolveCompletion | Resolve completion item details (e.g., Javadoc) | | java_getSignatureHelp | Get signature help for methods | | java_getImplementation | Get implementations of an interface/class | | java_getTypeDefinition | Go to type definition | | java_rename | Rename symbol | | java_organizeImports | Organize imports | | java_prepareCallHierarchy | Prepare call hierarchy for a method | | java_callHierarchyIncomingCalls | Get incoming calls | | java_callHierarchyOutgoingCalls | Get outgoing calls | | java_prepareTypeHierarchy | Prepare type hierarchy for a class | | java_typeHierarchySupertypes | Get supertypes | | java_typeHierarchySubtypes | Get subtypes |

Tool Selection Guide

When choosing between tools, consider context consumption:

  • java_getCompletions - Low context consumption. Use for quickly checking available methods/fields.
  • java_getClassFileContents - Higher context consumption. Use when you need implementation details. Use startLine/endLine to limit content.

Auto-Wait for LSP Ready

All tools automatically wait for the JDTLS server to be ready before executing. No need to call a separate "waitForReady" tool.

Configuration

The server stores JDTLS in ~/.jdtls/ directory:

~/.jdtls/
├── bin/              # JDTLS executable
├── plugins/          # JDTLS plugins
├── config/           # Configuration files
├── workspace/        # Project-specific workspace data
└── jdtls.tar.gz      # Downloaded archive (cached)

Development

# Install dependencies
pnpm install

# Build
pnpm run build

# Development mode (watch)
pnpm run dev

# Run test suite
pnpm test

# Run basic test
pnpm run test:basic

# Run specific tool test
node test/test-suite.mjs --tool=java_getDiagnostics

Test Project

The test/java_demo_project/ directory contains a sample Java project used for testing. It includes:

  • Maven project with Apache HttpClient and Jackson dependencies
  • Sample classes for testing various LSP features
  • A BuggyClass.java with intentional errors for diagnostics testing

Requirements

  • Node.js >= 18
  • Java Runtime (JDK 17+ recommended for JDTLS)

License

ISC