# Magento (Adobe Commerce) MCP

> Magento (Adobe Commerce) MCP Server lets your AI agent talk directly to your e-commerce backend. You can search product catalogs by SKU, audit order histories for specific IDs, check real-time stock counts, and query customer records—all through natural conversation. It's full operational control over product data, inventory levels, and customer lifecycles.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** catalog-management, product-metadata, inventory-tracking, adobe-commerce, order-processing, headless-commerce

## Description

Your AI agent can talk directly to your whole **Magento (Adobe Commerce)** backend. You don't need complicated API wrappers; you just tell your client what you wanna know, and it handles the rest. This gives your agent full operational control over your product data, customer records, inventory levels, and sales history.

**Checking Product Details & Inventory:**
If you gotta check specific product metadata—like pricing or attributes—you can use `mg.get_product` by passing in a Stock Keeping Unit (SKU). To see if you got enough stock right now, run `mg.get_stock`; it gives the current physical count and availability status for any SKU you provide. When you're doing broader research across your catalog, `mg.search_products` lets you query keywords or categories, returning a list of matches with metadata so you can compare them quick. For structural mapping, `mg.list_categories` shows you the whole category hierarchy, detailing how every product is grouped throughout the store.

**Handling Customers:**
To audit a specific user account, your agent runs `mg.get_customer`, using their internal ID to pull up all profile data, including addresses and group assignments. If you're looking for a customer by name or general criteria, use `mg.search_customers` to get a list of matching users that supports pagination.

**Tracking Orders and Transactions:**
Your agent can find recent sales orders using `mg.search_orders`, which lets you filter results by status or time and handles paginated lists. Need the full rundown on one specific sale? `mg.get_order` fetches every detail for a single order ID, including line items and shipping addresses. For accounting audits, you can list multiple invoice records using `mg.list_invoices`, which gives you access to transaction details across paginated results.

**Mapping the Store:**
To understand the technical setup of your site, run `mg.get_store_config`; it pulls global settings like base URLs, supported locales, and currency rules for the whole store. If you need to search through all recent sales data, you can also use `mg.search_orders` by filtering based on time or status.

## Tools

### mg.get_customer
Retrieves full profile data for a specific Magento customer using their internal ID.

### mg.get_order
Fetches all details—including line items and shipping addresses—for one specific order by its ID.

### mg.get_product
Gets comprehensive metadata (pricing, attributes) for a single product using its Stock Keeping Unit (SKU).

### mg.get_stock
Checks the current physical inventory count and availability status for a given product SKU.

### mg.get_store_config
Retrieves global settings like base URLs, locales, and currency definitions for the entire Magento store.

### mg.list_categories
Maps out the full category hierarchy of your store, showing how products are grouped across all levels.

### mg.list_invoices
Lists paginated invoice records and related transaction details for accounting audits.

### mg.search_customers
Searches the customer database using general criteria, returning a list of matching users with pagination options.

### mg.search_orders
Browses and lists recent sales orders based on time or status filters, supporting paginated results.

### mg.search_products
Searches the entire product catalog using keywords or categories, returning a list of matching products with pagination.

## Prompt Examples

**Prompt:** 
```
Search for products containing 'backpack' in the catalog
```

**Response:** 
```
Searching catalog… I've found several products. Highlights include the 'Adventure Pro Backpack' (SKU: AP-001, $85.00) and the 'Urban Tech Pack' (SKU: UT-005, $120.00). Would you like to see the full details or stock levels for any of these?
```

**Prompt:** 
```
Show me the last 5 orders placed today
```

**Response:** 
```
I've retrieved the latest 5 orders. Highlights: Order #100001 ($45.50, Processing), Order #100002 ($120.00, Pending), and Order #100003 ($15.99, Completed). Would you like to see the customer details for the pending order?
```

**Prompt:** 
```
Check the stock level for SKU 'TSHIRT-BLUE-L'
```

**Response:** 
```
Retrieving stock for 'TSHIRT-BLUE-L'… Currently, you have 45 units in stock. The item is marked as 'In Stock'. Minimum sale quantity is 1 and maximum is 100. Would you like to check other sizes?
```

## Capabilities

### Audit customer records by ID or name
Retrieve detailed profile information, including addresses and group assignments, for a specific user account.

### Track order history across the platform
List recent commerce orders using pagination, or fetch full details for a single order ID, including line items and shipping status.

### Query real-time product inventory levels
Get current stock quantities for any specific SKU to identify shortages or audit supply chain visibility.

### Search deep within the product catalog
Perform broad searches across all products, returning multiple matches and metadata for quick comparison.

### Map out store structure and settings
Fetch critical site configurations, including base URLs, supported locales, and currency rules, necessary for cross-border auditing.

## Use Cases

### Reconciling a missing customer record
A client calls claiming an order was placed but the account seems incomplete. You use `mg.search_orders` to find the Order ID, then pass that ID to `mg.get_order`. Finally, you check the associated customer details using `mg.get_customer` to confirm the full profile data and address.

### Checking stock for a big sale
A marketing team needs to know if they can sell 50 units of 'TSHIRT-BLUE-L' during a flash sale. They ask their agent, which calls `mg.search_products` first (to confirm the SKU), and then executes `mg.get_stock`. The result confirms availability instantly.

### Auditing regional storefront changes
The team is setting up a new international market. They ask their agent to run `mg.list_categories` to understand the current structure, followed by `mg.get_store_config` to pull the necessary locale and currency settings for the new region.

### Investigating old invoices
An accountant needs to verify payments from last quarter. They use `mg.list_invoices` with a date range, then filter the resulting list using the agent to pull detailed information on any suspicious or missing records.

## Benefits

- Inventory checks happen instantly. Use `mg.get_stock` to check real-time stock levels for any SKU, eliminating the need to navigate separate inventory dashboards just to answer a quick question.
- Audit entire customer bases quickly. Instead of manually running reports, use `mg.search_customers` or `mg.get_customer` to pull up profiles and addresses for specific users by name or ID.
- Track down any transaction. You can search for recent sales orders using `mg.search_orders`, then drill down into the full details of one order with `mg.get_order`. It’s a two-step process in natural language.
- Map your entire catalog structure. Run `mg.list_categories` to instantly understand your store's taxonomy, verifying that product lines are distributed correctly across all levels.
- Verify site settings for global campaigns. Use `mg.get_store_config` to pull base URLs and currency codes before running cross-border commerce audits, guaranteeing accuracy.

## How It Works

The bottom line is: you manage your entire e-commerce platform from conversational prompts, without writing boilerplate API calls.

1. Subscribe to the server and provide your Magento Store URL and Access Token (Integration Token).
2. Your AI client uses the provided tools—for example, calling `mg.search_products` to find SKUs.
3. The agent executes the call against the live store data and returns structured product information directly to your chat interface.

## Frequently Asked Questions

**How do I find an order's details using mg.get_order?**
You need the explicit Order ID. Pass that single numerical ID to `mg.get_order`, and it returns everything: line items, shipping address, and status history.

**What's the difference between mg.search_products and mg.get_product?**
`mg.search_products` runs a broad keyword search across many products. `mg.get_product` requires you to already know the exact SKU, giving you all metadata for that single item.

**Can I check stock levels without knowing the product ID first?**
No, you must use a search tool first. Use `mg.search_products` or `mg.search_orders` to find the SKU, then pass that resulting SKU into `mg.get_stock`.

**How do I see all customer records in my database?**
You use `mg.search_customers` for a paginated list based on criteria (like name or email). If you have the specific internal ID, `mg.get_customer` is better.

**If I use mg.list_invoices, how do I get all historical records?**
It retrieves data in paginated chunks. You must pass page number and limit parameters to pull through the entire history. The API handles chunking for you so your agent gets all necessary invoices.

**What specific metadata does mg.get_store_config retrieve?**
This tool pulls global store settings, not just product data. It gives you key information like the base URLs, active locales, and default currency used for accurate cross-border auditing.

**When I call mg.get_product, what kind of attributes are available?**
It provides detailed metadata beyond just the name and SKU. You get access to custom product attributes, pricing tiers, and media gallery links for a complete view of the item.

**When should I use mg.get_customer instead of searching?**
Use it when you know the exact internal customer ID. This method is faster and more precise than running a general search, guaranteeing your agent pulls data for one specific record.

**Can I search for products by SKU through my agent?**
Yes. Use the `mg.get_product` tool and provide the exact SKU. Your agent will fetch the full record, including pricing, stock status, and custom attributes directly from your Magento catalog.

**How do I check the status history of a specific order?**
The `mg.get_order` tool retrieves the complete order entity by ID. Your agent will expose the status history, payment info, and line items, helping you track the fulfillment lifecycle of any order.

**Can my agent list the entire category tree of my store?**
Absolutely. Use the `mg.list_categories` tool to retrieve the complete category hierarchy. Your agent will report the IDs, names, and product counts for each level, ensuring you have a full view of your store's taxonomy.