-
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. 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.
Non-PHP JetBrains IDEs are supported with limited Magento MCP capabilities. PHP-independent tools such as get_magento_root_path and describe_magento_cli_environment are available there, while PHP-backed scaffold and inspection tools require a PHP-capable IDE.
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 project lookup, code generation, CLI environment discovery, and bundled agent skills.
Feature availability depends on the IDE. PhpStorm and other PHP-capable IDEs expose the full Magento MCP toolset. Non-PHP IDEs expose only PHP-independent tools.
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.
The tool checks configured wrapper candidates directly on the filesystem and reports only wrapper scripts that currently exist.
The magento_inspect tool helps an agent answer Magento-specific questions about the current project with a compact three-step flow:
- Call
magento_inspectwith modehelpto list query types. - Call mode
detailed_schemawith onequeryTypeto load only the parameters for that query. - Call mode
querywithqueryTypeandparametersJsonto run the inspection.
Supported query types:
moduledi_configplugins_for_methodobservers_for_eventlayout_entitiesui_componentacl_or_menu
The magento_scaffold tool can inspect the opened project and generate common Magento scaffolding directly in it with the same three-step flow:
- Call
magento_scaffoldwith modehelpto list scaffold types. - Call mode
detailed_schemawith onescaffoldTypeto load only the parameters for that scaffold. - Call mode
renderwithscaffoldTypeandparametersJsonto create the files.
Supported scaffold types:
modulepluginobserverentity_crudcontrollercli_commandblockview_modelproduct_eav_attributecategory_eav_attributecustomer_eav_attribute
The get_magento_root_path tool remains available when an agent needs the configured Magento root path for a shell command or another tool.
Magento settings include an Agent skills section with buttons for installing or updating bundled skills:
-
magento-scaffoldfor code generation workflows. -
magento-inspectfor project lookup and analysis workflows.
Skills can be installed into the project skill folder or supported agent-specific skill folders, then customized for project-specific prompts, commands, and delivery conventions.