Skip to main content
Glama
SachieWang

java-jdtls-mcp-server

by SachieWang

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JDTLS_HOMEYesPath to JDT.LS installation root directory
JDTLS_JAVA_HOMENoDedicated JDK path for JDT.LS (overrides JAVA_HOME). Defaults to system JAVA_HOME.
JAVA_WORKSPACE_PATHNoRoot path of your Java project. Defaults to current working directory.
JDTLS_JAVA_RUNTIMESNoJSON list of Java Runtimes for different project versions
JDTLS_MAVEN_OFFLINENoEnable Maven offline mode (true/false). Defaults to false.
JDTLS_MAVEN_USER_SETTINGSNoPath to custom Maven user settings.xml
JDTLS_MAVEN_GLOBAL_SETTINGSNoPath to custom Maven global settings.xml

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
java_startA

Start the Java Language Server (JDT.LS). Required before other commands. If already running, it will restart.

java_restartB

Restart the Java Language Server (JDT.LS).

java_open_fileB

Notify the language server that a file is open (didOpen).

java_get_definitionB

Get definition location for a symbol.

java_get_referencesC

Get references for a symbol.

java_get_hoverB

Get hover information for a symbol.

java_get_diagnosticsA

Get diagnostics (errors/warnings) for a file. This tool now attempts to pull diagnostics actively from the server if supported (LSP 3.17+), otherwise falls back to cached results from asynchronous publishing.

java_get_workspace_diagnosticsA

Pull diagnostics for the entire workspace (LSP 3.17+). Note: This may not be supported by all language server versions.

java_load_maven_projectA

Load a Maven Java project into the language server workspace. This causes JDTLS to index the project, resolving dependencies and symbols across the entire project without needing to open files individually.

java_search_symbolsA

Search for symbols (classes, methods, fields) across the entire workspace by name.

java_get_file_symbolsB

Get all symbols (classes, methods, fields) defined in a specific file.

java_get_statusA

Get the current status of the Java Language Server.

configure_jdt_lsB

Dynamically update JDT.LS configuration (e.g. enable source downloading).

find_referencesA

Find references for a symbol. This is an enhanced version of java_get_references that marks external library results.

read_java_contentA

Read the content of a Java file, including local files and external library source code (jdt:// or jrt:// URIs).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SachieWang/java-jdtls-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server