RollDev MCP Server
An MCP server for RollDev and Magento 2 development environments that enables LLMs to manage project environments, execute SQL queries, and run PHP or Magento CLI commands. It supports automated project initialization, Composer integration, and system service control directly through natural language.
README
RollDev MCP Server
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
Environment Management
- 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
Development Tools
- 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
Reliability Features
- 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)
Installation
Option 1: Using NPM (Recommended)
{
"mcpServers": {
"rolldev": {
"command": "npx",
"args": [
"-y",
"@disrex/rolldev-mcp-server"
]
}
}
}
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
Option 2: Manual Setup
- Clone this repository:
git clone https://github.com/dockergiant/rolldev-mcp-server.git
cd rolldev-mcp-server
- Install dependencies:
npm install
- Add to Claude configuration:
{
"mcpServers": {
"rolldev": {
"command": "node",
"args": ["/path/to/rolldev-mcp-server/server.js"]
}
}
}
Available Tools
rolldev_list_environments
Lists all running RollDev environments with structured information including project names, paths, URLs, Docker networks, and container counts.
rolldev_start_project
Starts a RollDev project environment.
- project_path: Path to the project directory
rolldev_stop_project
Stops a RollDev project environment.
- project_path: Path to the project directory
rolldev_start_svc
Starts RollDev system services.
- project_path: Path to the project directory
rolldev_stop_svc
Stops RollDev system services.
- project_path: Path to the project directory
rolldev_db_query
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")
rolldev_php_script
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)
rolldev_magento_cli
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)
rolldev_composer
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)
rolldev_magento2_init
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:
Basic Environment Management
- "Can you list all my RollDev environments?"
- "Start the project at /path/to/my-magento-project"
- "Stop the services for my current project"
Database Operations
- "Run the query 'SELECT * FROM admin_user LIMIT 5' in my project"
- "Show me all enabled modules in the database"
- "Check the current configuration values for my store"
Magento Development
- "Execute 'cache:flush' Magento command in my project"
- "Run 'setup:upgrade' on my Magento installation"
- "List all available Magento CLI commands"
Project Initialization
- "Initialize a new Magento 2.4.7 project called 'my-store'"
- "Create a Magento project with the latest version in /Users/dev/projects"
Composer Operations
- "Install dependencies with Composer in my project"
- "Require the symfony/console package in my project"
Output File Redirection
- "Run setup:upgrade and save the output to a file for investigation"
- "Execute composer install with output saved to a log file"
Development
# Start in development mode with debugging
npm run dev
# Run tests
npm test
Testing
You can test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector node server.js
Contributing
- Fork the repository from dockergiant/rolldev-mcp-server
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have questions:
- Check the GitHub Issues section
- Consult the MCP documentation at modelcontextprotocol.io
- Open a new issue with detailed reproduction steps
<img src="https://files.disrex.nl/disrex-character.gif?t=572693425" alt="Disrex T-Rex Mascot Waving" width="150">
Sponsored by
<picture> <source srcset="https://files.disrex.nl/logos/logo-w.png" media="(prefers-color-scheme: dark)"> <img src="https://files.disrex.nl/logos/logo-b.png" alt="Disrex Logo" width="200"> </picture>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。