SuperAPIAI Directory

maven-mcp-server

github.com · AI developer platforms

maven-mcp-server is an MCP (Model Context Protocol)-based server for querying Maven dependency versions. It enables large language models to verify Maven dependencies and retrieve the latest versions from the Maven Central repository. The server supports fetching the latest stable version, checking whether a dependency or a specified version exists, listing dependency versions in deployment order, and has pre-release version identification capability, supporting full Maven coordinates as well as formats for build tools such as Maven, Gradle, SBT, and Mill. It can be installed globally via npm or run directly with npx, and also supports installation for Claude Desktop via Smithery.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

Purpose: maven-mcp-server is an MCP (Model Context Protocol) server that provides LLMs with tools to check Maven dependency versions, enabling them to verify Maven dependencies and retrieve the latest version information from the Maven Central repository.

Key capabilities:

  • Retrieve the latest stable version of any Maven dependency (pre-release versions are excluded by default).
  • Verify whether a Maven dependency exists.
  • Check whether a specific version of a dependency exists.
  • List Maven dependency versions in deployment order, with optional pre-release filtering and depth control, outputting one version per line.
  • Intelligently identify pre-release versions, including patterns such as alpha, beta, milestone, RC, and snapshot.
  • Support full Maven coordinates (groupId:artifactId:version:packaging:classifier).
  • Access Maven Central repository data in real time.
  • Compatible with multiple build tool formats (Maven, Gradle, SBT, Mill).

Usage:

  • The MCP server can be installed globally via npm, or run directly with npx.
  • The Maven Dependencies Server can be automatically installed for Claude Desktop via Smithery.
  • During development, you can clone the repository, run npm install to install dependencies, run npm run build to build the server, and then add the server to the MCP settings configuration file.
  • Supports two transport modes: stdio (default, standard input/output communication) and SSE (Server-Sent Events, HTTP-based communication, with optional remote access). When using the SSE transport, host and port can be specified; for remote access, use the server's IP or hostname in the client configuration.

Available tools:

  • get_latest_release: Retrieve the latest stable version of a Maven dependency, excluding pre-release versions such as alpha, beta, milestone, RC, and snapshot by default, to ensure a production-ready version is obtained.
  • check_maven_version_exists: Check whether a specificversion of a Maven dependency exists; the version can be provided in the dependency string or as a separate parameter.
  • list_maven_versions: List Maven dependency versions in deployment order, newest first, with optional pre-release filtering and depth control, outputting one version per line.

Implementation details:

  • Directly query maven-metadata.xml on Maven Central (https://repo1.maven.org/maven2/<g>/<a>/maven-metadata.xml), which is the authoritative file that Maven and Gradle query during dependency resolution, updated within seconds after deployment, so results will not be stale.
  • Supports full Maven coordinates.
  • Uses regex pattern matching for intelligent pre-release detection.
  • Returns versions in the deployment order recorded in maven-metadata.xml (newest first).
  • Includes error handling for invalid dependencies and API issues.
  • Returns clean, parseable version strings for valid dependencies.
  • Version existence checks return a boolean response.

Pre-release detection patterns:

  • Alpha: -alpha, -a
  • Beta: -beta, -b
  • Milestone: -milestone, -m, -M
  • Release Candidate: -rc, -cr
  • Snapshot: -snapshot Examples: 7.0.0-M6 is a pre-release (milestone); 6.2.8 is a stable version; 3.1.0-SNAPSHOT is a pre-release (snapshot); 2.5.0-RC1 is a pre-release (release candidate).

Breaking change note: the tool has been renamed from get_maven_last_updated_version to get_latest_release, and now excludes pre-release versions by default, ensuring that production applications get stable versions by default while still allowing access to pre-release versions when needed.

Error handling: the server handles invalid dependency formats, invalid version formats, nonexistent dependencies, no stable version found (when filtering is enabled), API connection issues, malformed responses, missing version information, and other cases.

Modification and extension: modify src/index.ts, rebuild with npm run build, and restart the MCP server to apply changes.

Use cases: suitable for scenarios where an LLM needs to query and verify Maven dependency versions during the development workflow, or for integration into MCP-capable clients (such as Claude Desktop).

Limitations: the material does not provide information such as pricing, cost, platform compatibility details, or performance metrics.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools