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
bashnpx -y @elgentos/magento2-dev-mcp
Quick Start
- Add to your AI agent's MCP configuration:
json{ "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 | WARDEN_ENV_TYPE in .env | warden shell -c '...' |
| DDEV | .ddev/ directory | ddev exec ... |
| docker-magento | bin/clinotty file | bin/clinotty ... |
| docker-compose | docker-compose.yml or compose.yaml | docker 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
| Variable | Description | Default |
|---|---|---|
MAGERUN2_COMMAND | Override the magerun2 binary name or path | magerun2 |
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:
json{ "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 for- Options:
global,adminhtml,frontend,crontab,webapi_rest,webapi_soap,graphql,doc,admin - Default:
global
- Options:
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:
json{ "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:
json{ "name": "dev-plugin-list", "arguments": { "className": "Magento\\Catalog\\Api\\ProductRepositoryInterface", "methodName": "save" } }
Example — scan all methods of a class:
json{ "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.



