Maven Dependencies MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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.
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
- Get the latest stable release of any Maven dependency (excludes pre-releases by default)
- Verify if a Maven dependency exists
- Check if a specific version of a dependency exists
- List Maven dependency versions with optional pre-release filtering
- Intelligent pre-release detection (alpha, beta, milestone, RC, snapshot)
- 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:
1. Clone this repository
2. Install dependencies: npm install
3. Build the server: npm run build
Configuration
Add the server to your MCP settings configuration file:
If installed globally, you can also use:
Transport Options
The server supports two transport modes:
1. **stdio** (default) - Standard input/output communication
2. **SSE** (Server-Sent Events) - HTTP-based communication with optional remote access
To use SSE transport, you can specify both host and port:
When using SSE transport in your MCP settings:
For remote access, use the server's IP or hostname in your client configuration:
Available Tools
get_latest_release
Retrieves the latest stable release version of a Maven dependency. By default, this excludes pre-release versions (alpha, beta, milestone, RC, snapshot) to ensure you get production-ready versions.
**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:**
list_maven_versions
Lists Maven dependency versions in deploy order, most recent first, with optional pre-release filtering and depth control. Output is one version per line.
**Input Schema:**
**Example Usage:**
Implementation Details
- Queries maven-metadata.xml on Maven Central directly (https://repo1.maven.org/maven2/ / /maven-metadata.xml) — the authoritative file Maven and Gradle themselves consult during dependency resolution. It updates within seconds of a deploy, so results are never stale.
- Supports full Maven coordinates (groupId:artifactId:version:packaging:classifier)
- Intelligent pre-release detection using regex pattern matching
- Returns versions in deploy order (most recent first) as recorded in maven-metadata.xml
- Includes error handling for invalid dependencies and API issues
- Returns clean, parseable version strings for valid dependencies