-
Notifications
You must be signed in to change notification settings - Fork 100
MCP
The Magento PhpStorm plugin can expose Magento-specific IDE tools through JetBrains MCP.
The screenshots below use Codex as the example MCP client because it can be auto-configured directly from the IDE. The same Magento MCP server can also be used from other MCP-compatible agents and clients such as Junie, Claude Code, Cursor, and similar tools.
Before starting, make sure your IDE already includes both Settings | Tools | MCP Server and Settings | Tools | AI Assistant | Model Context Protocol (MCP).
Open Settings | Tools | MCP Server, enable Enable MCP Server, and confirm the warning dialog.

Open Settings | Tools | MCP Server | Exposed Tools and verify that MagentoMcpToolset is enabled.

In Settings | Tools | MCP Server, find the Codex client entry, open the Auto-Configure menu, and click Copy Config.
Codex is used here as the example because the IDE can prepare the client configuration for it automatically.

Open Settings | Tools | AI Assistant | Model Context Protocol (MCP), add a new HTTP MCP server, and paste the copied JSON configuration.
Leave Automatically enable new and changed MCP servers enabled, then click OK.


If you use another MCP client such as Junie, Claude Code, or Cursor, use the same copied server configuration in that client instead of the Codex-specific screen shown here.
If the changes are not applied immediately, restart the client. Then ask the assistant whether Magento tools are available in the current session.
You should see Magento-specific capabilities such as module generation, EAV attribute generation, layout and DI lookups, and Magento CLI environment helpers.

The Magento MCP integration exposes three main feature groups for AI agents.
The describe_magento_cli_environment tool helps the agent detect project-local Magento CLI wrappers before running commands. This is especially useful in setups that expose wrapper scripts such as bin/magento, bin/php, bin/composer, or bin/n98-magerun2.
These tools help an agent answer Magento-specific questions about the current project:
- find installed Magento modules with
find_magento_module - inspect DI configuration with
find_di_config_for_class - find plugins intercepting a method with
find_plugins_for_method - find event observers with
find_observers_for_event - locate layout handles, blocks, and containers with
find_layout_entities - locate admin UI components with
find_ui_component - find ACL resources and admin menu declarations with
find_acl_or_menu
These tools can inspect the opened project and generate common Magento scaffolding directly in it:
- return the configured Magento root path with
get_magento_root_path - generate modules with
create_magento_module - generate plugins, observers, controllers, CLI commands, blocks, and view models
- generate CRUD entities with
create_magento_entity_crud - generate product, category, and customer EAV attributes
