gradle-mcp
A comprehensive MCP server for Gradle.
Description
A comprehensive MCP server for Gradle.
README
A Model Context Protocol (MCP) server for Gradle. It gives AI agents the tools they need to explore project structures, run tasks, audit dependencies, and interact with the JVM runtime.
Source downloading and indexing tools will be moving to a dedicated MCP/cli soon.
- Agent Skills: Built-in workflows that guide AI agents through complex Gradle tasks.
- Project Mapping: Easily explore multi-project structures, modules, tasks, and properties.
- Smart Task Execution: Run builds in the background, monitor progress, and capture specific task outputs without the noise. Supports advanced environment control and shell environment sourcing.
- Advanced Testing: Run filtered test suites and get full access to logs and stack traces for every test case.
- Dependency & Source Search: Search and browse the source code of your dependencies or Gradle's own sources.
- Interactive Kotlin REPL: Test project utilities and explore APIs in a persistent REPL with access to all your classes.
- Compose UI Previews: Render UI components directly to images from the project runtime for visual auditing.
- Gradle Documentation: Instant access to searchable, indexed Gradle User Guides and DSL references.
- Develocity Build Scans: Ask your agent to publishing of Build Scans for deep troubleshooting.
- Token Optimized: Compact data formats designed to keep context usage low.
The GRADLE_MCP_PROJECT_ROOT environment variable can be set to provide a default Gradle project root. This is used if no project root is specified in a tool call and there isn't exactly one MCP root configured.
Important
JDK 21 or higher is required to run gradle-mcp.
You can use JBang to install JDKs too: docs.
Use jbang:
# For releases
jbang run --quiet --fresh gradle-mcp@rnett
# For snapshots
jbang run --quiet --fresh gradle-mcp-snapshot@rnett{
"mcpServers": {
"gradle": {
"command": "jbang",
"args": [
"run",
"--quiet",
"--fresh",
"gradle-mcp@rnett"
]
}
}
}Alternatively, run the GAV directly:
jbang run --fresh dev.rnett.gradle-mcp:gradle-mcp:+{
"mcpServers": {
"gradle": {
"command": "jbang",
"args": [
"run",
"--fresh",
"dev.rnett.gradle-mcp:gradle-mcp:+"
]
}
}
}See the documentation for more details.
Agent Skills are specialized guides that help AI agents navigate common Gradle workflows reliably.
Included skills:
running_gradle_builds: Running Gradle Commands, Background Jobs, and Investigating Failures.running_gradle_tests: Running and Investigating Tests.managing_gradle_dependencies: Auditing and updating dependencies.introspecting_gradle_projects: Mapping project structure, modules, and tasks.searching_dependency_sources: Searching and reading dependency source code.interacting_with_project_runtime: Running Code in the Project's Environment (REPL).researching_gradle_internals: Searching and reading the Gradle User Guide and source code.verifying_compose_ui: Visually verifying Compose UI components.gradle_expert: Senior Build Engineer guidance for build scripts and failures.
For instructions on how to use these skills, see the Agent Skills documentation.
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 0.0.11 | ## Reliability and Performance * **Windows Stability**: Redesigned the internal locking and indexing engine to eliminate "60-second timeout" and "file in use" errors on Windows. * **Isolated Search**: Tools now use ephemeral "session views," allowing concurrent code searching and reading while builds are running without file contention. * **Virtual Indexing**: Switched to a virtual search model that eliminates the slow physical merging of dependency indices. ## Dependency Management | Medium | 3/28/2026 |
| 0.0.10 | ## Highlights ### Dependency & Source Analysis A major new capability this release: agents can now browse and search the actual source code of your project's dependencies directly from the MCP server. This enables understanding unfamiliar library APIs, tracing how a class is implemented, and exploring internal implementation details â without leaving the build tool context. - **New dependency source tools**: search, navigate, and read source files from resolved dependencies and plugins | Low | 3/14/2026 |
| 0.0.9 | ## What's Changed * Added some agent skills for working with gradle. See https://gradle-mcp.rnett.dev/latest/skills/ for more details. * Added tools for accessing and searching Gradle's documentation * Improved tool descriptions * Improved REPL tool error handling **Full Changelog**: https://github.com/rnett/gradle-mcp/compare/0.0.8...0.0.9 | Low | 3/2/2026 |
| 0.0.8 | ## What's Changed * Update dependency ch.qos.logback:logback-classic to v1.5.29 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/67 * Update slf4j monorepo to v2.0.17 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/74 * Update jetbrains.compose to v1.10.1 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/78 * Update koin to v4.1.1 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/81 * Update dependency com.android.tools.build:gradle to v9.0.1 by | Low | 2/27/2026 |
| 0.0.7 | ## What's Changed * Reduce the number of tools by combining functionality and relying more on tool descriptions * Enhance waiting/tailing options for background jobs **Full Changelog**: https://github.com/rnett/gradle-mcp/compare/0.0.6...0.0.7 | Low | 2/8/2026 |
| 0.0.6 | ## What's Changed * Add ability to source environment from new shell process instead of inheriting it from the MCP server * Fix the JVM used to run the Gradle build so that it's not always forced to the MCP server's **Full Changelog**: https://github.com/rnett/gradle-mcp/compare/0.0.5...0.0.6 | Low | 2/2/2026 |
| 0.0.5 | ## What's Changed Added a set of tools for running and managing Gradle builds in the background. For example, a server or website devserver, so that the agent can then visit the webpage. **Full Changelog**: https://github.com/rnett/gradle-mcp/compare/0.0.4...0.0.5 | Low | 1/31/2026 |
| 0.0.4 | ## What's Changed Most tools now use textual output with mostly human readable formatting, avoiding the token cost of JSON. **Full Changelog**: https://github.com/rnett/gradle-mcp/compare/0.0.3...0.0.4 | Low | 1/27/2026 |
| 0.0.3 | ## What's Changed * Update dependency org.jetbrains.kotlin.plugin.serialization to v2.2.21 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/19 * Update kotlin monorepo to v2.2.21 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/18 * Update dependency ch.qos.logback:logback-classic to v1.5.20 by @renovate[bot] in https://github.com/rnett/gradle-mcp/pull/16 * Update dependency com.github.ben-manes.caffeine:caffeine to v3.2.3 by @renovate[bot] in https://github.com/rnett/g | Low | 11/1/2025 |
| 0.0.2 | ## What's Changed * Instead of returning huge results from execution tools, we now return a summary and provide separate tools to look up pieces of information about past builds * Lots of description fine-tuning, especially for testing tools * Created a tool to run a single test task - agents seem to have an easier time using it * Support for roots - if you have a single root, you may not specify the Gradle project root, the MCP root will be used **Full Changelog**: https://github.com/r | Low | 10/16/2025 |
| 0.0.1 | Initial release of the Gradle MCP server. | Low | 10/2/2025 |
