# Project Structure
```
gradle-mcp/
├── src/
│ └── gradle_mcp/
│ ├── __init__.py # Package init, version info
│ ├── server.py # MCP server with FastMCP tools
│ └── gradle.py # GradleWrapper class - core logic
├── tests/
│ ├── test_gradle.py # Tests for GradleWrapper
│ └── test_security.py # Security-focused tests
├── .serena/ # Serena configuration
├── .venv/ # Virtual environment
├── .vscode/ # VS Code settings
├── pyproject.toml # Project config, dependencies, tool settings
├── uv.lock # uv lockfile
├── README.md # Project documentation
├── SECURITY_FIX.md # Security fix documentation
├── LICENSE # MIT license
├── test_implementation.py # Manual implementation tests
└── .gitignore # Git ignore rules
```
## Key Files
### src/gradle_mcp/server.py
- MCP server implementation using FastMCP
- Defines MCP tools: `list_projects`, `list_project_tasks`, `run_task`, `clean`
- Pydantic models: `TaskResult`, `ProjectInfo`, `TaskInfo`
- Entry point: `main()` function
### src/gradle_mcp/gradle.py
- `GradleWrapper` class - core Gradle interaction logic
- Pydantic models: `GradleProject`, `GradleTask`
- Security validation of arguments (allow-list/block-list)
- Error message extraction from Gradle output
- Progress parsing from Gradle wrapper output
### tests/test_security.py
- Security-focused tests for argument validation
- Command injection prevention tests
- Tests for dangerous argument blocking
### tests/test_gradle.py
- Unit tests for `GradleWrapper` class
- Environment configuration tests
### pyproject.toml
- Project metadata
- Dependencies: fastmcp, pydantic
- Dev dependencies: pytest, black, ruff, mypy
- Tool configurations (black, ruff, mypy, pytest)
- Entry point script definition