maven-mcp-server
Maven Dependencies MCP Server
An MCP (Model Context Protocol) server that provides tools for checking Maven dependency versions. This server enables LLMs to verify Maven dependencies and retrieve their latest versions from Maven Central Repository.
<a href="https://glama.ai/mcp/servers/juuo2ye0qi"><img width="380" height="200" src="https://glama.ai/mcp/servers/juuo2ye0qi/badge" alt="maven-mcp-server MCP server" /></a>
Features
- Query the latest version of any Maven dependency
- Verify if a Maven dependency exists
- Check if a specific version of a dependency exists
- Real-time access to Maven Central Repository data
Installation
- Clone or download this repository
- Install dependencies:
- Build the server:
Configuration
Add the server to your MCP settings configuration file:
Available Tools
get_maven_latest_version
Retrieves the latest version of a Maven dependency.
Input Schema:
Example Usage:
check_maven_version_exists
Checks if a specific version of a Maven dependency exists.
Input Schema:
Example Usage:
Example Responses
Latest Version Check
Version Existence Check
Implementation Details
- Uses Maven Central's REST API to fetch dependency information
- Sorts results by timestamp to ensure the latest version is returned
- Includes error handling for invalid dependencies and API issues
- Returns clean, parseable version strings for valid dependencies
- Provides boolean responses for version existence checks
Error Handling
The server handles various error cases:
- Invalid dependency format
- Invalid version format
- Non-existent dependencies
- API connection issues
- Malformed responses
Development
To modify or extend the server:
- Make changes to
src/index.ts
- Rebuild using
npm run build
- Restart the MCP server to apply changes
License
MIT
An MCP (Model Context Protocol) server that provides tools for checking Maven dependency versions. This server enables LLMs to verify Maven dependencies and retrieve their latest versions from Maven Central Repository.