
Warden Magento MCP Server
A 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.
README
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
Installation
- Clone or download this repository
- Install dependencies:
npm install
- Configure 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 start
- MCP client logs for connection issues
- Docker container logs:
warden env logs
- MCP 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
推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。