Administer Adobe Commerce and Magento 2 instances via AI assistants
Magento MCP Server
An MCP (Model Context Protocol) server for Adobe Commerce / Magento 2 administration. Connects AI assistants like Claude, Windsurf, Cursor, and other MCP-compatible clients to your Magento instance for business-level operations — catalog management, promotions, CMS, diagnostics, and more.
Features
- 30+ tools for Magento administration via the standard MCP protocol
- OAuth 1.0 (HMAC-SHA256) integration authentication — no 2FA prompts
- Two-phase commit for bulk operations (prepare → review → commit)
- Built-in guardrails — bulk caps, price change warnings, confirmation requirements
- Multi-store aware — explicit scope handling for websites, stores, and store views
- Audit logging — every action logged with timestamps, user, and parameters
Available Tools
Auth & Scope
auth.login/auth.logout/auth.whoami— session managementscope.list_websites_stores/scope.set_default— multi-store scope
Catalog
catalog.search_products— search with filters, pagination, field projectioncatalog.get_product— full product details by SKUcatalog.prepare_bulk_update/catalog.commit_bulk_update— two-phase bulk product updates
Pricing
pricing.prepare_bulk_price_update/pricing.commit_bulk_price_update— safe bulk price changes with threshold warnings
Promotions
promotions.search_rules/promotions.get_rule— find and inspect cart price rulespromotions.prepare_cart_price_rule_create/promotions.commit_cart_price_rule_create— create rules safelypromotions.update_rule/promotions.enable_rule/promotions.disable_rulepromotions.generate_coupons/promotions.export_coupons
CMS
cms.search_pages/cms.get_page— find and read CMS pagescms.prepare_bulk_update_pages/cms.commit_bulk_update_pagescms.search_blocks/cms.get_blockcms.prepare_bulk_update_blocks/cms.commit_bulk_update_blocks
SEO
seo.prepare_bulk_update_url_keys/seo.commit_bulk_update_url_keys— URL key changes with collision detectionseo.bulk_update_meta— bulk meta title/description/keyword updatesseo.report_redirect_chains— find redirect chain issues
Diagnostics
diagnostics.product_display_check— why isn't my product showing?diagnostics.indexer_status_report— indexer health checkdiagnostics.inventory_salable_report— MSI stock/salable quantity
Cache
cache.purge_by_url/cache.purge_product/cache.purge_category— targeted cache invalidation (Fastly or fallback)
Quick Start
Prerequisites
- Node.js 18+
- A Magento 2 / Adobe Commerce instance
- An Integration configured in Magento with appropriate API permissions
Installation
git clone https://github.com/thomastx05/magento-mcp.git
cd magento-mcp
npm install
npm run build
Magento Integration Setup
- In Magento Admin, go to System > Integrations > Add New Integration
- Give it a name (e.g., "MCP Server")
- Under API, select the resources you want to expose
- Save and Activate the integration
- Copy the four OAuth credentials:
- Consumer Key
- Consumer Secret
- Access Token
- Access Token Secret
MCP Client Configuration
Add to your MCP client config (e.g., mcp_config.json for Windsurf, claude_desktop_config.json for Claude Desktop):
{
"mcpServers": {
"magento-mcp": {
"command": "node",
"args": ["C:/path/to/magento-mcp/dist/index.js"],
"env": {
"MAGENTO_BASE_URL": "https://your-magento-instance.com",
"MAGENTO_OAUTH_CONSUMER_KEY": "your_consumer_key",
"MAGENTO_OAUTH_CONSUMER_SECRET": "your_consumer_secret",
"MAGENTO_OAUTH_TOKEN": "your_access_token",
"MAGENTO_OAUTH_TOKEN_SECRET": "your_access_token_secret"
}
}
}
}
Alternative: Username/Password Auth
If you prefer admin token auth instead of OAuth (requires handling 2FA if enabled):
{
"env": {
"MAGENTO_BASE_URL": "https://your-magento-instance.com",
"MAGENTO_ADMIN_USERNAME": "your_admin_user",
"MAGENTO_ADMIN_PASSWORD": "your_admin_password"
}
}
Usage
Once configured, call auth.login first to establish a session, then use any tool:
> auth.login
Login successful (OAuth 1.0 integration)
> catalog.search_products { filters: { name: { value: "%eye drops%", condition: "like" } } }
Found 12 products...
> diagnostics.inventory_salable_report { sku: "PROD-001" }
Qty: 3,805 | In Stock: Yes | Backorders: Enabled
Architecture
src/
index.ts # MCP server entry point (McpServer + StdioServerTransport)
config/index.ts # Configuration & guardrail defaults
actions/ # Tool handlers (one file per domain)
auth.ts
catalog.ts
pricing.ts
promotions.ts
cms.ts
seo.ts
Tools (10)
catalog.search_productsSearch products with filters, pagination, and field projectioncatalog.get_productRetrieve full product details by SKUcatalog.prepare_bulk_updatePrepare a bulk product updatecatalog.commit_bulk_updateCommit a prepared bulk product updatepricing.prepare_bulk_price_updatePrepare bulk price changes with threshold warningspromotions.search_rulesFind and inspect cart price rulescms.search_pagesFind and read CMS pagesseo.report_redirect_chainsFind redirect chain issuesdiagnostics.indexer_status_reportCheck indexer health statuscache.purge_by_urlPurge cache for a specific URLEnvironment Variables
MAGENTO_BASE_URLrequiredThe base URL of the Magento instanceMAGENTO_OAUTH_CONSUMER_KEYOAuth consumer keyMAGENTO_OAUTH_CONSUMER_SECRETOAuth consumer secretMAGENTO_OAUTH_TOKENOAuth access tokenMAGENTO_OAUTH_TOKEN_SECRETOAuth token secretMAGENTO_ADMIN_USERNAMEAdmin username for password authMAGENTO_ADMIN_PASSWORDAdmin password for password authConfiguration
{"mcpServers": {"magento-mcp": {"command": "node", "args": ["C:/path/to/magento-mcp/dist/index.js"], "env": {"MAGENTO_BASE_URL": "https://your-magento-instance.com", "MAGENTO_OAUTH_CONSUMER_KEY": "your_consumer_key", "MAGENTO_OAUTH_CONSUMER_SECRET": "your_consumer_secret", "MAGENTO_OAUTH_TOKEN": "your_access_token", "MAGENTO_OAUTH_TOKEN_SECRET": "your_access_token_secret"}}}}