Magento 2 Development MCP Server
The Magento 2 Development MCP Server provides comprehensive Magento 2 development and administration tools through AI agents (Claude, Cursor, etc.), covering the following areas:
DI & Module Management
Retrieve DI preferences across scopes (global, adminhtml, frontend, etc.)
List modules (with enabled/disabled filtering), observers (filterable by event), and themes
Create new modules with optional components (blocks, helpers, models, composer.json, readme, strict types)
Inspect plugin/interceptor chains for any class or method across all DI scopes
Cache Management
Clean, flush, enable, disable, and check status of specific or all cache types
Inspect individual cache entries by key
System Diagnostics
Retrieve system information and verify system requirements/configuration health
Configuration Management
View and set system configuration values by path, scope, and scope ID (with optional encryption)
Get and set store-level configuration values
Database Tools
Execute raw SQL queries against the Magento 2 database
Check database status to determine if
setup:upgradeis needed
Setup & Deployment
Run setup upgrades (with option to keep generated files)
Compile DI configuration
Deploy static content with options for languages, themes, parallel jobs, and force deployment
Store & Website Management
List stores, websites, store views, base URLs, and all URLs (filterable by store ID)
Cron Management
List all cron jobs and their configuration
Run specific cron jobs or entire cron groups
Additional Features
Automatic detection of Docker environments (Warden, DDEV, docker-magento, docker-compose)
Flexible output formats: table, JSON, and CSV
Support for custom
magerun2binary paths via environment variables, with automatic fallback to local execution
Enables creation of Magento 2 modules with composer.json files for dependency management and package distribution
Provides access to Magento 2's GraphQL API context through dependency injection preference management
Generates PHP code for Magento 2 modules including blocks, helpers, models, and setup scripts with strict type declarations
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., "@Magento 2 Development MCP Server list all modules and show which ones are enabled"
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.
Abandoned - elgentos/magento2-dev-mcp
This project is abandoned since it mainly exposed magerun commands through an MCP. Magerun now offers an internal MCP server; just run magerun2 mcp:server:start - see magerun2 9.3.0 release notes.
A Model Context Protocol (MCP) server for Magento 2 development, designed to integrate with AI agents like Claude, Cursor, Continue.dev, and Augment Code.
Installation
Using npx
npx -y @elgentos/magento2-dev-mcpRelated MCP server: DDEV MCP
Quick Start
Add to your AI agent's MCP configuration:
{
"mcpServers": {
"magento2-dev": {
"command": "npx",
"args": ["-y", "@elgentos/magento2-dev-mcp"]
}
}
}Restart your AI agent to load the MCP server
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:
Environment | Detection | Command prefix |
Warden |
|
|
DDEV |
|
|
docker-magento |
|
|
docker-compose |
|
|
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
Variable | Description | Default |
| Override the magerun2 binary name or path |
|
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
Parameters:
scope(optional): The scope to get DI preferences forOptions:
global,adminhtml,frontend,crontab,webapi_rest,webapi_soap,graphql,doc,adminDefault:
global
Available Scopes:
global- Global scope (default)adminhtml- Admin areafrontend- Frontend/storefront areacrontab- Cron job execution contextwebapi_rest- REST API contextwebapi_soap- SOAP API contextgraphql- GraphQL API contextdoc- Documentation contextadmin- Admin context (alternative to adminhtml)
Parameters:
format(optional): Output format (table,json,csv) - Default:tableenabled(optional): Show only enabled modulesdisabled(optional): Show only disabled modules
Parameters:
format(optional): Output format (table,json,csv) - Default:tableevent(optional): Filter by specific event name
Parameters:
format(optional): Output format (table,json,csv) - Default:table
Parameters:
vendorNamespace(required): Namespace (your company prefix)moduleName(required): Name of your moduleminimal(optional): Create only module fileaddBlocks(optional): Add blocksaddHelpers(optional): Add helpersaddModels(optional): Add modelsaddSetup(optional): Add SQL setupaddAll(optional): Add blocks, helpers and modelsenable(optional): Enable module after creationmodman(optional): Create all files in folder with a modman fileaddReadme(optional): Add a readme.md file to generated moduleaddComposer(optional): Add a composer.json file to generated moduleaddStrictTypes(optional): Add strict_types declaration to generated PHP filesauthorName(optional): Author for readme.md or composer.jsonauthorEmail(optional): Author email for readme.md or composer.jsondescription(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": "john@example.com",
"description": "A custom Magento 2 module"
}
}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 namemethodName(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
Parameters:
format(optional): Output format (table,json,csv) - Default:table
Parameters: None
Cache Management
Available Tools:
cache-clean- Clear specific or all cachescache-flush- Flush specific or all cachescache-enable- Enable specific cache typescache-disable- Disable specific cache typescache-status- Check cache statuscache-view- Inspect cache entries
See Cache Types Reference for details.
Configuration Management
Parameters:
path(optional): Configuration path to showscope(optional): Configuration scope (default, website, store)scopeId(optional): Scope ID (website ID or store ID)
Parameters:
path(required): Configuration path to setvalue(required): Value to setscope(optional): Configuration scopescopeId(optional): Scope IDencrypt(optional): Encrypt the value
Store-specific configuration management for getting and setting configuration values at the store level.
Database Tools
Parameters:
query(required): SQL query to executeformat(optional): Output format (table,json,csv) - Default:table
Setup & Deployment
Parameters:
keepGenerated(optional): Keep generated files during upgrade
Parameters: None
Parameters: None
Parameters:
languages(optional): Languages to deploythemes(optional): Themes to deployjobs(optional): Number of parallel jobsforce(optional): Force deployment
Store Management
Parameters:
format(optional): Output format (table,json,csv) - Default:table
Parameters:
format(optional): Output format (table,json,csv) - Default:table
Parameters:
format(optional): Output format (table,json,csv) - Default:tablestoreId(optional): Store ID to filter URLs
Parameters:
format(optional): Output format (table,json,csv) - Default:table
Cron Management
Parameters:
format(optional): Output format (table,json,csv) - Default:table
Parameters:
job(optional): Specific cron job to rungroup(optional): Cron group to run
License
MIT License - see LICENSE file for details.
Available Tools
28 toolscache-cleanCache CleanC
Clear specific Magento 2 cache types or all caches
Inputs: types.
cache-disableCache DisableC
Disable specific Magento 2 cache types
Inputs: types (required).
cache-enableCache EnableC
Enable specific Magento 2 cache types
Inputs: types (required).
cache-flushCache FlushC
Flush specific Magento 2 cache types or all caches
Inputs: types.
cache-statusCache StatusB
Check the status of Magento 2 cache types
Inputs: no named parameters.
cache-viewCache ViewC
Inspect specific cache entries in Magento 2
Inputs: key (required), type.
config-setConfig SetC
Set Magento 2 system configuration values
Inputs: path (required), value (required), encrypt, scope, +1 more.
config-showConfig ShowC
View Magento 2 system configuration values
Inputs: path, scope, scopeId.
config-store-getConfig Store GetC
Get store-specific Magento 2 configuration values
Inputs: path (required), storeId.
config-store-setConfig Store SetC
Set store-specific Magento 2 configuration values
Inputs: path (required), value (required), storeId.
db-queryDatabase QueryC
Execute SQL queries directly on Magento 2 database
Inputs: query (required), format.
dev-module-createModule CreateC
Create and register a new Magento 2 module
Inputs: moduleName (required), vendorNamespace (required), addAll, addBlocks, +12 more.
dev-module-listModule ListC
List all Magento 2 modules and their status
Inputs: disabled, enabled, format.
dev-module-observer-listModule Observer ListC
List all Magento 2 module observers
Inputs: event, format.
dev-theme-listTheme ListB
List all available Magento 2 themes
Inputs: format.
get-di-preferencesGet DI Preferences ListB
Get Magento 2 dependency injection preferences list using magerun2
Inputs: scope.
setup-db-statusSetup DB StatusA
Check Magento 2 database status to see if setup:upgrade is needed
Inputs: no named parameters.
setup-di-compileSetup DI CompileB
Compile Magento 2 dependency injection configuration
Inputs: no named parameters.
setup-static-content-deploySetup Static Content DeployC
Deploy Magento 2 static content and assets
Inputs: force, jobs, languages, themes.
setup-upgradeSetup UpgradeC
Run Magento 2 setup upgrade to update database schema and data
Inputs: keepGenerated.
sys-checkSystem CheckB
Check Magento 2 system requirements and configuration
Inputs: no named parameters.
sys-cron-listCron ListB
List all Magento 2 cron jobs and their configuration
Inputs: format.
sys-cron-runCron RunC
Run Magento 2 cron jobs
Inputs: group, job.
sys-infoSystem InfoC
Get Magento 2 system information
Inputs: format.
sys-store-config-base-url-listStore Config Base URL ListC
List all base URLs for Magento 2 stores
Inputs: format.
sys-store-listStore ListB
List all Magento 2 stores, websites, and store views
Inputs: format.
sys-url-listURL ListB
Get all Magento 2 URLs
Inputs: format, storeId.
sys-website-listWebsite ListC
List all Magento 2 websites
Inputs: format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Most tools have distinct purposes with clear boundaries, such as cache-clean vs. cache-flush or config-set vs. config-show. However, some tools like sys-store-list and sys-website-list could potentially overlap in listing store-related information, though their descriptions specify different scopes (stores/websites vs. websites only). Overall, the naming and descriptions help minimize confusion.
Tool names follow a highly consistent verb-noun pattern with hyphens, such as cache-clean, config-set, and sys-info. All tools adhere to this convention, making them predictable and easy to parse. There are no deviations in style or mixed conventions.
With 28 tools, the count is on the higher side for a development server, bordering on heavy. While it covers many aspects of Magento 2 development, it may feel overwhelming or redundant in some areas, such as multiple cache-related tools. A more streamlined set could improve usability without losing functionality.
The tool set provides comprehensive coverage for Magento 2 development, including cache management, configuration, database operations, module and theme development, system setup, and system information. It supports full lifecycle operations like creating modules, deploying content, and running upgrades, with no obvious gaps that would hinder agent workflows.
Maintenance
Related MCP Connectors
Hosted Magento MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Backend platform for AI agents: one agentstack.execute tool runs batched steps over +700 actions (hosting, storage, auth, payments, CRM, app builder).
Build, deploy and manage MaShop e-commerce projects from Claude, Cursor or any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with DDEV local development environments by querying databases, managing project states, and executing container commands. It provides comprehensive control over local services with a security-first approach using whitelisted operations.53MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to automate DDEV development environments, including project management, database operations, and executing commands for various CMS frameworks.1480 npm13GPL 2.0
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Odoo development environments by providing tools for server control, module management, database operations, and project navigation.411 npm2MIT
- AlicenseAqualityCmaintenanceEnables AI agents to interact with Adobe Commerce Cloud projects via REST API and SSH for database queries, log reading, environment management, and more, with no PHP CLI required.1569 npmMIT