# java-index [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/slgobinath/java-index  
**GitHub Stars:** 9  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/java-index

## Description
Lightweight Java navigation for reviewing agent-written code: LSP for your editor, MCP for your agents, one index across all worktrees.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/slgobinath/java-index), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
brew tap slgobinath/java-index https://github.com/slgobinath/java-index
```

2. Run:

```sh
brew trust --formula slgobinath/java-index/java-index
```

3. Install:

```sh
brew install java-index
```

## Documentation

## What java-index does

java-index focuses on reading and navigating Java source rather than editing or building it. It answers questions such as where a declaration is defined, which code calls a method, what implements a type, and which configuration key a Java component reads. Editors connect through LSP, while AI agents use MCP tools; both interfaces query the same repository index.

The index includes project sources, dependency source JARs, the JDK source archive, and generated stubs when available. It can also connect Spring Boot and Quarkus configuration files with the Java code that reads those keys. Supported patterns include `@Value`, `@ConfigurationProperties`, `@ConfigProperty`, `@ConfigMapping`, and `getProperty(...)`.

## How it works

Sources are parsed with Turbine into compact declaration summaries instead of being compiled. Method bodies are examined when a query needs information from inside them. One daemon serves all worktrees belonging to a repository, reusing unchanged files and storing only worktree-specific changes separately.

MCP responses return textual results with file and line locations. The available queries resolve declarations, receivers, signatures, type relationships, and call relationships where the index can establish them. When resolution is uncertain, java-index returns no result rather than guessing.

The project is designed for navigation and review. It does not write build output into the project, and it does not replace a full Java language server for authoring code.

## Setup and configuration

On Apple Silicon macOS and Linux, installation uses the project's Homebrew tap:

```sh
brew tap slgobinath/java-index https://github.com/slgobinath/java-index
brew trust --formula slgobinath/java-index/java-index
brew install java-index
jindex --version
```

The installation provides the `jindex` command, which starts a native relay and the daemon. It uses the OpenJDK supplied by Homebrew. Set `JINDEX_JAVA` to select another JDK; the selected JDK must be version 21 or newer.

Intel Macs, Windows users, and systems without Homebrew can use the JAR distributed through the project's releases. The MCP tools accept an optional `worktree` path, allowing an agent to query another worktree served by the same repository daemon.

## Tools and capabilities

- `java_api` shows the API of a class or member as resolved against project sources, dependency JARs, or the JDK.
- `java_callers` finds calls, constructor uses, and field usages while distinguishing receiver types with the same method name.
- `java_implementations` lists subtypes or method overrides.
- `java_outline` returns a file's types and members, including resolved signatures and line numbers.
- `java_find_type` searches for classes using names, camel-case segments, or qualified-name suffixes.
- `java_config` reports Spring Boot or Quarkus configuration values by profile, Java consumers, and available library documentation.

The corresponding LSP functionality includes definitions, exact references, hover information, implementations, type and call hierarchies, symbols, signature help, inlay hints, import actions, deprecation diagnostics, and configuration navigation.

## Limitations and notes

Turbine does not run Lombok or other annotation processors, so generated members from annotations such as `@Getter`, `@Data`, and `@Builder` are unavailable. Generated sources, including MapStruct, protobuf, and OpenAPI output, must exist before they can be indexed; a fresh checkout may need a build first.

Reflection and framework wiring are outside the index's view. Generic inference can fall back to bounds, and unresolved relationships are omitted. java-index cannot report compile errors, provide completion, perform general refactoring or formatting, debug applications, or run tests. It also does not cover the full authoring workflow provided by jdtls or an IDE.

Plain-text search remains useful for text matches. java-index is most useful for library API inspection, overloaded or common method names, and type hierarchies, but its navigation results should be treated as review guidance rather than proof when dynamic behavior is involved.

_Full upstream README: https://allmcps.com/mcp/java-index/readme_

