Maven Indexer MCP Server

MCP server for indexing local Maven repository

Local serverstdioGo

What is the Maven Indexer MCP MCP server?

MCP server for indexing local Maven repository. Exposed over MCP by the maven indexer mcp mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

A Model Context Protocol (MCP) server that indexes your local Maven repository (~/.m2/repository) and Gradle cache ( ~/.gradle/caches/modules-2/files-2.1) to provide AI agents with tools to search for Java classes, method signatures, and source code.

  • Semantic Class Search — Search for classes by name or purpose
  • Inheritance Search — Find all implementations of an interface or subclasses of a class
  • On-Demand Analysis — Extracts method signatures and Javadocs directly from JARs
  • Source Code Retrieval — Provides full source code if available
  • Real-time Monitoring — Automatically updates the index when repositories change

Its toolset

Everything the assistant can do here goes through one of these:

  • Note — For well-known libraries (e.g., standard Java lib, Spring), the AI likely knows the class structure
  • Examples — "Show me the source of StringUtils", "What methods are available on DateTimeUtils?", "Where is this
  • Input — className (e.g., "StringUtils", "Json parser")
  • Output — List of matching classes with their artifacts
  • Tip — Essential for internal/proprietary code where documentation is scarce or non-existent

Adding it to your client

npm on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

You will need 5 environment variables: MAVEN_REPO, GRADLE_REPO_PATH, INCLUDED_PACKAGES, MAVEN_INDEXER_CFR_PATH, VERSION_RESOLUTION_STRATEGY. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Maven Indexer MCP's toolset — Note, Examples, Input and 2 more — is a fair guide to whether it matches your workflow. It is maintained by tangcent; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the maven indexer mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
NoteFor well-known libraries (e.g., standard Java lib, Spring), the AI likely knows the class structure
Examples"Show me the source of StringUtils", "What methods are available on DateTimeUtils?", "Where is this
InputclassName (e.g., "StringUtils", "Json parser")
OutputList of matching classes with their artifacts.
TipEssential for internal/proprietary code where documentation is scarce or non-existent.

How to install the Maven Indexer MCP MCP server

{
  "mcpServers": {
    "maven-indexer": {
      "command": "npx",
      "args": [
        "-y",
        "maven-indexer-mcp@latest"
      ]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
MAVEN_REPOConfiguration value read at startup.Optional
GRADLE_REPO_PATHFilesystem location the server is allowed to use.Optional
INCLUDED_PACKAGESConfiguration value read at startup.Optional
MAVEN_INDEXER_CFR_PATHFilesystem location the server is allowed to use.Optional
VERSION_RESOLUTION_STRATEGYConfiguration value read at startup.Optional

Example prompts to try

  • Use Maven Indexer MCP to Note.
  • Use Maven Indexer MCP to Examples.
  • Use Maven Indexer MCP to Input.

Frequently asked questions

It connects Maven Indexer MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 5 tools (Note, Examples, Input, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Maven Indexer MCP directly.