⚠️ Deprecation
This project is no longer maintained. Please use gradle-mcp instead.
Gradle MCP Server
A Model Context Protocol (MCP) server that enables AI tools to interact with Gradle projects programmatically. It uses the Gradle Tooling API to query project information and execute tasks.
Features
Provides tools for:
- Inspecting Projects: Retrieve detailed, structured information about a Gradle project, including:
- Build structure (root project, subprojects)
- Available tasks (in the root project)
- Build environment details (Gradle version, Java version, JVM args)
- Root project details (name, path, description, build script path)
- Allows selective querying of information categories.
- Executing Tasks: Run specific Gradle tasks (e.g.,
clean,build,assemble) with custom arguments, JVM arguments, and environment variables. Returns formatted text output including stdout/stderr and status. - Running Tests Hierarchically: Execute Gradle test tasks (e.g.,
test) and receive detailed, structured results in a hierarchical JSON format (Suite -> Class -> Method). Includes:- Outcome (passed, failed, skipped) for each node.
- Failure messages and filtered/truncated output lines (stdout/stderr) primarily for failed tests (configurable).
- Support for test filtering via patterns (
--tests). - Options to control output inclusion and log line limits.






