Skip to main content
Glama
skhatri

maven-artifacts-mcp

by skhatri

Maven Version Resolver MCP Server

A TypeScript-based Model Context Protocol (MCP) server that provides Maven2 module version resolution capabilities with caching and logging.

Features

  • Latest stable version resolution from Maven Central

  • Pre-release filtering (excludes preview, RC, alpha, beta, snapshot, milestone versions)

  • 5-minute in-memory cache with automatic cleanup

  • Request/response logging

  • Error handling and input validation

Related MCP server: Maven Version Server

Installation from Source

npm install
npm run build

Usage

Stdio Mode (Default)

For MCP clients like Cursor:

npm start

Remote HTTP Server Mode

Run as a standalone network service:

# Start HTTP server on port 3001
npm run start:http

# Or with custom port
npm run dev:http -- --port 8080

Development Mode

# Stdio mode
npm run dev

# HTTP mode
npm run dev:http

Setup

Add to your .cursor-settings.json:

{
  "mcp": {
    "mcpServers": {
      "maven-resolver": {
        "command": "npx",
        "args": ["maven-artifacts-mcp", "--stdio"],
        "env": {
          "CACHE_TTL_MINUTES": "5",
          "MAVEN_API_TIMEOUT": "10000"
        }
      }
    }
  }
}

Remote HTTP Mode

Start the server: npm run start:http, then configure:

{
  "mcp": {
    "mcpServers": {
      "maven-resolver-remote": {
        "command": "http",
        "args": ["http://localhost:3001/sse"],
        "env": {
          "CACHE_TTL_MINUTES": "5",
          "MAVEN_API_TIMEOUT": "10000"
        }
      }
    }
  }
}

HTTP Endpoints:

  • GET /sse - MCP Server-Sent Events endpoint

  • GET /health - Health check endpoint

  • GET /tools - List available MCP tools and capabilities

Example /tools response:

curl http://localhost:3001/tools
{
  "service": "maven-mcp-server",
  "tools": [{"name": "latest_version", "description": "Get the latest stable version of a Maven artifact"}],
  "features": ["Filters out pre-release versions", "In-memory caching with 5-minute TTL"],
  "endpoints": {"health": "/health", "sse": "/sse", "tools": "/tools"}
}

Other environment variables like

    "HTTPS_PROXY": "http://myorg.proxy:8080",
    "HTTP_PROXY": "http://myorg.proxy:8080",
    "NO_PROXY": "localhost,127.0.0.1,.local"
    "LOG_LEVEL": "debug",
    "NODE_ENV": "development"       

can also be provided.

MCP Tool: latest_version

Retrieves the latest version information for a Maven artifact.

Parameters

Parameter

Type

Required

Description

groupId

string

Yes

Maven group ID (e.g., "org.springframework")

artifactId

string

Yes

Maven artifact ID (e.g., "spring-core")

Example Usage

{
  "tool": "latest_version",
  "arguments": {
    "groupId": "org.springframework",
    "artifactId": "spring-core"
  }
}

Response includes latest version, last updated timestamp, repository, cache status, and excluded pre-release versions.

Version Filtering

Automatically filters out pre-release versions:

  • Preview versions (e.g., 6.1.0-preview)

  • Release candidates (e.g., 6.1.0-RC1)

  • Alpha/Beta versions (e.g., 6.1.0-alpha)

  • Snapshots (e.g., 6.1.0-SNAPSHOT)

  • Milestones (e.g., 7.0.0-M1)

Configuration

Environment Variables

Variable

Default

Description

MAVEN_API_TIMEOUT

10000

API request timeout in milliseconds

CACHE_TTL_MINUTES

5

Cache TTL in minutes

LOG_LEVEL

info

Logging verbosity level

Npm Tasks

  • npm run build - Compile TypeScript

  • npm start - Start the server

  • npm run dev - Build and start in development mode

  • npm test - Run test suite

  • npm run test:coverage - Run tests with coverage

License

Apache 2.0 License

Available Tools

1 tool
latest_versionA

Get the latest version of a Maven artifact from Maven Central repository

ParametersJSON Schema
NameRequiredDescriptionDefault
groupIdYesMaven group ID (e.g., "org.springframework")
artifactIdYesMaven artifact ID (e.g., "spring-core")

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It only states the action but does not mention return format, error handling, network dependencies, or any other behavioral traits. This is a significant gap for a tool that could fail (e.g., artifact not found).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-formed sentence that is front-loaded and contains zero wasted words. It efficiently communicates the core purpose without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, but the description does not explain the return value format (e.g., whether it returns a plain version string or a structured object). With no output schema, the description should at least indicate the expected result. It also does not mention edge cases like nonexistent artifacts. This leaves some gaps for a complete picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with well-described parameters (groupId and artifactId). The description adds minimal extra meaning beyond the schema, so the baseline score of 3 is appropriate. It does confirm the Maven Central context, but the schema already provides the essential meanings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('latest version of a Maven artifact from Maven Central repository'). It is unambiguous and distinct even without sibling tools, fully clarifying what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you need the latest version of a Maven artifact) but does not explicitly mention when to use this tool versus alternatives. There are no sibling tools to compare against, and no exclusions or prerequisites are stated, so guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.2.1
    • First observedlatest_version

TDQS

B3.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or misselection. The single tool's purpose is clear and distinct.

Naming Consistency5/5

With only one tool, the naming is trivially consistent. There are no mixed conventions or conflicting patterns to evaluate.

Tool Count2/5

A single tool for a Maven artifacts server is far too few. The domain typically requires operations like listing versions, resolving metadata, or searching artifacts, making the count inadequate for the apparent scope.

Completeness1/5

The tool surface is severely incomplete, only offering the latest version lookup. Other essential operations for a Maven artifacts server are entirely absent, leaving obvious gaps that would prevent agents from performing common tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    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.
    3
    299 npm
    34
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    An MCP server for managing Maven dependency versions using direct metadata parsing from Maven Central. It provides tools to fetch latest stable versions, list version history, and compare versions with upgrade recommendations.
    4
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query Maven artifacts in JFrog Artifactory by reusing credentials from ~/.m2/settings.xml and providing tools like getting latest stable versions, listing artifacts, and checking dependency updates.
    -