MCP - magento/magento2-phpstorm-plugin GitHub Wiki
Model Context Protocol (MCP) Alpha Build
The Magento PhpStorm plugin can expose Magento-specific IDE tools through JetBrains MCP. This functionality is currently available only in the plugin Alpha channel.
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 build already includes both Settings | Tools | MCP Server and Settings | Tools | AI Assistant | Model Context Protocol (MCP).
1. Download the alpha build
Open the plugin page on JetBrains Marketplace, switch to the Versions tab, select the Alpha channel, and download the latest alpha build.
Direct link: JetBrains Marketplace Alpha channel


2. Install the plugin from disk
Open Settings | Plugins | Installed, click the gear icon, choose Install Plugin from Disk, and select the downloaded ZIP archive.

3. Enable the IDE MCP server
Open Settings | Tools | MCP Server, enable Enable MCP Server, and confirm the warning dialog.

4. Check exposed Magento tools
Open Settings | Tools | MCP Server | Exposed Tools and verify that MagentoMcpToolset is enabled.

5. Copy the MCP client config
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.

6. Add the server to the MCP client
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.
7. Verify in chat
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.

Available Magento MCP features
In the current Alpha build, the Magento MCP integration exposes three main feature groups for AI agents.
Project and code generation tools
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
Project lookup and navigation tools
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
Magento CLI environment discovery
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.