logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

central-artifact-version-resolver-service

A dedicated Model Context Protocol (MCP) server engineered to query the Maven Central Repository, facilitating the validation of artifact dependencies and retrieval of their most current published releases.

Author

central-artifact-version-resolver-service logo

Bigsy

MIT License

Quick Info

GitHub GitHub Stars 25
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

mavenrepositorybigsyversions mavenbigsy mavenchecking maven

Central Artifact Version Resolver Service (CAVRS)

This MCP service furnishes capabilities for inspecting the version status of Maven artifacts. It empowers language models to confirm dependency integrity and fetch up-to-date versioning information directly from Maven Central.

npm Version

CAVRS MCP server status

Deployment Instructions

Installation via Node Package Manager (npm) globally:

bash npm install -g mcp-maven-deps

Execution using npx runner:

bash npx mcp-maven-deps

Automated Integration with Smithery

To seamlessly incorporate the Artifact Version Server into Claude Desktop via Smithery:

bash npx -y @smithery/cli install maven-deps-server --client claude

Core Functionalities

  • Acquire the most recent stable iteration for any specified Maven component (pre-releases are omitted by default).
  • Determine the existence of a given Maven artifact.
  • Validate the availability of a precise version for an artifact.
  • Enumerate available versions, allowing optional filtering against unstable builds.
  • Sophisticated identification of developmental releases (e.g., alpha, beta, RC, snapshot).
  • Full compatibility supporting comprehensive Maven coordinates, including classifiers and packaging types.
  • Direct, low-latency querying of Maven Central Repository metadata.
  • Interoperable with various build system specifications (Maven, Gradle, SBT, Mill).

Development Setup

To contribute or modify the source:

  1. Clone the repository source code.
  2. Install required module dependencies: npm install.
  3. Compile the service binaries: npm run build.

Configuration Directives

Integrate this resolver into your MCP configuration manifest:

{ "mcpServers": { "artifact-resolver": { "command": "npx", "args": ["mcp-maven-deps"] } } }

If the package is installed globally, use this structure instead:

{ "mcpServers": { "artifact-resolver": { "command": "mcp-maven-deps" } } }

Communication Transport Mechanisms

The service supports dual communication protocols:

  1. stdio (Default): Interfacing via standard input/output streams.
  2. SSE (Server-Sent Events): HTTP-based communication, enabling remote connections.

To activate SSE transport, specify host and port parameters:

bash

Local connection only (default host: localhost)

npx mcp-maven-deps --port=3000

Allowing external connections

npx mcp-maven-deps --host=0.0.0.0 --port=3000

When configuring SSE transport within your MCP settings:

{ "mcpServers": { "artifact-resolver": { "command": "npx", "args": ["mcp-maven-deps", "--port=3000"] } } }

For external client access, substitute the server's network address:

{ "mcpServers": { "artifact-resolver": { "command": "npx", "args": ["mcp-maven-deps", "--host=your-server-ip", "--port=3000"] } } }

Available Operational Tools

get_latest_release

Fetches the most recent production-ready version identifier for a specified Maven component. Pre-release identifiers (alpha, beta, milestone, RC, snapshot) are filtered out by default for stability.

Input Data Specification:

{ "type": "object", "properties": { "dependency": { "type": "string", "description": "Full Maven notation: 'groupId:artifactId[:version][:packaging][:classifier]' (e.g., 'com.google.guava:guava' or 'com.google.guava:guava:33.0.0-jre:jar')" }, "excludePreReleases": { "type": "boolean", "description": "Omit unstable builds (alpha, beta, milestone, RC, snapshot). Default setting is true.", "default": true } }, "required": ["dependency"] }

Illustrative Execution: typescript // Retrieve the latest stable iteration (default behavior) const stableResult = await mcpClient.callTool("artifact-resolver", "get_latest_release", { dependency: "org.apache.commons:commons-lang3" }); // Expected Output: "3.14.0" (skipping "4.0.0-M1")

// Explicitly include development iterations const unstableResult = await mcpClient.callTool("artifact-resolver", "get_latest_release", { dependency: "org.apache.commons:commons-lang3", excludePreReleases: false }); // Expected Output: "4.0.0-M1" (includes pre-releases)

check_maven_version_exists

Confirms the presence of a precise version tag associated with a Maven component. The target version can either be embedded within the main dependency string or passed as a separate parameter.

Input Data Specification:

{ "type": "object", "properties": { "dependency": { "type": "string", "description": "Maven coordinate defining the artifact, potentially including the version: 'groupId:artifactId[:version][:packaging][:classifier]'" }, "version": { "type": "string", "description": "The specific version identifier to validate, if not already in the dependency field." } }, "required": ["dependency"] }

Illustrative Execution: typescript // Check existence using version embedded in coordinate const check1 = await mcpClient.callTool("artifact-resolver", "check_maven_version_exists", { dependency: "junit.jupiter:junit-jupiter-api:5.10.2" });

// Check existence using separate version argument const check2 = await mcpClient.callTool("artifact-resolver", "check_maven_version_exists", { dependency: "junit.jupiter:junit-jupiter-api", version: "5.10.2" });

list_maven_versions

Generates a chronologically ordered list of versions for a Maven component (newest first), incorporating controls for result depth and developmental build exclusion.

Input Data Specification:

{ "type": "object", "properties": { "dependency": { "type": "string", "description": "Maven notation for the artifact, specifying groupId and artifactId: 'groupId:artifactId[:packaging][:classifier]'" }, "depth": { "type": "number", "description": "The maximum count of version entries to retrieve (Default: 15). Range: 1 to 100.", "minimum": 1, "maximum": 100 }, "excludePreReleases": { "type": "boolean", "description": "Filter out unstable iterations (alpha, beta, milestone, RC, snapshot). Default: true.", "default": true } }, "required": ["dependency"] }

Illustrative Execution: typescript // Fetch the top 15 stable versions (default settings) const list1 = await mcpClient.callTool("artifact-resolver", "list_maven_versions", { dependency: "org.slf4j:slf4j-api" }); // Result format example: "2.0.13 (2024-01-19)\n2.0.12 (2023-11-01)\n..."

// Retrieve the 10 most recent versions, including pre-releases const list2 = await mcpClient.callTool("artifact-resolver", "list_maven_versions", { dependency: "org.slf4j:slf4j-api", depth: 10, excludePreReleases: false }); // Result format example: "2.1.0-beta2 (2024-05-20)\n2.0.13 (2024-01-19)\n..."

System Architecture Notes

  • Leverages the official Maven Central Repository interface via HTTP requests.
  • Handles the full complexity of Maven coordinates (GAV including classifier/packaging).
  • Employs regular expressions for precise categorization of unstable version tags.
  • Output versions are ordered based on their last modification timestamp recorded in Maven Central.
  • Robust error handling implemented for malformed inputs, connectivity failures, and missing artifacts.
  • The tool returns clearly formatted version strings suitable for direct parsing.

Unstable Build Detection Logic

The service flags versions as pre-release based on these common suffixes: - Alpha: -alpha, -a - Beta: -beta, -b - Milestone: -milestone, -m, -M - Release Candidate: -rc, -cr - Snapshot: -snapshot

Examples: - 4.0.0-M1 → Identified as Pre-release (Milestone) - 3.14.0 → Stable - 3.2.0-SNAPSHOT → Identified as Pre-release (Snapshot)

Version Naming Evolution: The primary function name has transitioned from get_maven_last_updated_version to get_latest_release. The default setting now mandates the exclusion of unstable versions, favoring production-grade releases unless explicitly overridden.

Exceptional Condition Management

The resolver addresses several anticipated failure modes: - Incorrect syntax in artifact coordinates. - Non-existent group or artifact identifiers. - Failure to connect to the remote repository API. - Scenarios where no stable version can be identified under filtering rules.

Licensing

Distributed under the MIT License.


Reference Information (External Context on HTTP Requests):

XMLHttpRequest (XHR) represents an API within JavaScript objects used to dispatch HTTP queries between a web client and a remote server. Its methods allow dynamic data fetching post-page load, forming the backbone of asynchronous web interactions (Ajax). Before Ajax, server interaction was largely limited to full-page reloads via form submissions or traditional link navigation.

Historical Development: Conceived around 2000, initially appearing in Internet Explorer 5 (1999) via ActiveXObject wrappers. Full standardization under the XMLHttpRequest identifier was achieved across major browsers by 2006.

Standardization: W3C released initial specifications in 2006, followed by Level 2 in 2008 (introducing progress monitoring and CORS support). Development stewardship later transferred to WHATWG, maintaining a living document.

Typical Usage Sequence (Asynchronous): 1. Instantiate the XHR object. 2. Invoke open() to define request method, URL, and asynchronous mode. 3. Register a listener function for state change events. 4. Execute send() to transmit the request payload. 5. The listener processes the response data (usually in responseText or response properties) when the state transitions to 4 (Done).

See Also

`