A Model Context Protocol (MCP) server for RollDev + Magento 2 development environments. This server enables Claude and other LLMs to interact with RollDev projects, manage environments, execute commands, and initialize new Magento 2 projects seamlessly.
Features
$3
- Environment Control: List, start, and stop RollDev project environments - Service Management: Control RollDev system services (database, Redis, OpenSearch, etc.) - Project Initialization: Create new Magento 2 projects with automatic configuration
$3
- Database Operations: Execute SQL queries directly in project databases - PHP Script Execution: Run PHP scripts within project containers - Magento CLI Access: Execute Magento commands through roll magento - Composer Integration: Run Composer commands in project environments
$3
- Command Timeouts: All commands have appropriate timeouts to prevent hanging (5-15 min depending on operation) - Output File Redirection: Option to save command output to log files for later investigation
Prerequisites
- RollDev installed and configured - Node.js 18+ - Active RollDev project environments (for some operations)
Add this configuration to your Claude for Desktop config file: - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Windows: %APPDATA%\Claude\claude_desktop_config.json
$3
1. Clone this repository: `bash git clone https://github.com/dockergiant/rolldev-mcp-server.git cd rolldev-mcp-server `
2. Install dependencies: `bash npm install `
3. Add to Claude configuration: `json { "mcpServers": { "rolldev": { "command": "node", "args": ["/path/to/rolldev-mcp-server/server.js"] } } } `
Available Tools
$3
Lists all running RollDev environments with structured information including project names, paths, URLs, Docker networks, and container counts.
$3
Starts a RollDev project environment. - project_path: Path to the project directory
$3
Stops a RollDev project environment. - project_path: Path to the project directory
$3
Starts RollDev system services. - project_path: Path to the project directory
$3
Stops RollDev system services. - project_path: Path to the project directory
$3
Executes SQL queries in project databases. - project_path: Path to the project directory - query: SQL query to execute - database: Database name (optional, defaults to "magento")
$3
Runs PHP scripts inside project containers. - project_path: Path to the project directory - script_path: Path to PHP script relative to project root - args: Additional arguments (optional)
$3
Executes Magento CLI commands (5 minute timeout). - project_path: Path to the project directory - command: Magento command (without 'bin/magento' prefix) - args: Additional arguments (optional) - save_output_to_file: Save full output to a log file (optional, default: false)
$3
Runs Composer commands in project environments (10 minute timeout). - project_path: Path to the project directory - command: Composer command (e.g., "install", "update", "require symfony/console") - save_output_to_file: Save full output to a log file (optional, default: false)
$3
Initializes new Magento 2 projects with automatic configuration (15 minute timeout). - project_name: Project name (lowercase, letters, numbers, hyphens only) - magento_version: Magento version (optional, defaults to "2.4.x") - target_directory: Target directory (optional, defaults to current directory)
Examples
Here are some example interactions you can try with Claude after setting up the RollDev MCP server:
$3
1. "Can you list all my RollDev environments?" 2. "Start the project at /path/to/my-magento-project" 3. "Stop the services for my current project"
$3
4. "Run the query 'SELECT * FROM admin_user LIMIT 5' in my project" 5. "Show me all enabled modules in the database" 6. "Check the current configuration values for my store"
$3
7. "Execute 'cache:flush' Magento command in my project" 8. "Run 'setup:upgrade' on my Magento installation" 9. "List all available Magento CLI commands"
$3
10. "Initialize a new Magento 2.4.7 project called 'my-store'" 11. "Create a Magento project with the latest version in /Users/dev/projects"
$3
12. "Install dependencies with Composer in my project" 13. "Require the symfony/console package in my project"
$3
14. "Run setup:upgrade and save the output to a file for investigation" 15. "Execute composer install with output saved to a log file"
git checkout -b feature/amazing-feature) 3. Commit your changes (git commit -m 'Add some amazing feature') 4. Push to the branch (git push origin feature/amazing-feature`) 5. Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.