Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

maven-mcp-server

MCP.Pizza Chef: Bigsy

The maven-mcp-server is a Model Context Protocol (MCP) server designed to provide tools for verifying Maven dependency versions. It allows large language models (LLMs) to interact with Maven Central Repository to check current versions of dependencies and retrieve the latest available versions. This server facilitates automated dependency management and version validation within AI-enhanced development workflows. It can be installed globally via npm or run directly with npx, and integrates easily with tools like Smithery for seamless setup. By exposing Maven dependency data in a structured, real-time manner, it empowers developers and AI agents to maintain up-to-date project dependencies efficiently.

Use This MCP server To

Check Maven dependency versions programmatically Retrieve latest versions of Maven dependencies Automate Maven dependency version validation Integrate Maven version checks into AI workflows Support LLMs in managing Java project dependencies

README

npm version

Maven Dependencies MCP Server

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.

maven-mcp-server MCP server

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

Features

  • Query the latest version of any Maven dependency
  • Verify if a Maven dependency exists
  • Check if a specific version of a dependency exists
  • Support for full Maven coordinates including packaging and classifier
  • Real-time access to Maven Central Repository data
  • Compatible with multiple build tool formats (Maven, Gradle, SBT, Mill)

For development:

  1. Clone this repository
  2. Install dependencies: npm install
  3. Build the server: npm run build

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_maven_latest_version

Retrieves the latest version of a Maven dependency.

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\")"
    }
  },
  "required": ["dependency"]
}

Example Usage:

const result = await mcpClient.callTool("maven-deps-server", "get_maven_latest_version", {
  dependency: "org.springframework:spring-core"
});
// Returns: "6.2.2"

check_maven_version_exists

Checks if a specific version of a Maven dependency exists. The version can be provided either in the dependency string or as a separate parameter.

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"
});

Implementation Details

  • Uses Maven Central's REST API to fetch dependency information
  • Supports full Maven coordinates (groupId:artifactId:version:packaging:classifier)
  • Sorts results by timestamp to ensure the latest version is returned
  • Includes error handling for invalid dependencies and API issues
  • Returns clean, parseable version strings for valid dependencies
  • Provides boolean responses for version existence checks

Error Handling

The server handles various error cases:

  • Invalid dependency format
  • Invalid version format
  • Non-existent dependencies
  • API connection issues
  • Malformed responses
  • Missing version information

Development

To modify or extend the server:

  1. Make changes to src/index.ts
  2. Rebuild using npm run build
  3. Restart the MCP server to apply changes

License

MIT

maven-mcp-server FAQ

How do I install the maven-mcp-server?
You can install it globally using npm with 'npm install -g mcp-maven-deps' or run it directly using 'npx mcp-maven-deps'.
Can I integrate maven-mcp-server with AI clients like Claude?
Yes, it can be installed automatically for Claude Desktop via Smithery using 'npx -y @smithery/cli install maven-deps-server --client claude'.
Does maven-mcp-server fetch data from Maven Central Repository?
Yes, it retrieves the latest Maven dependency versions directly from the Maven Central Repository.
Is maven-mcp-server compatible with multiple LLM providers?
Yes, it is designed to work with various LLMs including OpenAI, Claude, and Gemini by exposing Maven dependency data via MCP.
What programming languages or environments is maven-mcp-server intended for?
It is primarily intended for Java projects using Maven for dependency management.
How does maven-mcp-server help in dependency management?
It enables automated checking and retrieval of Maven dependency versions, helping keep project dependencies up to date.
Can I run maven-mcp-server without installing it globally?
Yes, you can run it directly using npx without global installation.
Is there a badge or status indicator for the maven-mcp-server?
Yes, the server's npm version badge and MCP server badge are available for monitoring.