RollDev MCP Server
This MCP server lets LLMs manage RollDev/Magento 2 development environments and run common project commands.
List running RollDev environments with structured JSON details.
Start and stop RollDev project environments.
Start and stop RollDev system services.
Run SQL queries in a project database, defaulting to
magento.Execute PHP scripts inside the php-fpm container.
Run Magento CLI commands through
roll magento.Run Composer commands in project environments.
Initialize new Magento 2 projects with configurable version and target directory.
Save long Magento CLI or Composer output to log files for later investigation.
Per the README, also read Roll Inspector diagnostics such as service health, traces, hotspots, request timelines, and service info without changing the environment.
Allows running Composer commands like install and update within RollDev project environments to manage PHP dependencies.
Enables interaction with project containers and Docker networks to manage and list project environments.
Provides tools to control OpenSearch system services within RollDev development environments.
Enables the execution of PHP scripts and command-line operations within containerized project environments.
Allows for the management and control of Redis system services used within RollDev projects.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RollDev MCP Server Flush the Magento cache for the project in ./my-magento-store"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 magentoComposer 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
Related MCP server: DAZ Command MCP Server
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.jsonWindows:
%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-serverInstall dependencies:
npm installAdd 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)
Roll Inspector tools (read-only)
These tools read from Roll Inspector (https://inspector.<TRAEFIK_DOMAIN>) and never change the environment. Each takes project_path, reads ROLL_ENV_NAME, TRAEFIK_DOMAIN and ROLL_INSPECTOR the way roll does (${ROLL_HOME_DIR:-~/.roll}/.env.roll, then .env there, then the nearest project .env.roll, each overriding the one before), and accepts save_output_to_file like the tools above. Output is compact text plus a JSON block. Anything over 60,000 characters is cut off with a hint to use save_output_to_file.
Tool | Returns |
| Service health, warnings and their copyable fixes |
| Trace list with cost split per category. Filters: |
| Analysis of one trace |
| Slowest routes, most expensive operations and repeated calls across all stored traces. |
| Timeline entry for a |
|
|
Connection details:
The tool connects with
node:httpsand trusts roll's root CA from${ROLL_SSL_DIR}/rootca/certs/ca.cert.pem.ROLL_SSL_DIRdefaults to${ROLL_HOME_DIR}/sslandROLL_HOME_DIRto~/.roll, as inbin/roll. Set either variable in the MCP server's environment to override.Requests time out after 10 seconds.
With
ROLL_INSPECTORunset or0, the tool answers with the fix: setROLL_INSPECTOR=1in.env.rolland runroll env up.It reports a stopped Inspector container (
roll env up), certificate problems (roll sign-certificate <domain>), an unresolvable host and a 403 from the gate in plain words.rolldev_inspector_traceandrolldev_inspector_hotspotsneed an Inspector image with the analysis and hotspots endpoints. Older images get a message to update.
Trace and hotspot answers need the project's .env.roll to have ROLL_INSPECTOR=1 and ROLL_INSPECTOR_TRACE=1. Varnish HITs have no trace, so rolldev_inspector_request finds nothing for them. User docs: roll-docker-stack/docs/inspector/api-and-extensions.md.
The logic lives in inspector.cjs, and test/inspector.test.js runs it against a fake transport.
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"
Roll Inspector
These prompts only read; no Inspector tool purges, flushes or switches anything. 16. "Why is /category-1.html slow? Check the Inspector trace" 17. "Show the Inspector hotspots for this project" 18. "Which routes in this project repeat the same SQL query (N+1)?" 19. "Is RabbitMQ healthy? Ask Inspector for the overview" 20. "Was the last request to /checkout/cart a Varnish MISS, and why?"
Development
# Start in development mode with debugging
npm run dev
# Run tests
npm testTesting
You can test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector node server.jsContributing
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
Sponsored by
Available Tools
16 toolsrolldev_composerB
Run Composer commands inside the php-fpm container
Inputs: command (required), project_path (required), save_output_to_file.
rolldev_db_queryC
Run a SQL query in the RollDev database
Inputs: query (required), project_path (required), database.
rolldev_inspector_hotspotsA
Hotspots across all stored traces: slowest routes, most expensive operations and repeated calls. Read-only: never changes the environment.
Inputs: project_path (required), limit, save_output_to_file.
rolldev_inspector_overviewA
Roll Inspector overview: service health, warnings and their copyable fixes. Read-only: never changes the environment.
Inputs: project_path (required), save_output_to_file.
rolldev_inspector_requestB
Timeline entry for a URL: Varnish result and why it missed, plus the lanes (PHP, cache, search, queue). Read-only: never changes the environment.
Inputs: project_path (required), url, xid, limit, +1 more.
rolldev_inspector_serviceA
Health or info of one Inspector service adapter. Read-only: never changes the environment.
Inputs: kind (required), project_path (required), section, save_output_to_file.
rolldev_inspector_traceA
Bottleneck analysis of one trace: cost per category, hot spans, repeated (N+1) calls and the slowest calls, as compact text plus JSON. Raw spans only with include_spans (top 200 by self time). Read-only: never changes the environment.
Inputs: id (required), project_path (required), include_spans, save_output_to_file.
rolldev_inspector_tracesA
List recent PHP traces (one line each, with the cost split per category). Read-only: never changes the environment.
Inputs: project_path (required), sort, limit, route, +2 more.
rolldev_list_environmentsA
List all running RollDev environments with their directories (returns structured JSON)
Inputs: no named parameters.
rolldev_magento2_initB
Initialize a new Magento 2 project using RollDev's magento2-init command with automatic version configuration
Inputs: project_name (required), magento_version, target_directory.
rolldev_magento_cliB
Run roll magento command inside the php-fpm container
Inputs: command (required), project_path (required), args, save_output_to_file.
rolldev_php_scriptB
Run a PHP script inside the php-fpm container
Inputs: script_path (required), project_path (required), args.
rolldev_start_projectC
Start a RollDev project environment
Inputs: project_path (required).
rolldev_start_svcC
Start RollDev system services
Inputs: project_path (required).
rolldev_stop_projectB
Stop a RollDev project environment
Inputs: project_path (required).
rolldev_stop_svcB
Stop RollDev system services
Inputs: project_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools have clearly distinct targets: start/stop for projects vs services, and the Inspector tools form a readable granularity ladder (overview → traces → trace → hotspots → request → service). Mild overlap exists among the command-runner tools (magento_cli, composer, php_script, db_query) and between inspector_overview and inspector_service, but names and descriptions make selection reasonably clear.
All tools share a consistent rolldev_ prefix and snake_case formatting with predictable verb_noun or resource_noun patterns. Minor deviation: some entries are noun-only command runners (rolldev_composer, rolldev_magento_cli) while others use explicit verbs, and trace/traces differ only by plural, but nothing is confusing.
16 tools is slightly above the comfortable 3-15 range but each one covers a distinct operation (environment lifecycle, command execution, and Inspector diagnostics). The six Inspector tools are a justified, cohesive subsystem rather than filler.
Core lifecycle is covered: list/start/stop environments and services, project scaffolding via magento2_init, command/DB/PHP execution, plus a full read-only diagnostics suite. Gaps remain — no restart, no log streaming, no environment configuration or teardown/delete beyond stop — but these are workable around.
Maintenance
Related MCP Connectors
Hosted Magento MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact directly with Warden-managed Magento 2 development environments, automating common tasks like project initialization, environment management, database operations, and Magento CLI commands.117MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides session-based shell command execution and file management with intelligent LLM-powered summarization. It enables users to manage isolated workflows and track progress through automated event logging and session history.5-
- FlicenseAqualityDmaintenanceAn MCP server that automates the full software development lifecycle through an AI-driven TDD state machine. It handles everything from task decomposition and test-driven development to integration testing and automated pull request creation.4-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to discover, manage, and interact with LocalWP sites through integrated WP-CLI, SQL access, and backup workflows. It provides cross-platform site diagnostics and environment resolution for seamless local WordPress development.1ISC