Maven Dependencies MCP server

Integrates with Maven Central Repository to verify and retrieve dependency versions for automated project management and updates.
Back to servers
Setup instructions
Provider
Bigsy
Release date
Dec 17, 2024
Language
TypeScript
Stats
22 stars

Maven Dependencies MCP Server provides tools for checking Maven dependency versions. It enables LLMs to verify Maven dependencies and retrieve their latest versions from Maven Central Repository, helping you keep your projects up-to-date with the correct dependencies.

Installation

You can install this MCP server globally using npm:

npm install -g mcp-maven-deps

Or run it directly using npx:

npx mcp-maven-deps

Installing via Smithery

To install Maven Dependencies Server for Claude Desktop automatically via Smithery:

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

Configuration

Add the server to your MCP settings configuration file:

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

If installed globally, you can also use:

{
  "mcpServers": {
    "maven-deps-server": {
      "command": "mcp-maven-deps"
    }
  }
}

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:

# Local access only (default host: localhost)
npx mcp-maven-deps --port=3000

# Remote access
npx mcp-maven-deps --host=0.0.0.0 --port=3000

When using SSE transport in your MCP settings:

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

For remote access, use the server's IP or hostname in your client configuration:

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

Available Tools

get_latest_release

Retrieves the latest stable release version of a Maven dependency. By default, this excludes pre-release versions.

Input Schema:

{
  "type": "object",
  "properties": {
    "dependency": {
      "type": "string",
      "description": "Maven coordinate in format \"groupId:artifactId[:version][:packaging][:classifier]\" (e.g. \"org.springframework:spring-core\" or \"org.springframework:spring-core:5.3.20:jar\")"
    },
    "excludePreReleases": {
      "type": "boolean",
      "description": "Whether to exclude pre-release versions (alpha, beta, milestone, RC, snapshot). Default: true",
      "default": true
    }
  },
  "required": ["dependency"]
}

Example Usage:

// Get latest stable release (default behavior)
const result1 = await mcpClient.callTool("maven-deps-server", "get_latest_release", {
  dependency: "org.springframework:spring-core"
});
// Returns: "6.2.8" (latest stable, excludes "7.0.0-M6" milestone)

// Include pre-releases if needed
const result2 = await mcpClient.callTool("maven-deps-server", "get_latest_release", {
  dependency: "org.springframework:spring-core",
  excludePreReleases: false
});
// Returns: "7.0.0-M6" (includes pre-releases)

check_maven_version_exists

Checks if a specific version of a Maven dependency exists.

Input Schema:

{
  "type": "object",
  "properties": {
    "dependency": {
      "type": "string",
      "description": "Maven coordinate in format \"groupId:artifactId[:version][:packaging][:classifier]\" (e.g. \"org.springframework:spring-core\" or \"org.springframework:spring-core:5.3.20:jar\")"
    },
    "version": {
      "type": "string",
      "description": "Version to check if not included in dependency string"
    }
  },
  "required": ["dependency"]
}

Example Usage:

// Using version in dependency string
const result1 = await mcpClient.callTool("maven-deps-server", "check_maven_version_exists", {
  dependency: "org.springframework:spring-core:5.3.20"
});

// Using separate version parameter
const result2 = await mcpClient.callTool("maven-deps-server", "check_maven_version_exists", {
  dependency: "org.springframework:spring-core",
  version: "5.3.20"
});

list_maven_versions

Lists Maven dependency versions sorted by last updated date with optional pre-release filtering.

Input Schema:

{
  "type": "object",
  "properties": {
    "dependency": {
      "type": "string",
      "description": "Maven coordinate in format \"groupId:artifactId[:packaging][:classifier]\" (e.g. \"org.springframework:spring-core\" or \"org.springframework:spring-core:jar\")"
    },
    "depth": {
      "type": "number",
      "description": "Number of versions to return (default: 15)",
      "minimum": 1,
      "maximum": 100
    },
    "excludePreReleases": {
      "type": "boolean",
      "description": "Whether to exclude pre-release versions (alpha, beta, milestone, RC, snapshot). Default: true",
      "default": true
    }
  },
  "required": ["dependency"]
}

Example Usage:

// Get last 15 stable versions (default - excludes pre-releases)
const result1 = await mcpClient.callTool("maven-deps-server", "list_maven_versions", {
  dependency: "org.springframework:spring-core"
});
// Returns only stable versions: "6.2.8 (2025-06-12)\n6.1.21 (2025-06-12)\n6.2.7 (2025-05-15)\n..."

// Get last 5 versions including pre-releases
const result2 = await mcpClient.callTool("maven-deps-server", "list_maven_versions", {
  dependency: "org.springframework:spring-core",
  depth: 5,
  excludePreReleases: false
});
// Returns: "7.0.0-M6 (2025-06-12)\n6.2.8 (2025-06-12)\n6.1.21 (2025-06-12)\n7.0.0-M5 (2025-05-15)\n6.2.7 (2025-05-15)"

Pre-release Detection

The server automatically detects pre-release versions using the following patterns:

  • Alpha: -alpha, -a
  • Beta: -beta, -b
  • Milestone: -milestone, -m, -M
  • Release Candidate: -rc, -cr
  • Snapshot: -snapshot

Examples:

  • 7.0.0-M6 → Pre-release (milestone)
  • 6.2.8 → Stable release
  • 3.1.0-SNAPSHOT → Pre-release (snapshot)
  • 2.5.0-RC1 → Pre-release (release candidate)

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "maven-deps-server" '{"command":"npx","args":["mcp-maven-deps"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later