Adobe Commerce MCP

v0.2.0
io.github.commentemeapp/adobe-commerce-mcp Checked 1 day ago Published 1 month ago

Offline Adobe Commerce PHP docs, config files, bin/magento CLI, Web API and module scaffolding

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search-docs Search Adobe Commerce docs

Search the official Adobe Commerce (Magento Open Source) developer documentation bundled offline: PHP extensions, frontend core, Web APIs and operations. Use it first for any "how do I" question about modules, plugins, DI, events, declarative schema, layouts, caching, indexers, queues or configuration. Returns excerpts with title, public URL and source path; follow up with read-doc.

ParameterTypeDescription
query *stringKeywords to look for in the official Adobe Commerce docs (e.g. "plugin around method", "declarative schema foreign key", "message queue consumer", "full page cache private content")
areastringRestrict to one doc set: php (PHP extensions), frontend (themes, layouts, UI components, JS), webapi (REST and GraphQL guides), operations (configuration, CLI, installation, performance)
limitintegerMax results (default 5, max 20)

read-doc Read an Adobe Commerce doc page

Read a full page, or one section, of the bundled Adobe Commerce documentation by id (from search-docs), source path or public developer.adobe.com / experienceleague.adobe.com URL. Use it after search-docs, or when the user pastes a docs link.

ParameterTypeDescription
ref *stringDocument id as returned by search-docs (e.g. "php/development/components/plugins.md"), source path (e.g. "commerce-php/src/pages/development/components/plugins.md") or public URL. Append "#anchor" to…
sectionstringSection anchor or heading to read only that section (e.g. "around-methods")

explain-config-file Explain a module config file

Explain an Adobe Commerce module configuration file (di.xml, events.xml, webapi.xml, db_schema.xml, crontab.xml, routes.xml, system.xml, acl.xml, config.xml, layout, ui_component, schema.graphqls, requirejs-config.js and more): what it is for, where it goes (folder and area), the XSD URN from the docs, and the documentation pages. Use it before creating or editing one of these files.

ParameterTypeDescription
file *stringConfig file name or path inside a module (e.g. "di.xml", "etc/adminhtml/system.xml", "db_schema.xml", "crontab.xml", "webapi.xml", "view/frontend/layout/catalog_product_view.xml", "requirejs-config.js…

lookup-cli-command Look up a bin/magento command

Look up a bin/magento command of Adobe Commerce on-premises: description, usage, arguments and options, from the official CLI reference. Accepts full names, Symfony shortcuts (s:up) or keywords. Use it before suggesting or running a bin/magento command.

ParameterTypeDescription
command *stringA bin/magento command, full or with Symfony shortcuts (e.g. "setup:upgrade", "bin/magento s:up", "indexer:reindex"), or keywords to find one (e.g. "static content deploy", "maintenance")

lookup-webapi Look up REST endpoints and GraphQL operations

Look up Adobe Commerce Web API: REST endpoints (path, method, parameters, body, which tokens can call it) from the official OpenAPI schema, and GraphQL queries and mutations (arguments, return type, example, guide). Accepts a GraphQL name, a REST path or keywords. Use it when writing integrations or storefront calls.

ParameterTypeDescription
query *stringGraphQL query or mutation name (e.g. "products", "addProductsToCart"), REST path (e.g. "/V1/products/{sku}", "V1/orders"), or keywords (e.g. "cart coupon", "customer address")
apistringLimit to REST or GraphQL
limitintegerMax results for keyword search (default 10)
methodstringREST only: HTTP method

scaffold-module Scaffold an Adobe Commerce module

Generate registration.php, etc/module.xml and composer.json for a new Adobe Commerce module (Vendor_Module), adapted from the official docs. Returns the files (path and content) for the caller to write; the server never writes to disk. Use it when starting a module.

ParameterTypeDescription
module *stringModule name as Vendor_Module (e.g. "Acme_Reviews"), as registered in registration.php
basePathstringModule directory relative to the Commerce root (default "app/code/<Vendor>/<Module>")
descriptionstringcomposer.json description
licensearraycomposer.json license list (default ["proprietary"])
packageNamestringComposer package name (default "<vendor>/module-<module>", lowercase)
phpstringPHP constraint for composer.json require (e.g. "~8.3.0||~8.4.0"). Omitted when not given.
sequencearrayModules that must load before this one, for <sequence> in module.xml (e.g. ["Magento_Catalog"])
versionstringcomposer.json version (default "1.0.0")

add-plugin Add a plugin (interceptor)

Generate a before, after or around plugin class and its di.xml declaration for a public method of a class or interface, adapted from the official plugins docs. Returns the files for the caller to write. Use it to change the behavior of a core or third-party method without rewriting the class.

ParameterTypeDescription
method *stringPublic method to intercept (e.g. "getName", "save")
module *stringModule name as Vendor_Module (e.g. "Acme_Reviews"), as registered in registration.php
targetClass *stringClass or interface whose public method is intercepted (e.g. "Magento\Catalog\Model\Product")
type *stringPlugin type. The docs advise after over around unless the chain must be stopped.
areastringdi.xml area: global (etc/di.xml) or an area folder (default global)
basePathstringModule directory relative to the Commerce root (default "app/code/<Vendor>/<Module>")
pluginClassstringPlugin class name inside <Module>\Plugin (default "<TargetShortName>Plugin")
pluginNamestringPlugin name in di.xml (default "<vendor>_<module>_<target>_<method>")
sortOrderintegersortOrder attribute in di.xml

add-observer Add an event observer

Generate an observer class and its events.xml subscription (global or per area), adapted from the official events and observers docs. Returns the files for the caller to write. Use it to react to a dispatched event.

ParameterTypeDescription
event *stringEvent name to observe (e.g. "catalog_product_save_after", "checkout_cart_add_product_complete")
module *stringModule name as Vendor_Module (e.g. "Acme_Reviews"), as registered in registration.php
areastringglobal (etc/events.xml, all areas) or one area folder (default global)
basePathstringModule directory relative to the Commerce root (default "app/code/<Vendor>/<Module>")
observerClassstringObserver class name inside <Module>\Observer (default derived from the event name)
observerNamestringObserver name in events.xml (unique per event)

add-controller Add a controller and route

Generate routes.xml, an action controller (GET page or POST JSON) and, for pages, the layout handle and template, for the frontend or adminhtml area (with ADMIN_RESOURCE and acl.xml for the Admin), adapted from the official routing docs. Returns the files for the caller to write.

ParameterTypeDescription
area *stringfrontend (storefront) or adminhtml (Admin)
frontName *stringURL front name: the first URL segment, <frontName>/<controller>/<action> (e.g. "reviews")
module *stringModule name as Vendor_Module (e.g. "Acme_Reviews"), as registered in registration.php
aclResourcestringadminhtml only: ACL resource for ADMIN_RESOURCE (default "<Vendor_Module>::<controller>")
actionstringAction class (default "Index")
basePathstringModule directory relative to the Commerce root (default "app/code/<Vendor>/<Module>")
controllerstringController folder (default "Index")
methodstringHTTP method: GET renders a page with a layout handle, POST returns JSON (default GET)
routeIdstringRoute id in routes.xml and first part of the layout handle (default: frontName)
titlestringPage title for GET actions

add-db-schema Add a table to db_schema.xml

Generate a declarative schema etc/db_schema.xml table with columns, primary key, unique constraints, foreign keys and indexes, adapted from the official declarative schema docs, plus the whitelist and setup:upgrade steps. Returns the file for the caller to write.

ParameterTypeDescription
module *stringModule name as Vendor_Module (e.g. "Acme_Reviews"), as registered in registration.php
table *stringTable name (e.g. "acme_review")
basePathstringModule directory relative to the Commerce root (default "app/code/<Vendor>/<Module>")
columnsarrayColumns. Without columns the table gets an entity_id int unsigned identity primary key.
commentstringTable comment
enginestringSQL engine, default "innodb"
foreignKeysarray
indexesarray
primaryKeyarrayPrimary key columns (default: the identity column)
resourcestringDatabase resource (shard), default "default"
uniquearrayUnique constraints, each a list of columns