Get the FREE Ultimate OpenClaw Setup Guide →

warden

A Model Context Protocol (MCP) server implementation for Warden - the development environment orchestration tool for Magento, Laravel, and other PHP applications.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio run-as-root-warden-mcp-server node /absolute/path/to/warden-mcp-server/server.js

How to use

This MCP server provides a tightly integrated set of tools to manage Warden-based Magento 2 development environments. It exposes commands to initialize and manage Warden projects, start and stop containers, run PHP scripts, execute Magento CLI commands, and perform unit testing and database operations inside containerized environments. With the available tools, you can spin up full Magento 2 stacks, manage service lifecycles, interact with databases directly from within containers, and automate common development workflows through your AI assistant.

To use the server, configure your MCP client to point to the server.js entry point (for example, using a node command with the absolute path to the server.js file). Once configured, describe the task you want to accomplish, and the assistant will invoke the appropriate tool (e.g., warden_init_project to create a new Magento 2 environment, warden_magento_cli to run Magento commands, or warden_php_script to execute PHP scripts) with the required parameters. The tools are designed to operate within the Warden-managed containers, ensuring proper environment setup and isolation.

How to install

Prerequisites:

  • Node.js installed on the host that will run the MCP server
  • Access to a terminal/CLI with permission to install npm packages
  • Git (optional, if cloning the repository)

Install steps:

  1. Clone or download this repository:

    git clone <repository-url> cd warden-mcp-server

  2. Install dependencies:

    npm install

  3. Build or start the MCP server (depending on your setup):

    npm run start

    or if a build step is required:

    npm run build && npm start

  4. Configure your MCP client to connect to the server by adding an entry similar to:

    { "mcpServers": { "warden-magento": { "command": "node", "args": ["/absolute/path/to/warden-mcp-server/server.js"], "env": {} } } }

Notes:

  • Replace the absolute path with the actual path where server.js resides on your machine.
  • Ensure network connectivity between the MCP client and the MCP server if running in different environments.

Additional notes

Tips and common considerations:

  • Environment variables: Use the env section in the mcp_config to set any required environment variables for Warden, Magento, or database connections.
  • Path accuracy: Absolute paths are required for server.js in client configurations to ensure the MCP client can locate and launch the server.
  • Resource management: The warden_start_project and warden_start_svc tools will allocate resources inside the Warden-managed containers; ensure your host has sufficient CPU/RAM for running Magento projects.
  • Debugging: If a tool does not respond, verify that the containerized services are healthy (e.g., PHP-FPM, database containers) and that the Warden environment paths referenced by project_path are correct.
  • Version compatibility: The Magento CLI and PHP scripts assume compatible PHP versions and Magento setup; use warden_init_project with appropriate environment_type, php_version, and related options to tailor the stack.
  • Security: Avoid exposing MCP server endpoints publicly without proper authentication and consider limiting access to trusted clients only.

Related MCP Servers

Sponsor this space

Reach thousands of developers