Skip to main content
Glama
project_overview.md1.81 kB
# Gradle MCP Project Overview ## Purpose Gradle MCP Server is a Model Context Protocol (MCP) server that provides tools to interact with Gradle projects using the Gradle Wrapper. It enables AI assistants and other MCP clients to execute Gradle tasks, list projects, and manage builds. ## Key Features - **list_projects** - List all Gradle projects in the workspace - **list_project_tasks** - List available tasks for a specific project - **run_task** - Execute Gradle tasks (build, test, assemble, etc.) - **clean** - Clean build artifacts (separate from run_task for safety) ## Tech Stack - **Language**: Python 3.10+ - **Framework**: FastMCP 2.0+ (MCP protocol implementation) - **Data Validation**: Pydantic 2.0+ - **Build System**: Hatchling - **Package Manager**: uv (recommended), pip supported ## Architecture ### Safety Design - `run_task` blocks cleaning tasks (clean, cleanBuild, etc.) via regex patterns - `clean` tool is the only way to run cleaning operations - Security validation of Gradle arguments with allow-list and block-list - Prevents command injection vulnerabilities ### Main Components - `src/gradle_mcp/server.py` - MCP server implementation with FastMCP decorators - `src/gradle_mcp/gradle.py` - GradleWrapper class for executing Gradle commands - `src/gradle_mcp/__init__.py` - Package initialization ### Task Execution - Uses Gradle wrapper (gradlew) for compatibility - Progress reporting via FastMCP context - Real-time output parsing for progress percentages - Comprehensive error extraction from Gradle output ## Environment Variables - `GRADLE_PROJECT_ROOT` - Path to Gradle project (default: current directory) - `GRADLE_WRAPPER` - Path to gradlew script (default: auto-detected) ## Entry Points - CLI: `gradle-mcp` command - Module: `python -m gradle_mcp.server`

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jermeyyy/gradle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server