Maven Tools MCP Setup

Configuration for the Maven Tools MCP server, providing Maven Central dependency intelligence.

For the design rationale, see ADR-0007: Maven Central Search.

Overview

The maven-tools-mcp server provides AI assistants with Maven Central dependency intelligence. It reads maven-metadata.xml files directly from Maven Central, which is faster and more reliable than using search APIs.

Key Features

  • Get latest or stable versions of dependencies

  • Check if specific versions exist

  • Bulk version checking for multiple dependencies

  • Compare versions with upgrade recommendations

  • Dependency age analysis (fresh/current/aging/stale)

  • Release pattern analysis and predictions

  • Project health scoring

Limitations

Class name search

This MCP does not support finding which artifacts contain a specific class. For class search, use the alternative methods below.

Prerequisites

  • Docker installed and running

  • Claude Code or Claude Desktop

Quick Start (Claude Code)

Add the MCP server using the Claude CLI:

claude mcp add maven-tools -- docker run -i --rm arvindand/maven-tools-mcp:latest

To verify the server was added:

claude mcp list

Manual Configuration

Claude Code (Project-Level)

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "maven-tools": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "arvindand/maven-tools-mcp:latest"]
    }
  }
}

Claude Desktop

Add to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "maven-tools": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "arvindand/maven-tools-mcp:latest"]
    }
  }
}

Restart Claude Desktop after adding the configuration.

Available Tools

Tool Description

get_latest_version

Get newest version of a dependency with stability preferences

check_version_exists

Verify if a specific version exists

check_multiple_dependencies

Check latest versions for multiple dependencies (bulk operation)

compare_dependency_versions

Compare current vs latest with upgrade recommendations

analyze_dependency_age

Classify dependencies as fresh/current/aging/stale

analyze_release_patterns

Analyze maintenance activity and predict releases

get_version_timeline

Version timeline with temporal analysis

analyze_project_health

Comprehensive health analysis for multiple dependencies

Example Queries

Version Lookups

# Get latest version
> What is the latest version of Spring Boot?

# Check if version exists
> Does maven-core 4.0.0 exist?

# Bulk check
> Check versions for org.apache.maven:maven-core, org.apache.maven:maven-model, org.apache.maven:maven-artifact

Dependency Analysis

# Compare versions
> Compare my current dependency versions:
> org.apache.maven:maven-core:3.9.6
> org.apache.maven:maven-model:3.9.6

# Health check
> Analyze the health of my Maven dependencies

# Release patterns
> What is the release pattern for maven-compiler-plugin?

Image Variants

Image Tag Description

arvindand/maven-tools-mcp:latest

Default with Context7 documentation integration

arvindand/maven-tools-mcp:latest-noc7

Without Context7 (for restricted networks)

Use the -noc7 variant if your network blocks access to mcp.context7.com.

Class Name Search Alternative

The maven-tools-mcp does not support class name search. For finding which artifacts contain a specific class, use one of these alternatives:

Maven Central REST API

# Fully-qualified class name search
curl "https://search.maven.org/solrsearch/select?q=fc:org.apache.maven.project.MavenProject&wt=json&rows=10"

# Simple class name search
curl "https://search.maven.org/solrsearch/select?q=c:MavenProject&wt=json&rows=10"

mcs CLI Tool

Install via SDKman:

sdk install mcs

Then search for classes:

# Fully-qualified class name
mcs class-search -f org.apache.maven.project.MavenProject

# Simple class name
mcs class-search MavenProject

Troubleshooting

Context7 Connection Issues

If the server fails to start with a Spring stack trace, your network may be blocking mcp.context7.com. Use the -noc7 image variant:

{
  "mcpServers": {
    "maven-tools": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "arvindand/maven-tools-mcp:latest-noc7"]
    }
  }
}

Docker Not Running

Ensure Docker is running before starting Claude Code or Claude Desktop.

docker info