maven-mcp-server
<a href="https://www.npmjs.com/package/mcp-maven-deps"><img src="https://img.shields.io/npm/v/mcp-maven-deps.svg" alt="npm version" /></a>
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>
Installation
You can install this MCP server globally using npm:
Or run it directly using npx:
Installing via Smithery
To install Maven Dependencies Server for Claude Desktop automatically via Smithery:
Features
- Query the latest version of any Maven dependency
- Verify if a Maven dependency exists
- Check if a specific version of a dependency exists
- Support for full Maven coordinates including packaging and classifier
- Real-time access to Maven Central Repository data
- Compatible with multiple build tool formats (Maven, Gradle, SBT, Mill)
For development:
- Clone this repository
- Install dependencies:
npm install
- Build the server:
npm run build
Configuration
Add the server to your MCP settings configuration file:
If installed globally, you can also use:
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. The version can be provided either in the dependency string or as a separate parameter.
Input Schema:
Example Usage:
Implementation Details
- Uses Maven Central's REST API to fetch dependency information
- Supports full Maven coordinates (groupId:artifactId:version:packaging:classifier)
- 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
- Missing version information
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
You must be authenticated.
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.