ayasoftware / magento2-mcp-api
Magento 2 MCP API - Additional REST API endpoints for Magento 2 MCP Server
Package info
github.com/ayasoftware/magento2-mcp-api
Type:magento2-module
pkg:composer/ayasoftware/magento2-mcp-api
1.2.1
2026-05-26 22:05 UTC
Requires
- php: ^8.3 || ^8.4
- magento/framework: *
- magento/module-catalog: *
- magento/module-catalog-url-rewrite: *
- magento/module-indexer: *
- magento/module-sales-rule: *
- magento/module-url-rewrite: *
README
Additional REST API endpoints for Magento 2 MCP Server that extend Magento's native capabilities.
Version
Current Version: 1.2.1
Installation
composer require ayasoftware/magento2-mcp-api php bin/magento module:enable Ayasoftware_McpApi php bin/magento setup:upgrade php bin/magento cache:flush
Features
Indexer Management
Advanced indexer operations beyond Magento's default REST API.
Coupon Management
Update individual coupon properties (not available in Magento's default REST API).
Layout
composer.jsonsrc/registration.phpsrc/etc/module.xmlsrc/etc/acl.xmlsrc/etc/di.xmlsrc/etc/webapi.xmlsrc/Api/IndexerManagementInterface.phpsrc/Model/IndexerManagement.phpsrc/Api/CouponManagementInterface.phpsrc/Model/CouponManagement.php
Endpoints
Indexer Management
POST /V1/mg_indexer_reindex- Reindex all indexersGET /V1/mg_indexer_info- Get info for all indexersGET /V1/mg_indexer_info/:indexerId- Get info for specific indexerPOST /V1/mg_indexer_reindex/:indexerId- Reindex specific indexerPOST /V1/mg_indexer_reindex_search- Reindex search index onlyGET /V1/mg_indexer_status- Get status for all indexersGET /V1/mg_indexer_status/:indexerId- Get status for specific indexer
Coupon Management
PUT /V1/mg_coupon/:couponId- Update coupon properties
Update Coupon Example
curl -X PUT "https://your-store.com/rest/V1/mg_coupon/123" \ -H "Authorization: Bearer your-access-token" \ -H "Content-Type: application/json" \ -d '{ "couponData": { "code": "SUMMER2026", "usage_limit": 1000, "usage_per_customer": 5, "expiration_date": "2026-08-31" } }'
Updatable Fields:
code- Coupon code stringusage_limit- Maximum number of times coupon can be usedusage_per_customer- Maximum uses per customertimes_used- Current usage countexpiration_date- Expiration date (Y-m-d format)is_primary- Whether this is the primary coupon for the rule
License
MIT