🚀 Maven Tools MCP Server
Universal Maven Central dependency intelligence for JVM build tools
This MCP server equips AI assistants with Maven Central dependency intelligence for all JVM build tools (Maven, Gradle, SBT, Mill). It directly reads maven - metadata.xml files from the Maven Central repository to offer instant and accurate dependency information, which is faster and more reliable than web searches or search APIs. It also features Context7 integration for documentation support.
🚀 Quick Start
To quickly get a sense of what this tool can do, check out the demo below:
You can ask your AI assistant various questions, such as:
- "Check all dependencies in this build file for latest versions" (paste your build.gradle, pom.xml, build.sbt)
- "What's the latest Spring Boot version?"
- "Which dependencies in my project need updates?" (any build tool)
- "Show me only stable versions for production deployment"
- "How old are my dependencies and which ones need attention?"
- "Analyze the release patterns for my key dependencies"
- "Give me a health check for all my project dependencies"
- "How do I upgrade Spring Boot from 2.7.0 to the latest version? Show me migration guidance"
- "Check these dependencies for upgrades and suggest documentation searches" (paste your pom.xml/build.gradle)
- "I'm still using Jackson 2.12.0. Should I upgrade and how?"
✨ Features
Core Features
- Version Lookup: Retrieve the latest, stable, or specific versions of dependencies.
- Version Type Classification: Classify versions as stable, RC, beta, alpha, or milestone.
- Bulk Operations: Analyze multiple dependencies in one go.
- Version Comparison: Compare different versions of dependencies and get upgrade recommendations.
Advanced Features
- Dependency Age Analysis: Provide actionable insights by classifying dependencies as fresh, current, aging, or stale.
- Maintenance Pattern Analysis: Analyze maintenance patterns and predict future releases.
- Project Health Scoring: Score the health of your project's dependencies and offer recommendations.
- Context7 Migration Guidance: Provide guidance and upgrade strategies for complex migrations.
- Documentation Enrichment: Enhance documentation for complex upgrades.
Other Features
- Caching: Improve performance through caching.
- Compatibility: Works with MCP - compatible AI assistants.
Note: Snapshot versions are not supported because the Maven Central API does not index or provide access to snapshot artifacts. Only released versions (stable, rc, beta, alpha, milestone) are available.
📦 Installation
Setup for Claude Desktop
- Locate the configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- Add the configuration (using the pre - built Docker image):
{
"mcpServers": {
"maven-tools": {
"command": "docker",
"args": [
"run", "-i", "--rm", "-e", "SPRING_PROFILES_ACTIVE=docker",
"arvindand/maven-tools-mcp:latest"
]
}
}
}
- Restart Claude Desktop
Prerequisites: Docker should be installed and running. The Docker image supports both AMD64 (Intel/AMD) and ARM64 (Apple Silicon) architectures, and Docker will automatically select the correct version for your platform.
Setup for VS Code with GitHub Copilot
Option 1: Workspace Configuration - Create .vscode/mcp.json:
{
"servers": {
"maven-tools": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "SPRING_PROFILES_ACTIVE=docker", "arvindand/maven-tools-mcp:latest"]
}
}
}
Option 2: User Settings - Add to your VS Code settings:
{
"mcp": {
"servers": {
"maven-tools": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "SPRING_PROFILES_ACTIVE=docker", "arvindand/maven-tools-mcp:latest"]
}
}
}
}
Usage: Open the Chat view (Ctrl+Alt+I), select Agent mode, then use the Tools button to enable Maven tools.
Alternative Setup Methods
Using Docker Compose
Alternative Claude Desktop configuration (if you prefer compose):
Download docker-compose.yml and configure:
{
"mcpServers": {
"maven-tools": {
"command": "docker",
"args": [
"compose", "-f", "/absolute/path/to/docker-compose.yml",
"run", "--rm", "maven-tools-mcp"
]
}
}
}
For development/testing only:
docker compose up -d
Build from Source (for contributors)
Prerequisites:
git clone https://github.com/arvindand/maven-tools-mcp.git
cd maven-tools-mcp
./mvnw clean package -Pci
./mvnw clean package -Pfull
java -jar target/maven-tools-mcp-1.4.0.jar
Claude Desktop configuration for JAR:
{
"mcpServers": {
"maven-tools": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/maven-tools-mcp-1.4.0.jar"
]
}
}
}
Build Scripts
For easier builds, use the provided scripts in the build/ folder:
./build/build.sh
.\build\build.cmd
💻 Usage Examples
Getting Started Examples
- Simple Questions:
- "Get latest Spring Boot version but prioritize stable releases"
- "Check if Kotlin 1.9.0 exists and what stability type it is"
- "Show me latest stable version of Retrofit for production deployment"
- Multi - Build Tool Support:
- "Check these Gradle dependencies: org.jetbrains.kotlin:kotlin - stdlib,com.squareup.retrofit2:retrofit"
- "I need stable versions only for my SBT project dependencies"
- "Compare my Maven versions but only suggest stable upgrades for production"
- Advanced Stability Controls:
- "Check multiple dependencies but filter to stable versions only"
- "Compare my current versions with onlyStableTargets=true for safety"
- "Get complete analysis but prefer stable versions in results"
Advanced Usage
Dependency Age Analysis
Usage: "How old is my Spring Boot dependency and should I update it?"
Tool: analyze_dependency_age
{
"dependency": "org.springframework.boot:spring-boot-starter",
"age_classification": "current",
"days_since_release": 45,
"recommendation": "Actively maintained - consider updating if needed"
}
Release Pattern Analysis
Usage: "What's the maintenance pattern for Jackson? When might the next release be?"
Tool: analyze_release_patterns
{
"dependency": "com.fasterxml.jackson.core:jackson-core",
"maintenance_level": "active",
"release_velocity": 1.2,
"next_release_prediction": "Expected in 3 weeks"
}
Project Health Check
Usage: "Give me a health assessment for all my key dependencies"
Tool: analyze_project_health
{
"overall_health": "good",
"average_health_score": 78,
"age_distribution": {"fresh": 2, "current": 8, "aging": 3, "stale": 1}
}
Version Timeline Intelligence
Usage: "Show me the recent release timeline for JUnit with gap analysis"
Tool: get_version_timeline
{
"insights": ["High release frequency indicates active development"],
"recent_activity": {"activity_level": "active", "releases_last_quarter": 4}
}
📚 Documentation
Available Tools
Core Maven Intelligence Tools (8 tools)
| Tool |
Purpose |
Key Features |
get_latest_version |
Get newest version by type with stability preferences |
preferStable parameter, all version types |
check_version_exists |
Verify if specific version exists with type info |
Works with any JVM build tool |
check_multiple_dependencies |
Check multiple dependencies with filtering |
stableOnly parameter, bulk operations |
compare_dependency_versions |
Compare current vs latest with upgrade recommendations |
includeMigrationGuidance flag |
analyze_dependency_age |
Classify dependencies as fresh/current/aging/stale |
includeModernizationGuidance flag |
analyze_release_patterns |
Analyze maintenance activity and predict releases |
monthsToAnalyze parameter, velocity trends |
get_version_timeline |
Enhanced version timeline with temporal analysis |
versionCount parameter, release gap detection |
analyze_project_health |
Comprehensive health analysis for multiple dependencies |
includeUpgradeStrategy flag |
Raw Context7 Documentation Tools (2 tools - Enabled by Default)
| Tool |
Purpose |
Key Features |
resolve-library-id |
Search for library documentation |
Always available (context7.enabled=true by default) |
get-library-docs |
Get library documentation by ID |
Always available (context7.enabled=true by default) |
Tool Parameters
Core Parameters
preferStable - Prioritize stable versions in analysis
stableOnly - Filter to production - ready versions only
onlyStableTargets - Only suggest upgrades to stable versions
Analytical Parameters
maxAgeInDays - Set acceptable age threshold for dependencies
monthsToAnalyze - Specify analysis period for release patterns (default: 24)
versionCount - Number of recent versions to analyze in timeline (default: 20)
includeRecommendations - Include detailed recommendations in health analysis
Context7 Integration
Context7 integration is enabled by default (context7.enabled=true). Maven tools automatically include explicit orchestration instructions in response models when upgrades or modernization are needed. Additionally, the server acts as an MCP client to expose raw Context7 tools (resolve-library-id, get-library-docs) directly to your AI assistant. When disabled, responses contain only core dependency analysis without orchestration instructions or Context7 tools.
Raw Context7 MCP Tools
resolve-library-id
Search for library documentation using intelligent name resolution.
Parameters:
libraryName (string, required): Search term for library lookup (e.g., "spring boot", "testcontainers")
Example:
{
"libraryName": "testcontainers postgresql"
}
get-library-docs
Get comprehensive documentation for a library using its Context7 ID.
Parameters:
context7CompatibleLibraryID (string, required): Context7 - compatible library ID (from resolve - library - id)
topic (string, optional): Topic for focused documentation (e.g., "setup", "migration", "configuration")
tokens (integer, optional): Maximum tokens to retrieve (default: 10000)
Example:
{
"context7CompatibleLibraryID": "/testcontainers/testcontainers-java",
"topic": "postgresql setup",
"tokens": 5000
}
🔧 Technical Details
- Framework: Spring Boot 3.5.4 with Spring AI MCP
- MCP Protocol: 2024 - 11 - 05
- Java Version: 24
- Transport: stdio
- HTTP Client: Spring Web RestClient
- Cache: Caffeine (24 - hour TTL, 2000 entries max)
- Data Source: Maven Central Repository (maven - metadata.xml files)
📖 References & Resources
Model Context Protocol (MCP)
Spring AI MCP
Maven Central Repository
Context7 MCP Server
🏢 Enterprise & Custom Clients
This server implements MCP Protocol 2024 - 11 - 05 with stdio transport, making it compatible with any MCP - compliant client.
⚙️ Configuration
The server can be configured via application.yaml:
spring:
cache:
type: caffeine
maven:
central:
repository-base-url: https://repo1.maven.org/maven2
timeout: 10s
max-results: 100
logging:
level:
root: ERROR
🤔 Frequently Asked Questions
Q: How is this different from Dependabot/Renovate?
A: Those tools create automated PRs. This gives you instant, interactive dependency intelligence through your AI assistant for decision - making and planning.
Q: How much time does this actually save?
A: For single dependencies: from 3 - 5 seconds (web search) to <100ms. For 20+ dependencies: from 60+ seconds of manual searching to <500ms bulk analysis.
Q: Why not just search Maven Central directly?
A: This reads maven - metadata.xml files directly from the Maven Central repository, providing structured, cached responses optimized for AI consumption with intelligent version classification and bulk operations - plus the time savings above.
Q: Can this replace my IDE's dependency management?
A: No, it complements your IDE by providing instant dependency intelligence during natural conversations with AI assistants for planning and decision - making.
Q: What AI assistants does this work with?
A: Any MCP - compatible assistant including Claude Desktop, GitHub Copilot, and other MCP clients. Works through natural conversation.
Q: Does it work with private Maven repositories?
A: Currently only Maven Central.
Q: What about Gradle dependencies?
A: Maven Central hosts both Maven and Gradle dependencies, so it works for Gradle projects too (using Maven coordinates).
Q: What is Context7 and how does the guided delegation work?
A: Context7 is an MCP server by Upstash that provides up - to - date documentation and code examples. Maven Tools MCP uses a guided delegation architecture - our tools provide explicit orchestration instructions to help your AI assistant effectively use the raw Context7 tools when documentation is needed. This includes clear step - by - step tool usage instructions with web search fallback for resilient documentation access.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👨💻 Author
Arvind Menon