|
If you find this plugin helpful and want to support its development, consider buying the contributors a coffee: ( (
) )
........
| |]
\ /
`----'
Buy Me a Coffee
Thank you to our sponsors for supporting the plugin: Lucas van Staden Ivan Chepurnyi Michael Ryvlin |
- Configuration smart completion and references for XML/JavaScript files
Navigate to configurationreference in scope of class/interfaceGo to pluginreference in scope of class/interface and methodNavigate to Web API configurationreference in scope of class/interface and method- Plugin class methods generation
- Plugin declaration inspection
- Magento-specific MCP tools for AI agents
- RequireJS reference navigation and completion
- MFTF reference navigation and completion
- GraphQL navigation line markers
- Code generation
- Inspections for XML configuration
- Go to
Settings > Preferencesin the PhpStorm IDE - Navigate to
Plugins - Click the
Browse repositories...button and search for "Magento 2 and Adobe Commerce" - Install the plugin and restart PhpStorm
- Go to
Settings > Preferences > Languages & Frameworks > PHP > Frameworks > Magentoin the PhpStorm IDE - Check
Enableand click theOKbutton
- PhpStorm 2026+
The plugin exposes a Magento-specific MCP toolset for AI agents inside JetBrains IDEs with MCP support enabled.
Available project and creation tools:
get_magento_root_path: returns the resolved Magento root directory for the current IDE project. Use this when an agent or shell command needs an absolute project path.magento_scaffold: a three-step Magento scaffold library and renderer designed to keep agent context small. First call it withmode=helpto get only scaffold names and short descriptions. Then call it withmode=detailed_schemaand onescaffoldTypeto load detailed parameters, defaults, constraints, and example JSON only for that scaffold. Finally call it withmode=render, the selectedscaffoldType, andparametersJsonas a JSON object to create files. Supported scaffold types aremodule,plugin,observer,entity_crud,controller,cli_command,block,view_model,product_eav_attribute,category_eav_attribute, andcustomer_eav_attribute.
Available query and inspection tools:
magento_inspect: a three-step Magento inspection library designed to keep agent context small. First call it withmode=helpto get only query names and short descriptions. Then call it withmode=detailed_schemaand onequeryTypeto load detailed parameters and example JSON only for that inspection. Finally call it withmode=query, the selectedqueryType, andparametersJsonas a JSON object to inspect the project. Supported query types aremodule,di_config,plugins_for_method,observers_for_event,layout_entities,ui_component, andacl_or_menu.describe_magento_cli_environment: detects project-local CLI wrappers such as Mark Shust Docker scripts under project-level or Magento-rootbin/, returns the exact command paths an agent should use, and includes example invocations for Magento CLI, PHP, Composer,n98-magerun, and stack lifecycle commands such as./bin/start.
Notes:
- The IDE MCP server must be enabled in the JetBrains IDE.
- Only one JetBrains IDE instance should have the MCP server enabled at a time so the configured MCP port stays free; if another IDE is already using that port, the MCP server will not start correctly.
- The IDE MCP server entry must be added to the agent MCP configuration.
- MCP tools work against the currently opened IDE project.
- Magento plugin support must be enabled for the project.
- Indexing must be finished before MCP queries and generators can run.
- Category EAV attribute generation creates both the data patch and
view/adminhtml/ui_component/category_form.xml. describe_magento_cli_environmentdetects project-local wrappers such as Mark Shust Docker scripts under project-level or Magento-rootbin/and returns the exact command paths an agent should use, including stack lifecycle wrappers such asbin/start,bin/stop, andbin/restart.
If your Magento project uses local wrapper scripts such as Mark Shust Docker commands, configure them in:
Settings > Languages & Frameworks > PHP > Frameworks > Magento > MCP CLI wrapper candidates
Use a comma-separated list of relative paths, for example:
bin/magento, bin/n98-magerun2, bin/cli, bin/start
Agent usage pattern:
- Call
describe_magento_cli_environment. - Use the returned wrapper path exactly, for example
./bin/magento cache:flush,./bin/n98-magerun2 sys:info, or./bin/start. - Keep Magento code edits and generators under the configured Magento root.
- If the tool reports a wrapper outside that root, still run it from the returned project-relative path; that is valid for nested Magento roots.
- Prefer the wrapper over global binaries because these scripts often enter Docker containers or a project-specific runtime.
- Check out this repository.
- Open the project in IntelliJ IDEA.
- Make sure that you are on the latest develop branch (for example
5.4.0-develop). - Import the Gradle project from
build.gradle.kts. - Use JDK 21 for both the project SDK and the Gradle JVM:
Right click on the project root > Open Module Settings > Project > Project SDKIntelliJ IDEA > Preferences > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM
- In the Gradle tool window, run
Tasks > Intellij platform > runIde. - The task launches a PhpStorm sandbox with the plugin installed. Make sure the plugin is enabled and indexing is finished before testing features.
- Start with looking into Community Backlog. Any ticket in
Ready for DevelopmentandGood First Issuecolumns are a good candidates to start. - Didn't satisfy your requirements? Create a new issue. It can be for example:
- Bug report - Found a bug in the code? Let us know!
- Enhancement - Know how to improve existing functionality? Open an issue describe how to enhance the plugin.
- New feature proposal - Know how to make a killer feature? Do not hesitate to submit your proposal.
- The issue will appear in the
Ready for Groomingcolumn of the Community Backlog. Once it will be discussed and approved the issue will be ready for development. - Refer to the Contributing Guide for more information on how to contribute.
- SDK Developing a Plugin
- Good Presentation about platform How We Built Comma, the Raku IDE, on the IntelliJ Platform
- Plugin example idea-php-symfony2-plugin
- Create sandbox folder
- Copy to sandbox folder
composer.jsonandcomposer.lock - In sandbox folder create
app/codeandvendor/magento - Copy any of the magento modules (as for example:
framework,module-catalog,module-checkout,module-customer,module-sales) into thevendor/magentofolder. It is better to add as few modules as possible to reduce reindexing time during application running - (Nice to have) Open IDE and go to
Preferences > Editor > File and Code Templates > Includes taband add default headers forPHP File HeaderandXML File Header
PHP File Header:
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);XML File Header:
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
Join the #phpstorm-plugin Slack channel to get more involved
Each Magento source file included in this distribution is licensed under OSL-3.0 license.
Please read the LICENSE.txt for the full text of the Open Software License v. 3.0 (OSL-3.0).