Skip to main content
Glama

maven-mcp

Agent plugin for Claude Code, Grok Build, Cursor, and Codex that provides Maven dependency intelligence via an MCP server — query artifact versions, scan projects for outdated dependencies, check for vulnerabilities, and fetch changelogs.

How it works

The plugin bundles a single-file Python 3 MCP server (plugin/server/server.py) that speaks MCP over stdio (JSON-RPC 2.0 on stdin/stdout) or over a stateless Streamable HTTP endpoint. It uses the Python standard library only — zero pip dependencies. The plugin registers the server via .mcp.json (Claude Code, Grok Build) and mcp.json (Cursor, Codex), both command: python3, so it installs with no extra runtime setup. The server can also be run standalone and connected to any MCP-compatible agent — see Use with any MCP client.

Version lookups use the repositories the build file declares. Maven Central, Google Maven, and the Gradle Plugin Portal are used when that scope declares none. Private repositories need credentials — see Configuration.

Gradle scanning runs the project's wrapper once and reads production runtime classpaths (*RuntimeClasspath), then merges declared provenance from build files and version catalogs. Maven scanning reads pom.xml locally.

Tools

Tool

Description

get_latest_version

Find latest version of an artifact with stability-aware selection

check_version_exists

Verify if a specific version exists and classify its stability

check_multiple_dependencies

Bulk lookup of latest versions for multiple dependencies

compare_dependency_versions

Compare current versions against latest (major/minor/patch)

get_dependency_changes

Show changes between versions (AndroidX docs, then AGP docs, then GitHub releases; CHANGELOG.md on the default branch when no release body is usable)

scan_project_dependencies

Scan Gradle/Maven build files and Gradle version catalogs (gradle/libs.versions.toml) for dependencies

expand_bom

Expand a Maven BOM into managed dependency versions

get_transitive_graph

Resolved transitive dependency graph for a GAV via deps.dev

get_vulnerability_paths

Shortest dependency path from a project root GAV to each transitively vulnerable node (deps.dev graph + OSV.dev)

detect_dependency_conflicts

Flag GAs resolved at multiple versions (Gradle: from resolved scan usages; Maven: deps.dev per-root graphs with nearest-wins)

check_version_compatibility

Check Spring Boot / AGP / Kotlin / javax→jakarta compatibility

get_dependency_vulnerabilities

Check for known CVEs via OSV.dev

get_dependency_health

Assess adoption-worthiness: version/stability, GitHub activity, issue dynamics, license, owner — raw signals for a verdict

get_dependency_license

SPDX / category license intelligence for direct dependencies

check_license_compliance

Aggregate transitive licenses via deps.dev; flag copyleft/risky vs project policy

search_artifacts

Search artifacts (Maven Central Solr; Nexus/Artifactory in closed mode)

audit_project_dependencies

Full audit: scan + version compare + vulnerability check

catalog_entry

Generate/validate Gradle version-catalog entries (libs.versions.toml) with rule-correct aliases and minimal diffs

verify_coordinates

Tri-state existence check + did-you-mean for hallucinated coordinates

get_eol_status

End-of-life / support status for JDK (vendor-specific), Kotlin, Gradle, and Spring Boot via endoflife.date

compare_upgrade_closure

Compare an upgrade's closure. Gradle when a wrapper exists; deps.dev is the single-upgrade fallback

Skills

Claude Code keeps a listing of every installed skill's name and description in context, on a budget of ~1% of the model's context window; when the listing overflows, descriptions get dropped. Twenty-two entries from one plugin consume that budget on their own, so only the skills whose body adds a workflow beyond a single tool call stay model-routed. The rest are manual: the slash command and the underlying MCP tool are unchanged, Claude just no longer carries their descriptions in every session.

Model-routed — Claude picks these up on its own, and you can also invoke them by name:

Skill

Description

/latest-version <groupId:artifactId>

Find latest version of a Maven artifact

/check-deps

Scan project for outdated dependencies and update them

/check-deps-vulnerabilities

Scan project dependencies for known CVEs/GHSA via OSV (includes Gradle/Maven submodules)

/audit-project-dependencies

One combined report: updates + vulnerabilities + optional license posture

/check-version-compatibility

Validate AGP/Gradle/JDK/Kotlin and Spring Boot BOM/javax→jakarta compatibility

/dependency-changes

Show release notes/changelog between two versions of a Maven/Gradle dependency

/dependency-health

Assess whether a Maven dependency is worth adopting (maintenance, activity, license, owner)

/catalog-entry

Generate or validate a Gradle version-catalog (libs.versions.toml) entry

Manual only (disable-model-invocation: true) — invoke by name; Claude reaches the same capability through the MCP tool above:

Skill

Description

/check-version-exists

Confirm whether one specific, already-known version exists

/check-multiple-versions

Batch latest-version lookup for several artifacts being evaluated

/compare-dependency-versions

Compare specific current versions against latest and classify the upgrade type

/scan-project-dependencies

Raw inventory of a project's declared dependencies (no freshness/CVE check)

/expand-bom

Expand a Maven BOM/platform into its managed dependency versions

/transitive-graph

Resolved transitive dependency graph for a single GAV

/vulnerability-paths

Trace each transitively vulnerable dependency back to the project root

/dependency-conflicts

Flag GAs resolved at multiple versions across a project

/dependency-vulnerabilities

Check specific named coordinates for known CVEs/GHSA, outside a project scan

/dependency-license

SPDX/category license intelligence for specific dependencies

/license-compliance

Aggregate transitive licenses vs a project license policy; flag copyleft/violations

/search-artifacts

Search Maven Central (or Nexus/Artifactory in closed mode) by keyword

/eol-status

Check end-of-life / support status for JDK, Kotlin, Gradle, or Spring Boot

/upgrade-closure

Compare an upgrade closure (Gradle when a wrapper exists, otherwise one deps.dev upgrade); advisory only

Supported build systems

  • Gradle — build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts

  • Maven — pom.xml

  • Version catalogs — gradle/libs.versions.toml

Related MCP server: Maven Decoder MCP Server

Requirements

  • Python 3.9+ — the server uses the standard library only; no pip dependencies.

  • jq and timeout / gtimeout — used by the write-time hooks. On macOS, timeout comes from brew install coreutils (gtimeout). Without them the hooks do nothing and the edit proceeds. The MCP server itself does not need either.

Configuration

Variable

Default

Effect

GITHUB_TOKEN

unset

GitHub API limit 60 → 5000 requests/hour for changelogs and health

MAVEN_MCP_OFFLINE

off

Skip public Maven, Google, Plugin Portal, and enrichment APIs

MAVEN_MCP_CACHE_DISABLE

off

Skip the on-disk response cache

MAVEN_MCP_TRANSPORT

stdio

http serves POST /mcp

Cache location, private-repo credentials, mirrors, TLS, and the rest of the variables: docs/configuration.md.

Installation

Claude Code (marketplace)

/plugin marketplace add kirich1409/maven-mcp
/plugin install maven-mcp@maven-mcp

Grok Build (marketplace)

grok plugin marketplace add kirich1409/maven-mcp
grok plugin install maven-mcp@maven-mcp --trust

--trust is required for the bundled MCP server and write-guard hooks to run. Reload plugins (r in the Plugins tab) or start a new session after install.

Cursor and Codex (npx plugins)

npx plugins add kirich1409/maven-mcp

The plugins CLI detects installed agents and installs into each of them. plugin/ ships three manifests over the same skills/, server, and hook scripts:

Manifest

Read by

Skills + MCP server

Write-time guard

.claude-plugin/plugin.json + .mcp.json + hooks/hooks.json

Claude Code, Grok Build

yes

blocks (deny)

.codex-plugin/plugin.json + mcp.json (hooks from hooks/hooks.json)

Codex

yes

runs, but does not block: Codex applies an apply_patch write even after deny and may not show the reason (openai/codex#27833)

.cursor-plugin/plugin.json + mcp.json + hooks/cursor-hooks.json

Cursor

yes

preToolUse reply with permission

There is deliberately no root plugin.json (Agent Plugins 1.0 manifest). With one present, Codex loads the package through its Agent Plugins loader, ignores .codex-plugin/plugin.json, and silently disables every hook (openai/codex#39895). It comes back once that is fixed; mcp.json already uses the Agent Plugins shape.

python3 (3.9+) must be on PATH, same as for the Claude Code plugin.

Local path (development)

# Claude Code
claude plugin marketplace add /path/to/maven-mcp
claude plugin install maven-mcp@maven-mcp

# Grok Build
grok plugin marketplace add /path/to/maven-mcp
grok plugin install maven-mcp@maven-mcp --trust

The plugin registers the bundled server via .mcp.json automatically; no separate install or build step is required.

npm, Homebrew, and an MCPB bundle are not install channels. Non-plugin clients use uv (uvx maven-mcp, or maven-mcp after uv tool install maven-mcp). uv downloads Python 3.9+; it is not preinstalled by local Claude Code, Codex, or Grok. Claude Code cloud VMs already have Python and uv. Web ChatGPT cannot spawn a local process and is HTTP-only (see below).

Use with any MCP client

Codex, Cursor, Claude Desktop, Gemini CLI, and Kimi run the published console script. The command is uvx maven-mcp (distribution name maven-mcp).

  • Kimi Code — ~/.kimi-code/mcp.json (user-level) or .kimi-code/mcp.json (project-level):

    {
      "mcpServers": {
        "maven-mcp": {
          "command": "uvx",
          "args": ["maven-mcp"]
        }
      }
    }
  • Cursor — ~/.cursor/mcp.json, same mcpServers shape as above.

  • Claude Desktop — claude_desktop_config.json, same mcpServers shape as above.

  • Gemini CLI — ~/.gemini/settings.json:

    {
      "mcpServers": {
        "maven-mcp": {
          "command": "uvx",
          "args": ["maven-mcp"]
        }
      }
    }
  • Codex — ~/.codex/config.toml (Codex Desktop may ignore a project .codex/config.toml; the user-level file is the one these steps use):

    [mcp_servers.maven-mcp]
    command = "uvx"
    args = ["maven-mcp"]

Environment variables (GITHUB_TOKEN, MAVEN_MCP_OFFLINE, …) can be passed through each client's env field. Plugin installs keep python3 and ${CLAUDE_PLUGIN_ROOT}/server/server.py in .mcp.json.

HTTP mode (remote / cloud agents)

For agents that cannot spawn a local process (cloud sandboxes, remote workspaces), the server also speaks stateless Streamable HTTP. Start it once:

MAVEN_MCP_TRANSPORT=http MAVEN_MCP_HTTP_HOST=127.0.0.1 MAVEN_MCP_HTTP_PORT=8765 \
  uvx maven-mcp

The MCP endpoint is http://<host>:<port>/mcp (single POST endpoint, JSON responses, no SSE). Connect with a URL-based entry instead of command:

  • Kimi Code (mcp.json): {"mcpServers": {"maven-mcp": {"url": "http://127.0.0.1:8765/mcp"}}}

  • Gemini CLI (settings.json): {"mcpServers": {"maven-mcp": {"httpUrl": "http://127.0.0.1:8765/mcp"}}}

  • Codex (config.toml): [mcp_servers.maven-mcp] with url = "http://127.0.0.1:8765/mcp"

MAVEN_MCP_HTTP_HOST defaults to 127.0.0.1 and MAVEN_MCP_HTTP_PORT to 8765. The HTTP transport has no authentication — bind it to localhost or a trusted network only; for exposure to cloud agents over the internet, put it behind a reverse proxy that terminates TLS and enforces auth.

Hooks

pre-edit-deps.sh runs before an edit to a Gradle, Maven, or version-catalog file. It can block a coordinate that looks hallucinated or is flagged malicious, and it can ask on a critical or high CVE, a typosquat-shaped package, or a toolchain mismatch. post-edit-deps.sh reminds you to run /check-deps. Both fail open: a missing jq, timeout/gtimeout, or a server error lets the edit through. Codex still applies apply_patch after a deny (openai/codex#27833).

Development

python3 -m unittest discover -s tests
python3 scripts/check-versions.py

Contribution branches come from develop, and the contract for coding agents is AGENTS.md. A release is a dispatch of Release on main, described in AGENTS.md.

License

MIT. See LICENSE.

Available Tools

21 tools
audit_project_dependenciesA
Read-only

Orchestrates a full dependency audit: scans project build files, checks for available updates, and optionally queries OSV.dev for vulnerabilities. Optional includeLicenses adds license categorization, summary, and newLicenseCategories (categories unique in the scanned set). Optional onlyIssues narrows the returned dependencies to only those with a signal (error, available upgrade, vulnerability, or license flag); summary always covers the full scanned set.

Inputs: onlyIssues, projectPath, productionOnly, includeLicenses, +1 more. Returns: summary, buildSystem, dependencies

catalog_entryA
Read-only

Generate or validate Gradle version-catalog (libs.versions.toml) entries. mode=generate builds a rule-correct [versions]/[libraries]/[plugins] snippet with kebab alias + libs/alias(libs.plugins.) accessor; mode=validate flags reserved aliases, invalid first subgroups, undefined version.ref, accessor clashes, id(libs.plugins.) misuse, and libs usage inside subprojects/buildscript. Returns a minimal diff suggestion, not a full file rewrite.

Inputs: mode (required), kind, alias, coordinate, +5 more. Returns: alias, entry, notes, accessor, +3 more

check_license_complianceA
Read-only

Aggregate SPDX licenses across the transitive closure of one or more Maven GAVs (deps.dev GetDependencies + GetVersion) and flag risky/incompatible licenses against a projectLicense posture or an explicit disallow list (SPDX ids and/or categories). Verdicts: ok / review / violation. Missing license metadata degrades to review, never a false ok. Heuristic policy signal — not legal advice; see notes[].

Inputs: dependencies (required), disallow, projectLicense. Returns: notes, errors, policy, partial, +3 more

check_multiple_dependenciesA
Read-only

Batch lookup of latest versions for multiple Maven dependencies.

Inputs: dependencies (required), projectPath. Returns: results

check_version_compatibilityA
Read-only

Check whether a set of versions is mutually compatible. Validates (1) dependency versions against the Spring Boot BOM (spring-boot-dependencies) when springBoot is set, (2) AGP↔Gradle↔JDK and Kotlin Gradle plugin↔Gradle/AGP ranges from a shipped matrix file, and (3) javax→jakarta EE coordinate migration when Spring Boot ≥ 3. Returns conflicts with suggested compatible versions and reference URLs. v1 coverage is intentionally bounded — see notes[] in the response; matrices are not scraped at runtime and must be refreshed via the documented procedure in compat-matrices.json.

Inputs: android, springBoot, projectPath, dependencies. Returns: notes, conflicts, compatible

check_version_existsA
Read-only

Check if a specific version of a Maven artifact exists in any repository resolved for the project: declared repositories first, then the public Maven Central / Google Maven / Gradle Plugin Portal fallback when the project declares none (see projectPath).

Inputs: groupId (required), version (required), artifactId (required), projectPath. Returns: exists, groupId, version, stability, +4 more

compare_dependency_versionsB
Read-only

Compare current dependency versions against the latest available and determine upgrade types (major/minor/patch).

Inputs: dependencies (required), projectPath. Returns: results, summary

compare_upgrade_closureA
Read-only

Compare a direct upgrade's closure before and after the candidate version. graphSource defaults to auto: Gradle when the project has a Gradle build and gradlew (two sequential resolves, up to 20 substitutions); otherwise deps.dev for exactly one upgrade. Gradle does not fall back to deps.dev after a failure. deps.dev is an isolated public graph, not a project resolve. advisory is not a safety verdict; none and unknown do not mean the coordinate is safe.

Inputs: upgrades (required), disallow, graphSource, projectPath, +3 more. Returns: error, notes, license, partial, +14 more

detect_dependency_conflictsA
Read-only

Detect version conflicts by unioning deps.dev transitive graphs for each direct project dependency. Flags GAs appearing at ≥2 versions and reports the version Maven nearest-wins or Gradle highest-wins would pick. Approximation of a full project resolve — see notes[] for limitations.

Inputs: buildSystem, projectPath. Returns: notes, errors, partial, strategy, +6 more

expand_bomA
Read-only

Expand a Maven BOM (Bill of Materials) into its managed dependency versions. Recursively expands import-scope BOMs with first-wins ordering.

Inputs: groupId (required), version (required), artifactId (required), projectPath. Returns: groupId, managed, version, artifactId

get_dependency_changesB
Read-only

Get changelog/release notes between two versions (AndroidX/AGP developer docs when applicable, else GitHub releases).

Inputs: groupId (required), toVersion (required), artifactId (required), fromVersion (required), +1 more. Returns: changes, groupId, toVersion, artifactId, +4 more

get_dependency_healthA
Read-only

Get health signals for Maven dependencies: version info, GitHub activity, issue stats, license, and maintenance signals. When the GitHub repository is known, also surfaces the OpenSSF Scorecard (overallScore + per-check name/score/reason) from deps.dev when one is on file — omitted (or flagged with capabilityUnavailable) when deps.dev has no scorecard for that repo, is offline, or is unreachable.

Inputs: dependencies (required), projectPath. Returns: results

get_dependency_licenseA
Read-only

Resolve license intelligence for Maven dependencies: SPDX id, category (permissive / weak-copyleft / strong-copyleft / network-copyleft / proprietary / unknown), plain-English notes, and source (pom / github / spdx-normalized). Uses POM plus optional GitHub license metadata; category mapping is a static lookup (no external license API).

Inputs: dependencies (required), projectPath. Returns: results

get_dependency_vulnerabilitiesA
Read-only

Check dependencies for known vulnerabilities using the OSV.dev database. Each dependency requires a pinned version — OSV lookups are version-specific and version-less coordinates are not queried. An empty vulnerabilities list means no known CVE/GHSA advisory was found for that coordinate+version in OSV.dev; it is NOT a safety guarantee (OSV coverage is incomplete and reporting lags real-world disclosure). When ≥1 vulnerability is found, a per-dependency safeUpgrade candidate is synthesized from the already-fetched fixed-version data (the highest fixed version across all known CVEs) — ADVISORY ONLY, a candidate to verify, never a guaranteed-safe pin; fixesAllKnown is false when at least one CVE has no known fix.

Inputs: dependencies (required), projectPath. Returns: results, capabilityUnavailable

get_eol_statusA
Read-only

Check end-of-life / support status for JDK, Kotlin, Gradle, and/or Spring Boot via endoflife.date. Provide one or more of kotlin/gradle/springBoot (a version string) and/or jdk ({vendor, version}) — at least one is required. endoflife.date has no generic "java" product: JDK end-of-life is vendor-specific (e.g. eclipse-temurin, amazon-corretto, oracle-jdk, redhat-build-of-openjdk), so jdk always requires an explicit vendor. Each requested version is matched to its endoflife.date release cycle (cycle granularity varies by product — Gradle/JDK vendors cycle by major version, Kotlin/Spring Boot by major.minor) and reports isEol/eolDate/isMaintained/isLts/latestInCycle for that cycle. A version with no matching cycle, or a product/vendor unknown to endoflife.date, surfaces a clear per-item error rather than failing the whole call.

Inputs: jdk, gradle, kotlin, springBoot. Returns: results, capabilityUnavailable

get_latest_versionB
Read-only

Get the latest version of a Maven artifact from Maven Central, Google Maven, or Gradle Plugin Portal.

Inputs: groupId (required), artifactId (required), projectPath, stabilityFilter. Returns: groupId, stability, artifactId, relocatedTo, +3 more

get_transitive_graphA
Read-only

Fetch the resolved transitive dependency graph for a Maven GAV via deps.dev GetDependencies. Returns nodes (g/a/v) and edges (from/to indices). Partial results are flagged when deps.dev is unreachable, returns errors, or the graph is truncated by the node cap.

Inputs: groupId (required), version (required), artifactId (required). Returns: edges, error, nodes, groupId, +7 more

get_vulnerability_pathsA
Read-only

Show the dependency path from a project root Maven GAV to each vulnerable transitive node. Fetches the deps.dev transitive graph, checks every unique node for known CVE/GHSA advisories via OSV.dev, and returns the shortest root-to-node path for each vulnerable dependency found — so a CVE deep in the tree can be traced back to which direct dependency pulls it in. An empty vulnerabilityPaths list means no known vulnerability was found in the graph; it is not a safety guarantee (same OSV coverage caveat as get_dependency_vulnerabilities). Partial results are flagged when deps.dev/OSV is unreachable, the graph is truncated by the node cap, or the unique-dependency count is truncated before querying OSV.

Inputs: groupId (required), version (required), artifactId (required). Returns: notes, groupId, partial, version, +5 more

scan_project_dependenciesA
Read-only

Scan a local project directory to extract declared dependencies from build files (Gradle, Maven). Applies BOM/platform managed versions (effectiveVersion/managedBy) via network POM fetch when platforms are declared.

Inputs: projectPath. Returns: buildSystem, dependencies, deadRepositoryHints

search_artifactsA
Read-only

Search Maven artifacts by keyword. Uses Maven Central Solr by default; in closed/offline mode (or with repositoryType) routes to Nexus 3 REST or Artifactory AQL/GAVC against MAVEN_MCP_REPOSITORY_BASE / mirrors.

Inputs: query (required), limit, projectPath, repositoryType. Returns: results, searchBackend

verify_coordinatesA
Read-only

Verify whether Maven coordinates exist (tri-state: exists / absent / unknown) and, for absent ones, suggest the closest real coordinates. Detects hallucinated / slopsquat-shaped names an LLM may invent. Existence is NOT a safety guarantee: a published typosquat reports exists and is not flagged. Suggestions are candidates to verify, not endorsements.

Inputs: dependencies (required), projectPath, suggestLimit. Returns: results

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools target distinct Maven dependency analysis concerns, and the detailed descriptions help separate overlapping areas like vulnerability lookup vs. vulnerability path tracing vs. full audit. However, the boundary between orchestration tools such as audit_project_dependencies and granular tools such as scan_project_dependencies or compare_upgrade_closure can still require careful reading.

    Naming Consistency4/5

    The set mostly follows a predictable snake_case verb_noun pattern (get_latest_version, check_version_exists, compare_dependency_versions, scan_project_dependencies). A few names deviate, such as catalog_entry and get_eol_status, but the overall convention is still readable and consistent.

    Tool Count3/5

    At 21 tools, the server sits in the heavy 16–25 range. While each tool addresses a real Maven dependency subproblem, the surface is large enough that it risks feeling sprawling for users who only need basic version or vulnerability checks.

    Completeness5/5

    The tool set covers a remarkably complete dependency-analysis lifecycle: version lookup, existence checks, batch comparison, changelogs, BOM expansion, transitive graphs, conflict detection, vulnerability paths, license compliance, EOL status, catalog validation, and full project audits. No obvious core operation for this domain appears missing.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    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
      173 npm
      34
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      A comprehensive MCP server for analyzing Maven jar files in the local repository, enabling AI agents to understand dependencies, analyze bytecode, and extract source code.
      17
      77 npm
      124 PyPI
      20
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      A secure-by-default MCP server and CLI for AI agents to inspect Spring Boot repositories and interact with runtime Actuator endpoints, enabling code review, dependency scanning, and monitoring.
      44
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      A local MCP server that scans repository dependencies for known vulnerabilities (CVEs) using OSV.dev, enriches findings with NVD and CISA KEV data, and supports triage, remediation, and accepted risk management directly from an AI coding assistant.
      6
      34 npm
      1
      MIT