Warden Magento MCP Server
Executes Composer commands inside PHP containers for dependency management including installing, updating, adding or removing packages, and managing autoloading
Manages Docker-based Warden environments for Magento development, including starting and stopping containers and services
Provides integration with MariaDB database containers, allowing execution of SQL queries for database operations in Magento environments
Enables interaction with MySQL database containers for executing queries and managing databases in Magento projects
Supports configuring Node.js version in Warden environments for Magento development projects
Provides integration with OpenSearch services for Magento environments with customizable version configuration
Executes PHP scripts in containerized environments with proper Magento context, supports PHPUnit testing, and allows Magento CLI command execution
Enables optional RabbitMQ messaging service integration for Magento environments
Provides Redis caching service integration for Magento environments with customizable version configuration
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., "@Warden Magento MCP Server start my Magento project at /Users/dev/projects/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.
Warden Magento MCP Server
A comprehensive Model Context Protocol (MCP) server that provides seamless integration between AI assistants and Warden + Magento 2 development environments. This server enables AI assistants to interact directly with your Warden-managed Magento projects, automating common development tasks and providing intelligent assistance for complex workflows.
Features
This MCP server transforms your AI assistant into a powerful development companion for Warden + Magento 2 projects by providing:
๐ Project Initialization: Create new Warden projects with customizable Magento 2 environments
๐ง Environment Management: Start/stop projects and services with intelligent state management
๐๏ธ Database Operations: Execute SQL queries directly in containerized databases
๐ PHP Development Tools: Run PHP scripts in properly configured containerized environments
๐ ๏ธ Magento CLI Integration: Execute Magento commands seamlessly within containers
๐งช Unit Testing Support: Run PHPUnit tests with automatic configuration detection
๐ฆ Composer Integration: Manage dependencies within containers with full command support
๐ Environment Monitoring: List and monitor running Warden environments
Related MCP server: wp-mcp
Installation
Clone or download this repository
Install dependencies:
npm installConfigure your MCP client (see Configuration section below)
Configuration
MCP Client Configuration
Add the following configuration to your MCP client settings:
{
"mcpServers": {
"warden-magento": {
"command": "node",
"args": ["/absolute/path/to/warden-mcp-server/server.js"],
"env": {}
}
}
}Important: Replace /absolute/path/to/warden-mcp-server/server.js with the actual absolute path to the server.js file on your system.
For Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"warden-magento": {
"command": "node",
"args": ["/Users/your-username/path/to/warden-mcp-server/server.js"]
}
}
}For Zed Editor
Add to your Zed settings:
{
"assistant": {
"version": "2",
"provider": {
"name": "anthropic",
"model": "claude-3-5-sonnet-20241022"
}
},
"context_servers": {
"warden-magento": {
"command": "node",
"args": ["/Users/your-username/path/to/warden-mcp-server/server.js"]
}
}
}Usage
Once configured, your AI assistant can automatically use these tools to help with Warden + Magento development tasks. Simply describe what you want to accomplish, and the AI will use the appropriate tools.
Available Tools
Environment Management
warden_list_environments
Lists all running Warden environments with their directories and status information.
Parameters: None
Use Cases:
Check which environments are currently running
Get project paths for other operations
Monitor environment status
warden_start_project
Starts a Warden project environment, bringing up all configured containers.
Parameters:
project_path(required): Path to the project directory
Use Cases:
Start development environment
Resume work on a project
Bring up services after system restart
warden_stop_project
Stops a Warden project environment, shutting down all project containers.
Parameters:
project_path(required): Path to the project directory
Use Cases:
Clean shutdown of development environment
Free up system resources
Prepare for system maintenance
warden_start_svc
Starts Warden system services (shared infrastructure like DNS, proxy, etc.).
Parameters:
project_path(required): Path to the project directory
Use Cases:
Initialize Warden infrastructure
Start shared services after system reboot
Prepare environment for project startup
warden_stop_svc
Stops Warden system services.
Parameters:
project_path(required): Path to the project directory
Use Cases:
Clean shutdown of Warden infrastructure
Troubleshoot service conflicts
System maintenance
Project Initialization
warden_init_project
Initializes a new Warden project with a fully configured Magento 2 environment.
Parameters:
project_path(required): Path where the project should be initializedproject_name(required): Name for the Warden environmentenvironment_type(optional): Environment type (default: "magento2")php_version(optional): PHP version (default: "8.3")mysql_distribution(optional): MySQL distribution (default: "mariadb")mysql_version(optional): MySQL version (default: "10.6")node_version(optional): Node.js version (default: "20")composer_version(optional): Composer version (default: "2")opensearch_version(optional): OpenSearch version (default: "2.12")redis_version(optional): Redis version (default: "7.2")enable_redis(optional): Enable Redis (default: true)enable_opensearch(optional): Enable OpenSearch (default: true)enable_varnish(optional): Enable Varnish (default: true)enable_rabbitmq(optional): Enable RabbitMQ (default: true)enable_xdebug(optional): Enable Xdebug (default: true)
Use Cases:
Set up new Magento 2 development environment
Create project with specific PHP/MySQL versions
Configure environment for specific requirements
Initialize project with custom service stack
Database Operations
warden_db_query
Executes SQL queries directly in the Warden database container.
Parameters:
project_path(required): Path to the project directoryquery(required): SQL query to executedatabase(optional): Database name (default: "magento")
Use Cases:
Execute database queries for debugging
Retrieve data for analysis
Perform database maintenance tasks
Check database schema or data
PHP Development
warden_php_script
Runs PHP scripts inside the php-fpm container with proper environment setup.
Parameters:
project_path(required): Path to the project directoryscript_path(required): Path to the PHP script relative to project rootargs(optional): Additional arguments to pass to the script
Use Cases:
Execute custom PHP scripts
Run data migration scripts
Test PHP functionality
Execute maintenance scripts
Magento CLI
warden_magento_cli
Executes Magento CLI commands inside the php-fpm container.
Parameters:
project_path(required): Path to the project directorycommand(required): Magento CLI command (without 'bin/magento' prefix)args(optional): Additional arguments for the command
Use Cases:
Run cache operations (cache:clean, cache:flush)
Execute setup commands (setup:upgrade, setup:di:compile)
Manage configuration (config:set, config:show)
Run indexing operations (indexer:reindex)
Module management (module:enable, module:disable)
Testing
warden_run_unit_tests
Runs PHPUnit tests inside the php-fpm container with automatic configuration detection.
Parameters:
project_path(required): Path to the project directoryconfig_file(optional): PHPUnit configuration file (auto-detects phpunit.xml.dist or phpunit.xml)test_path(optional): Path to specific test file or directoryextra_args(optional): Additional PHPUnit arguments
Use Cases:
Run unit tests for modules
Execute specific test suites
Run tests with custom configuration
Validate code changes with automated testing
Dependency Management
warden_composer
Executes Composer commands inside the php-fpm container.
Parameters:
project_path(required): Path to the project directorycommand(required): Composer command to execute
Common Commands:
install- Install dependenciesupdate- Update dependenciesrequire package/name- Add new dependencyremove package/name- Remove dependencyrequire-commerce- Install Adobe Commerce (if applicable)dump-autoload- Regenerate autoloader
Use Cases:
Install project dependencies
Add new packages to project
Update existing dependencies
Manage autoloading
Install Adobe Commerce components
Prerequisites
Warden: Must be installed and configured on your system
Docker: Required for Warden to function
Node.js: Version 18.0.0 or higher
MCP Client: Compatible MCP client (Claude Desktop, Zed, etc.)
Troubleshooting
For issues specific to this MCP server, check:
Server logs when running
npm startMCP client logs for connection issues
Docker container logs:
warden env logsMCP Server inspector: https://github.com/modelcontextprotocol/inspector
License
MIT License - see LICENSE file for details
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Related Projects
Warden - The Docker-based development environment
Model Context Protocol - The protocol specification
Magento 2 - The e-commerce platform
Available Tools
11 toolswarden_composerC
Run Composer commands inside the php-fpm container
Inputs: project_path (required), command (required).
warden_db_queryC
Run a SQL query in the Warden database
Inputs: project_path (required), query (required), database.
warden_init_projectC
Initialize a new Warden project with Magento 2 environment
Inputs: project_path (required), project_name (required), environment_type, php_version, +11 more.
warden_list_environmentsA
List all running Warden environments with their directories (returns structured JSON)
Inputs: no named parameters.
warden_magento_cliC
Run bin/magento command inside the php-fpm container
Inputs: project_path (required), command (required), args.
warden_php_scriptC
Run a PHP script inside the php-fpm container
Inputs: project_path (required), script_path (required), args.
warden_run_unit_testsC
Run unit tests using PHPUnit in the php-fpm container
Inputs: project_path (required), config_file, test_path, extra_args.
warden_start_projectC
Start a Warden project environment
Inputs: project_path (required).
warden_start_svcC
Start Warden system services
Inputs: project_path (required).
warden_stop_projectC
Stop a Warden project environment
Inputs: project_path (required).
warden_stop_svcC
Stop Warden 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 11 tools
Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific action within the Warden Magento environment, such as running commands, managing projects, or controlling services. The descriptions clearly differentiate between database queries, Composer commands, Magento CLI operations, and environment management tasks.
All tools follow a perfect 'warden_verb_noun' pattern throughout. The naming is completely consistent with snake_case used uniformly across all 11 tools. This predictable pattern makes it easy for agents to understand and select the right tool for each operation.
The 11 tools are well-scoped and appropriate for a Magento development environment server. Each tool earns its place by covering essential operations like project initialization, environment management, command execution, and testing. The count is neither too sparse nor overwhelming for the domain.
The tool surface provides complete coverage for Magento development workflows in Warden environments. It includes project lifecycle management (init, start, stop), command execution (Composer, Magento CLI, PHP scripts), database operations, testing capabilities, and service management. No obvious gaps exist for the stated purpose.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Hosted Magento MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Eโฆ
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.2-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that turns WordPress sites into AI-operable surfaces by exposing CRUD primitives for posts, users, comments, and settings. It supports both local STDIO and remote HTTP transports, allowing AI assistants to manage content and site configuration directly.94 npm10MIT
- AlicenseBqualityBmaintenanceAn 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.1615 npmMIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides AI assistants with safe, structured access to Magento 2 operations within Warden environments.8 npm3MIT