MCP server for indexing local Maven repository
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.
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.
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 structureExamples — "Show me the source of StringUtils", "What methods are available on DateTimeUtils?", "Where is thisInput — className (e.g., "StringUtils", "Json parser")Output — List of matching classes with their artifactsTip — Essential for internal/proprietary code where documentation is scarce or non-existentnpm on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
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.
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.
| Tool | What it does |
|---|---|
| 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. |
{
"mcpServers": {
"maven-indexer": {
"command": "npx",
"args": [
"-y",
"maven-indexer-mcp@latest"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| MAVEN_REPO | Configuration value read at startup. | Optional |
| GRADLE_REPO_PATH | Filesystem location the server is allowed to use. | Optional |
| INCLUDED_PACKAGES | Configuration value read at startup. | Optional |
| MAVEN_INDEXER_CFR_PATH | Filesystem location the server is allowed to use. | Optional |
| VERSION_RESOLUTION_STRATEGY | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.