magebitcom / magento2-mcp-catalog-tools
magebitcom/magento2-mcp-catalog-tools
Catalog-domain MCP tools for Magebit_Mcp (read + write over products and categories)
Magento2 MCP - Catalog Tools
This is a sub-module for the Magento2 MCP module
Catalog-domain MCP tools for Magebit_Mcp. Exposes catalog products and
categories — paginated reads, single-entity reads with field-resolver-driven
shape, and writes (create / update / delete) wired through Magento service
contracts.
Each tool is a thin wrapper over the corresponding Magento service contract
(ProductRepositoryInterface, CategoryRepositoryInterface,
CategoryListInterface, StockRegistryInterface,
CategoryManagementInterface). Read responses are composed from field
resolvers that 3rd-party modules can extend; writes go through the same
repositories the admin UI uses, so server-side validation and reindex hooks
fire identically.
Install
composer require magebitcom/magento2-mcp-catalog-tools
bin/magento module:enable Magebit_McpCatalogTools
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
Tool catalog
Products (read)
| Tool | What it does |
|---|---|
catalog.product.list |
Paginated product search; filter by sku (exact / *glob* / array), name substring, status, visibility, type_id, attribute_set_id, price range, qty range, category_id, website_id, created_at range, updated_at range. |
catalog.product.get |
Single product by numeric id or SKU. Default response includes identity, state, pricing, tier prices, stock, categories (ids + names), websites, media gallery, links, configurable / bundle option metadata, custom attributes, and timestamps; narrow with fields / exclude. |
Categories (read)
| Tool | What it does |
|---|---|
catalog.category.list |
Paginated category search; filter by name substring, is_active, include_in_menu, parent_id, level range. |
catalog.category.get |
Single category by numeric id; tree metadata, content, meta, state, plus the product ids assigned to the category (drop with exclude: ["products"]). |
Products (write)
Write tools require the global magebit_mcp/general/allow_writes flag and
the token's own allow_writes flag to be 1. All writes require explicit
confirmation so MCP clients prompt before firing.
| Tool | Confirm? | What it does |
|---|---|---|
catalog.product.create |
yes | Create a product. Required: sku, name, price, attribute_set_id, type_id, status, visibility (plus weight for physical types). Accepts top-level scalars (description, url_key, tax_class_id, meta_*) plus custom_attributes, website_ids, category_ids. |
catalog.product.update |
yes | PATCH-style update by id or sku; only fields you provide are touched. Use new_sku to rename. |
catalog.product.delete |
yes | Permanently delete a product. |
Categories (write)
| Tool | Confirm? | What it does |
|---|---|---|
catalog.category.create |
yes | Create a category under an existing parent. |
catalog.category.update |
yes | PATCH-style update by id. Changing parent_id triggers a tree move via CategoryManagementInterface::move() (path / level rebuild); use after_id to control sibling ordering at the destination. |
catalog.category.delete |
yes | Permanently delete a category and its descendants. Cascades. |
Every write tool also implements Magebit\Mcp\Api\UnderlyingAclAwareInterface
with Magento_Catalog::products / Magento_Catalog::categories as the
underlying Magento admin resource, so they block calls from admins who
wouldn't be allowed to perform the same action in the admin UI.
Extending
See docs/EXTENDING.md for:
- adding a new field to any tool response via
ProductFieldResolverInterface
/CategoryFieldResolverInterface; - adding a new filter to
catalog.product.list/catalog.category.list
viaProductFilterTranslatorInterface/
CategoryFilterTranslatorInterface; - the ACL layering rules for custom write tools.
License
Released under the MIT License.
Have questions or need help? Contact us at [email protected]
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
Requires 3
| Package | Constraint |
|---|---|
| magebitcom/magento2-mcp-module | * |
| magento/framework | ^103.0 |
| php | >=8.1 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 49 | 31 errors, 18 warnings (ruleset: Magento2) — 7 auto-fixable with phpcbf |
| PHPMD | Warning | 11 | 11 rule violations (CyclomaticComplexity:5, NPathComplexity:3, TooManyPublicMethods:2, ExcessiveClassComplexity:1) |
| Cpd | Warning | 7 | 7 duplicated chunks spanning 332 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from magebitcom
View vendorModule documentation viewer for Magento 2 admin
This module enables Montonio Hirepurchase with Hyva Checkout
Google Analytics 4 MCP tools for Magebit_Mcp — wraps the GA Data and Admin APIs as MCP tools so AI clients can query property metadata, run reports, run realtime reports, and run funnel reports against your store's analytics property.
Magebit Klaviyo extension
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.