jdtls-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jdtls-mcp find implementation of 'processOrder' method"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JDTLS MCP Server
A Model Context Protocol (MCP) server that provides Java language support by wrapping the Eclipse JDT Language Server (JDTLS).
This server allows AI assistants to understand Java codebases, search symbols, navigate code (definition, references, implementations), and read third-party .class files natively.
Features
This server exposes the following MCP tools:
java_workspace_symbols: Search for classes, interfaces, and methods across the entire workspace.java_document_symbols: Get the hierarchical outline of a specific file.java_definition: Find the definition of a symbol at a specific location.java_references: Find usages of a symbol at a specific location.java_implementations: Find implementations of a symbol at a specific location.java_hover: Get Javadoc and type signature for a symbol.java_class_content: Fetch the source code for a class located inside a third-party jar (handlesjdt://URIs).
Related MCP server: jons-mcp-java
Requirements
Node.js: v16 or higher.
JDTLS: Eclipse JDT Language Server must be installed on your machine and the
jdtlsexecutable must be available in your system'sPATH.
Installation
We recommend building and linking the package globally. This makes the jdtls-mcp command available everywhere and makes future updates easy.
# Clone the repository
git clone https://github.com/Kicey/jdtls-mcp.git
cd jdtls-mcp
# Install dependencies
npm install
# Build the TypeScript code
npm run build
# Link the package globally
npm linkTo update the server later, simply run git pull followed by npm run build in the repository folder.
Usage & Configuration Examples
Below are configuration examples for adding this MCP server to various AI coding assistants now that it is linked globally.
Claude Desktop
Add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"jdtls": {
"command": "jdtls-mcp",
"args": []
}
}
}Cursor
To use with Cursor, open Settings > Features > MCP Servers and add a new server:
Type:
commandName:
jdtlsCommand:
jdtls-mcp
Claude Code (CLI)
If you are using the official claude CLI, you can add the server by running:
claude mcp add jdtls -- jdtls-mcpCodex / Cline / Roo Code (VS Code Extensions)
For VS Code extensions that support MCP (like Roo Code / Cline), configure the server in your MCP settings file (typically cline_mcp_settings.json):
{
"mcpServers": {
"jdtls": {
"command": "jdtls-mcp",
"args": []
}
}
}Architecture Notes
The server manages
jdtlsprocesses automatically per workspace.The processes will gracefully shut down after 30 minutes of inactivity to save resources.
Required
workspacePatharguments should be absolute paths to the root of the target Java project.
Available Tools
7 toolsjava_class_contentA
Fetch the source code for a class located inside a third-party jar (handles jdt:// URIs).
Inputs: uri (required), workspacePath (required).
java_definitionC
Find the definition of a symbol at a specific location.
Inputs: line (required), fileUri (required), character (required), workspacePath (required).
java_document_symbolsB
Get the hierarchical outline of a specific file.
Inputs: fileUri (required), workspacePath (required).
java_hoverC
Get Javadoc and type signature for a symbol.
Inputs: line (required), fileUri (required), character (required), workspacePath (required).
java_implementationsC
Find implementations of a symbol at a specific location.
Inputs: line (required), fileUri (required), character (required), workspacePath (required).
java_referencesC
Find usages of a symbol at a specific location.
Inputs: line (required), fileUri (required), character (required), workspacePath (required).
java_workspace_symbolsB
Search for classes, interfaces, and methods across the entire workspace.
Inputs: query (required), workspacePath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct operation: fetching class content, finding definitions, document outline, hover info, implementations, references, and workspace symbol search. No overlap in purposes.
All tools follow a consistent 'java_<noun>' pattern with snake_case naming. The prefix and noun structure is uniform across the set.
7 tools is an appropriate number for a code navigation server. It covers essential browsing operations without being excessive or insufficient.
The tool set covers core code exploration: definition, references, implementations, hover, document outline, and symbol search. Missing features like code completion or diagnostics, but the set is reasonable for static analysis.
Maintenance
Related MCP Connectors
Ship better Java with your coding agent.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRuns a language server and provides tools for communicating with it. Language servers excel at tasks that LLMs often struggle with, such as precisely understanding types, understanding relationships, and providing accurate symbol references.1,620BSD 3-Clause
- AlicenseBqualityCmaintenanceProvides Java development capabilities through Eclipse JDT.LS, enabling symbol navigation, code diagnostics, workspace searching, and Javadoc access across Java projects.10MIT
- AlicenseNot gradedqualityDmaintenanceExposes Eclipse JDT Language Server to AI agents via MCP. Embedded OSGi architecture runs jdtls in the same JVM — no subprocess, no network hop. Tools: hover, definition, references, completion, diagnostics, document & workspace symbols.5Eclipse Public 2.0
- AlicenseAqualityDmaintenanceA high-performance MCP server that bridges AI agents with Java codebases, providing professional-grade Java language intelligence via Eclipse JDT.LS.1515 npm3GPL 3.0