Gradle MCP Server

MCP server that resolves external Java/Kotlin classes from Gradle dependencies — returns artifact coordinates and class structure in one call.

Local serverstdio

What is the Gradle MCP server?

MCP server that resolves external Java/Kotlin classes from Gradle dependencies — returns artifact coordinates and class structure in one call. Exposed over MCP by the gradle mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

A Model Context Protocol (MCP) server that lets AI agents look up external Java/Kotlin classes in a Gradle project in a single tool call — no more chains of find, grep, jar, and javap.

Its toolset

Everything the assistant can do here goes through one of these:

  • resolve_external_class — Resolve and inspect a class from external dependencies when you DON'T know which JAR contains it. Replaces manual find / grep / jar / javap chains
  • inspect_class — Same class structure as resolve_external_class, but takes a jarPath directly — skips Gradle classpath resolution. Use this when the JAR path is
  • list_dependencies — List all resolved external dependencies across every source set's compile classpath (main + test + custom). Each entry includes sourceSets, e.g
  • find_dependency_version — Substring-match against group / artifact and return resolved versions. Case-insensitive
  • dependency_insight — Wraps ./gradlew dependencyInsight --configuration compileClasspath --dependency . Returns the raw resolution chain and a parsed requestedBy
  • check_outdated — Compares resolved versions against the latest available on Maven Central and any other repositories the project declares — whether in a project

Configuration

  • Node.js 18+ - A JDK on PATH (so javap is available) - The target project must have a Gradle wrapper (./gradlew on macOS/Linux, gradlew.bat on Windows) - macOS, Linux, or Windows

Adding it to your client

gradle-mcp-server on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Gradle's toolset — resolve_external_class, inspect_class, list_dependencies and 3 more — is a fair guide to whether it matches your workflow. It is maintained by GitHub Actions; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the gradle mcp server does with a few real requests.

Available tools

ToolWhat it does
resolve_external_classResolve and inspect a class from external dependencies when you DON'T know which JAR contains it. Replaces manual find / grep / jar / javap chains.
inspect_classSame class structure as resolve_external_class, but takes a jarPath directly — skips Gradle classpath resolution. Use this when the JAR path is already known (e.g. from a previous resolve_external_class result or list_de
list_dependenciesList all resolved external dependencies across every source set's compile classpath (main + test + custom). Each entry includes sourceSets, e.g. ["main"], ["test"], or ["main","test"].
find_dependency_versionSubstring-match against group / artifact and return resolved versions. Case-insensitive.
dependency_insightWraps ./gradlew dependencyInsight --configuration compileClasspath --dependency <query>. Returns the raw resolution chain and a parsed requestedBy list.
check_outdatedCompares resolved versions against the latest available on Maven Central **and** any other repositories the project declares — whether in a project repositories {} block or centrally in settings.gradle under dependencyRe

How to install the Gradle MCP server

Or, from a local checkout:

```json
{
  "mcpServers": {
    "gradle": {
      "command": "node",
      "args": ["/absolute/path/to/gradle-mcp-server/dist/index.js"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 18+ - A JDK on PATH (so javap is available) - The target project must have a Gradle wrapper (./gradlew on macOS/Linux, gradlew.bat on Windows) - macOS, Linux, or Windows

Example prompts to try

  • Use Gradle to resolve external class.
  • Use Gradle to inspect class.
  • Use Gradle to list dependencies.

Frequently asked questions

It connects Gradle to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (resolve_external_class, inspect_class, list_dependencies, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Gradle directly.