gradle-mcp-server

gradle-mcp-server

18

Gradle MCP Server is a specialized server that integrates with AI tools to facilitate programmatic interactions with Gradle projects. It offers features for project inspection, task execution, and hierarchical test running, enhancing automation capabilities for developers.

Gradle MCP Server

A Model Context Protocol (MCP) server enabling AI tools to interact with Gradle projects programmatically using the Gradle Tooling API.

Features

  • Inspecting Projects: Retrieve detailed information about a Gradle project.
  • Executing Tasks: Run specific Gradle tasks with custom arguments and environment variables.
  • Running Tests Hierarchically: Execute Gradle test tasks with detailed results in a hierarchical format.

Requirements

  • JDK 17 or higher
  • For command-line installation: curl for Linux/macOS, PowerShell 5+ for Windows

Installation

  • Recommended command-line download method for both Linux/macOS and Windows.
  • Alternative manual download from GitHub Releases.

MCP Client Configuration

Instructions for adding server configuration to the MCP client's settings.

Usage

  • Restart MCP client after configuration to use the "Gradle MCP Server."

Available Tools

  • Get Gradle Project Info: Retrieves project details.
  • Execute Gradle Task: Executes specific tasks with provided inputs.
  • Run Gradle Tests: Executes test tasks and provides structural results.

Development

  • Instructions for building from source and running locally for testing.

Dependencies

  • Uses Gradle Tooling API, Anthropic MCP Kotlin SDK, Ktor, and Logback.