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.
You can install this MCP server globally using npm:
npm install -g mcp-maven-deps
Or run it directly using npx:
npx mcp-maven-deps
To install Maven Dependencies Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install maven-deps-server --client claude
- 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
Add the server to your MCP settings configuration file:
{
"mcpServers": {
"maven-deps-server": {
"command": "npx",
"args": ["mcp-maven-deps"]
}
}
}
If installed globally, you can also use:
{
"mcpServers": {
"maven-deps-server": {
"command": "mcp-maven-deps"
}
}
}
Retrieves the latest version of a Maven dependency.
Input Schema:
{
"type": "object",
"properties": {
"dependency": {
"type": "string",
"description": "Maven coordinate in format \"groupId:artifactId[:version][:packaging][:classifier]\" (e.g. \"org.springframework:spring-core\" or \"org.springframework:spring-core:5.3.20:jar\")"
}
},
"required": ["dependency"]
}
Example Usage:
const result = await mcpClient.callTool("maven-deps-server", "get_maven_latest_version", {
dependency: "org.springframework:spring-core"
});
// Returns: "6.2.2"
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:
{
"type": "object",
"properties": {
"dependency": {
"type": "string",
"description": "Maven coordinate in format \"groupId:artifactId[:version][:packaging][:classifier]\" (e.g. \"org.springframework:spring-core\" or \"org.springframework:spring-core:5.3.20:jar\")"
},
"version": {
"type": "string",
"description": "Version to check if not included in dependency string"
}
},
"required": ["dependency"]
}
Example Usage:
// Using version in dependency string
const result1 = await mcpClient.callTool("maven-deps-server", "check_maven_version_exists", {
dependency: "org.springframework:spring-core:5.3.20"
});
// Using separate version parameter
const result2 = await mcpClient.callTool("maven-deps-server", "check_maven_version_exists", {
dependency: "org.springframework:spring-core",
version: "5.3.20"
});
- 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
The server handles various error cases:
- Invalid dependency format
- Invalid version format
- Non-existent dependencies
- API connection issues
- Malformed responses
- Missing version information
To modify or extend the server:
- Make changes to
src/index.ts
- Rebuild using
npm run build
- Restart the MCP server to apply changes
MIT