Labsco
MCP SERVER

Maven Indexer MCP Server

by tangcent

Let the model read the jars already on your machine — the internal company libraries it has never seen and cannot guess at.

Package Registries & Dependency Supply ChainVerified
Summary
It closes one specific gap: a model knows Spring and Guava, and knows nothing at all about com.yourcompany.

Point it at the local Maven and Gradle caches and the class, its method signatures and — where a sources jar exists — the real source come back, so the agent stops guessing at your private APIs. The author also ships a CLI-and-skill version and recommends it over this one for terminal coding agents, on the grounds that loading tool schemas costs more context than the lookups themselves.

What it is

An MCP server that indexes your local Maven repository and Gradle cache, then answers class, artifact and source lookups against them. It watches those directories and keeps the index current in the background.

What you get
  • Class search across the local jars for when an import such as com.company.util.Helper resolves to nothing in the workspace — one class or a batch of them
  • The source for a class, with the containing artifact identified: real source files where a sources jar exists, decompilation where it does not
  • Artifact search by groupId and artifactId coordinate, by keyword, or by class name, including which versions are built locally
  • Implementations of an interface or subclasses of a base class, found inside those jars — useful for tracking down SPI implementations
  • Non-class files inside jars by pattern: properties files, XML configuration, proto definitions
  • A manual re-scan of the repository when something new has just been installed
Requirements

Nothing to authorize — it reads directories on your own machine. Runs over stdio with npx -y maven-indexer-mcp@latest and auto-detects ~/.m2/repository and ~/.gradle/caches/modules-2/files-2.1. When they sit elsewhere, set MAVEN_REPO or GRADLE_REPO_PATH. INCLUDED_PACKAGES narrows what gets indexed to package patterns such as com.mycompany.* (default is everything), MAVEN_INDEXER_CFR_PATH points at your own CFR decompiler jar instead of the bundled one, and VERSION_RESOLUTION_STRATEGY picks between semver, latest-published and latest-used when several versions match.

Setup effort

One command — npx -y maven-indexer-mcp@latest