gradle
A MCP server for Gradle.
claude mcp add --transport stdio rnett-gradle-mcp jbang run --fresh dev.rnett.gradle-mcp:gradle-mcp:+ stdio
How to use
This MCP server exposes a Gradle-focused set of AI-assisted tools designed to help you introspect projects, run builds, and execute tests in a controlled, context-aware environment. The server runs via JBang and delegates tasks to the Gradle MCP agent, enabling capabilities such as examining dependencies, listing and inspecting project structure, launching Gradle tasks in the background, and running tests with access to full test outputs. You can use the included Agent Skills to guide automated workflows, inspect documentation, and manage JVM arguments, environment variables, and system properties for your Gradle builds. The tools are designed to be token-efficient and provide context-aware results suitable for conversational usage and autonomous agents.
To begin, start the MCP server using the provided command (via the Gradle MCP entry point). Once running, you can invoke Gradle-related commands and the integrated skills to run builds, troubleshoot failures, read documentation, and explore dependency sources. The environment is configurable, and you can source environment variables from your shell if needed, which is particularly useful on macOS where GUI launches may not inherit the right vars.
How to install
Prerequisites:
- Java Development Kit 21 or higher
- Internet access to fetch dependencies via JBang
- A compatible shell to run the commands
Installation steps:
- Install JBang (if not already installed):
curl -s https://get.jbang.dev | bash
- Ensure JBang is in your PATH. You may need to restart your terminal or source your profile:
export PATH="$HOME/.local/bin:$PATH"
- Run the MCP Gradle server using the instruction from the README:
jbang run --fresh dev.rnett.gradle-mcp:gradle-mcp:+ stdio
- Confirm the server is up by invoking a Gradle-related command through the MCP interface or by checking for logs in the console output.
If you already have a Gradle project, you can optionally set GRADLE_MCP_PROJECT_ROOT to point to that project root to streamline default behavior.
Additional notes
Tips and caveats:
- JDK 21+ is required to run gradle-mcp. If you encounter issues with Java versions, verify your JAVA_HOME and your PATH are pointing to a JDK 21+ distribution.
- The server supports sourcing environment variables from your shell; leverage this to ensure Gradle builds receive the appropriate settings, especially on macOS where GUI apps may not inherit environment settings.
- If you previously indexed Gradle documentation and need to refresh or adjust the best-practices tag, you may need to clear the documentation cache as described in the Troubleshooting section of the project documentation.
- The MCP tools provide access to full test output and dependencies. Use these capabilities to diagnose build failures, inspect dependency trees, and explore Gradle’s behavior in your project context.
Related MCP Servers
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
furi
CLI & API for MCP management
adbfriend
Android ADB CLI tool including integrated MCP Server with common adb actions used during development
mcpresso
TypeScript framework to build robust, agent-ready MCP servers around your APIs.
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
promptboard
The Shared Whiteboard for Your AI Agents via MCP. Paste screenshots, mark them up, and share with AI.