npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

maven-artifacts-mcp

v0.2.1

Published

MCP Server for resolving Maven2 module versions with caching and logging

Readme

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

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

Stdio Mode (Recommended for Cursor)

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