Magento 2 Development

Magento 2 Development

elgentos

Magento 2 Development tool integrates seamlessly with n98-magerun2 for efficient cache, module, config, and database man

Integrates with Magento 2 through n98-magerun2 to provide cache management, module operations, configuration control, database querying, and deployment tools for streamlined e-commerce development workflows.

33530 views8Local (stdio)

About Magento 2 Development

Magento 2 Development is a community-built MCP server published by elgentos that provides AI assistants with tools and capabilities via the Model Context Protocol. Magento 2 Development tool integrates seamlessly with n98-magerun2 for efficient cache, module, config, and database man It is categorized under databases, developer tools. This server exposes 28 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install Magento 2 Development in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Magento 2 Development is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (28)

get-di-preferences

Get Magento 2 dependency injection preferences list using magerun2

cache-clean

Clear specific Magento 2 cache types or all caches

cache-flush

Flush specific Magento 2 cache types or all caches

cache-enable

Enable specific Magento 2 cache types

cache-disable

Disable specific Magento 2 cache types

Magento 2 Development MCP Server

A Model Context Protocol (MCP) server for Magento 2 development, designed to integrate with AI agents like Claude, Cursor, Continue.dev, and Augment Code.

image Magento 2 Development Server MCP server

Installation

Using npx

npx -y @elgentos/magento2-dev-mcp

Quick Start

  1. Add to your AI agent's MCP configuration:
{
  "mcpServers": {
    "magento2-dev": {
      "command": "npx",
      "args": ["-y", "@elgentos/magento2-dev-mcp"]
    }
  }
}
  1. Restart your AI agent to load the MCP server

  2. Start using Magento 2 development tools through your AI agent!

See AI Platform Configuration Examples for platform-specific setup instructions.

Docker Environment Support

The server automatically detects Docker-based Magento environments and routes magerun2 commands through the container:

EnvironmentDetectionCommand prefix
WardenWARDEN_ENV_TYPE in .envwarden shell -c '...'
DDEV.ddev/ directoryddev exec ...
docker-magentobin/clinotty filebin/clinotty ...
docker-composedocker-compose.yml or compose.yamldocker compose exec -T <service> ...

For docker-compose the server tries the service names phpfpm, php-fpm, and php in order.

If Docker execution fails, the server falls back to running magerun2 locally.

Environment Variables

VariableDescriptionDefault
MAGERUN2_COMMANDOverride the magerun2 binary name or pathmagerun2

Use MAGERUN2_COMMAND when your system installs the binary under a different name (e.g. n98-magerun2) or when you need to specify an absolute path:

{
  "mcpServers": {
    "magento2-dev": {
      "command": "npx",
      "args": ["-y", "@elgentos/magento2-dev-mcp"],
      "env": {
        "MAGERUN2_COMMAND": "n98-magerun2"
      }
    }
  }
}

Features

DI & Module Tools

get-di-preferences - Get Magento 2 dependency injection preferences list

Parameters:

  • scope (optional): The scope to get DI preferences for
    • Options: global, adminhtml, frontend, crontab, webapi_rest, webapi_soap, graphql, doc, admin
    • Default: global

Available Scopes:

  • global - Global scope (default)
  • adminhtml - Admin area
  • frontend - Frontend/storefront area
  • crontab - Cron job execution context
  • webapi_rest - REST API context
  • webapi_soap - SOAP API context
  • graphql - GraphQL API context
  • doc - Documentation context
  • admin - Admin context (alternative to adminhtml)
dev-module-list - List all Magento 2 modules and their status

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
  • enabled (optional): Show only enabled modules
  • disabled (optional): Show only disabled modules
dev-module-observer-list - List all Magento 2 module observers

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
  • event (optional): Filter by specific event name
dev-theme-list - List all available Magento 2 themes

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
dev-module-create - Create and register a new Magento 2 module

Parameters:

  • vendorNamespace (required): Namespace (your company prefix)
  • moduleName (required): Name of your module
  • minimal (optional): Create only module file
  • addBlocks (optional): Add blocks
  • addHelpers (optional): Add helpers
  • addModels (optional): Add models
  • addSetup (optional): Add SQL setup
  • addAll (optional): Add blocks, helpers and models
  • enable (optional): Enable module after creation
  • modman (optional): Create all files in folder with a modman file
  • addReadme (optional): Add a readme.md file to generated module
  • addComposer (optional): Add a composer.json file to generated module
  • addStrictTypes (optional): Add strict_types declaration to generated PHP files
  • authorName (optional): Author for readme.md or composer.json
  • authorEmail (optional): Author email for readme.md or composer.json
  • description (optional): Description for readme.md or composer.json

Example Usage:

{
  "name": "dev-module-create",
  "arguments": {
    "vendorNamespace": "MyCompany",
    "moduleName": "CustomModule",
    "addAll": true,
    "enable": true,
    "addReadme": true,
    "addComposer": true,
    "authorName": "John Doe",
    "authorEmail": "[email protected]",
    "description": "A custom Magento 2 module"
  }
}
dev-plugin-list - Get plugin (interceptor) list for a class

Analyzes di.xml files across all DI scopes to find plugins for a given class. Resolves the full class hierarchy (parent classes and interfaces) so inherited plugins are included. Returns the plugin list, sort order, and full execution order chain per scope.

Parameters:

  • className (required): Fully qualified PHP class or interface name
  • methodName (optional): Method name to inspect. Omit to scan all public methods.

Example — single method:

{
  "name": "dev-plugin-list",
  "arguments": {
    "className": "Magento\\Catalog\\Api\\ProductRepositoryInterface",
    "methodName": "save"
  }
}

Example — scan all methods of a class:

{
  "name": "dev-plugin-list",
  "arguments": {
    "className": "Magento\\Framework\\View\\LayoutInterface"
  }
}

Scopes checked: global, adminhtml, frontend, crontab, webapi_rest, webapi_soap, graphql

Docker support: Automatically detects Warden, DDEV, docker-magento, and docker-compose environments. Falls back to local PHP.

System Diagnostics

sys-info - Get Magento 2 system information

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
sys-check - Check Magento 2 system requirements and configuration

Parameters: None

Cache Management

Cache Management Tools - Complete cache management suite

Available Tools:

  • cache-clean - Clear specific or all caches
  • cache-flush - Flush specific or all caches
  • cache-enable - Enable specific cache types
  • cache-disable - Disable specific cache types
  • cache-status - Check cache status
  • cache-view - Inspect cache entries

See Cache Types Reference for details.

Configuration Management

config-show - View Magento 2 system configuration values

Parameters:

  • path (optional): Configuration path to show
  • scope (optional): Configuration scope (default, website, store)
  • scopeId (optional): Scope ID (website ID or store ID)
config-set - Set Magento 2 system configuration values

Parameters:

  • path (required): Configuration path to set
  • value (required): Value to set
  • scope (optional): Configuration scope
  • scopeId (optional): Scope ID
  • encrypt (optional): Encrypt the value
config-store-get / config-store-set - Store-specific configuration management tools

Store-specific configuration management for getting and setting configuration values at the store level.

Database Tools

db-query - Execute SQL queries directly on Magento 2 database

Parameters:

  • query (required): SQL query to execute
  • format (optional): Output format (table, json, csv) - Default: table

Setup & Deployment

setup-upgrade - Run Magento 2 setup upgrade to update database schema and data

Parameters:

  • keepGenerated (optional): Keep generated files during upgrade
setup-di-compile - Compile Magento 2 dependency injection configuration

Parameters: None

setup-db-status - Check database status to see if setup:upgrade is needed

Parameters: None

setup-static-content-deploy - Deploy Magento 2 static content and assets

Parameters:

  • languages (optional): Languages to deploy
  • themes (optional): Themes to deploy
  • jobs (optional): Number of parallel jobs
  • force (optional): Force deployment

Store Management

sys-store-list - List all Magento 2 stores, websites, and store views

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
sys-store-config-base-url-list - List all base URLs for Magento 2 stores

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
sys-url-list - Get all Magento 2 URLs

Parameters:

  • format (optional): Output format (table, json, csv) - Default: table
  • storeId (optional): Store

README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

11
environment-setup-guide

Guide developers through setting up development environments with proper tools, dependencies, and configurations

1
granola-local-dev-loop

Integrate Granola meeting notes into your local development workflow. Use when setting up development workflows, accessing notes programmatically, or syncing meeting outcomes with project tools. Trigger with phrases like "granola dev workflow", "granola development", "granola local setup", "granola developer", "granola coding workflow".

1
godot

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

732
postgresql-psql

Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and using advanced psql features for database administration and development.

38
csharp-developer

Expert C# developer specializing in modern .NET development, ASP.NET Core, and cloud-native applications. Masters C# 12 features, Blazor, and cross-platform development with emphasis on performance and clean architecture.

38