# Youzan MCP

> Youzan / 有赞 MCP connects your AI agent directly into a major e-commerce and retail platform, letting you manage operations without logging into any backend dashboard. You'll use it to instantly list products, track detailed order fulfillment, update inventory counts, search customer histories, and pull sales performance statistics—all through natural conversation.

## Overview
- **Category:** ecommerce
- **Price:** Free
- **Tags:** retail-saas, omnichannel-commerce, product-management, order-tracking, customer-profiles, sales-analytics

## Description

This MCP lets your agent talk directly to the core of a major e-commerce system. Think of it like giving your AI client instant access to every single tab and report inside an online store's backend, but without you ever having to click anything. You can ask your agent to find out what stock levels are available for a specific product ID or pull up the full details on last week's sales performance. Need to know about a customer? Your agent can search profiles and track their past purchases. Because everything runs inside Vinkius, you gain confidence that every tool call is secured by a zero-trust proxy; your keys never sit on disk. The real power comes when you combine this retail data with other systems—you can chain it with a separate customer service MCP, for instance, to build automations that span multiple platforms using one agent.

## Tools

### get_customer
Get customer details

### get_inventory
Get item SKU inventory

### get_item
Get item details

### get_order
Get order details

### get_sales_stats
Get sales performance stats

### get_shop
Get shop information

### list_categories
List item categories

### list_customers
Search SCRM customers

### list_items
List on-sale items

### list_orders
List sold trades

## Prompt Examples

**Prompt:** 
```
List all products currently on sale in my shop.
```

**Response:** 
```
I've retrieved your on-sale items. You have 25 active products, including 'Spring Collection T-Shirt' and 'Organic Tea Set'. Would you like more details or stock levels for any of them?
```

**Prompt:** 
```
Show me the last 5 orders from today.
```

**Response:** 
```
I've listed the last 5 orders. They include transactions for 'Wireless Headphones' and 'Designer Watch'. Total revenue from these orders is approximately ¥3,500. Should I check the shipping status for any of them?
```

**Prompt:** 
```
Check the inventory for item ID 12345678.
```

**Response:** 
```
I've retrieved the inventory for item 12345678. You have 3 variants: Small (10 in stock), Medium (5 in stock), and Large (Out of stock). Would you like me to notify you when the Large variant is replenished?
```

## Capabilities

### List available products
You can ask the agent to list all items currently on sale or browse specific product categories.

### Retrieve order history
The agent fetches detailed records for sold trades, letting you track fulfillment status and delivery info.

### Find customer details
You get instant access to full customer profiles, including contact information and purchase history.

### Check stock levels
The agent verifies current inventory counts and SKU availability for any item in the shop.

### Analyze sales data
You retrieve high-level summaries of sales performance, helping you understand what's selling right now.

## Use Cases

### A customer asks about an old order.
Instead of logging into the backend and manually searching for a purchase, you ask your agent to use list_orders first, then get_order on the specific ID. You instantly see the item details and fulfillment status.

### You need to verify if an item is ready to sell.
You check the overall product listing with list_items, confirm it's active, then use get_inventory to ensure the current stock count meets demand before telling the client they can buy it.

### A major sales report is due by morning.
You don't waste time compiling data. You run get_sales_stats and get a clean, summarized breakdown of revenue and top-selling items for the executive meeting.

### A customer disputes an item they bought months ago.
The agent uses list_customers to find the profile, then uses get_customer to retrieve their full purchase history so you can quickly address the dispute and confirm details.

## Benefits

- Stop clicking through dashboards. Instead of manually checking the status of every order, just ask your agent to list sold trades using list_orders and get a summary instantly.
- Need to know if you have enough stock? Use get_inventory to check SKU counts right away. You’ll know if you can fulfill an order before confirming it.
- Never lose track of customer history. The agent uses get_customer to pull up profiles, showing everything from contact details to past purchases in one go.
- Tracking sales success gets easier. Instead of running multiple reports, call get_sales_stats and get a clear summary of your performance metrics.
- You can quickly browse products using list_items or check the full specs on any single item using get_item, making product research fast.

## How It Works

The bottom line is that you treat complex retail operations like simple questions asked to an expert assistant.

1. First, subscribe to this MCP and provide your Youzan Client ID, Secret, and Shop ID.
2. Next, connect your agent from any compatible client (like Cursor or Claude).
3. Finally, ask your agent a question—for example, 'Show me the stock for Product X'—and it runs the necessary calls in the background.

## Frequently Asked Questions

**How do I find my Youzan Client ID and Secret?**
Log in to the [Youzan Cloud Console](https://console.youzanyun.com/), create an application, and you will find your Client ID (App Key) and Client Secret in the app settings.

**Where is my Shop ID (kdt_id)?**
Your Shop ID (kdt_id) can be found in the bottom left corner of your Youzan store administration backend.

**Can I check stock levels for specific product variants?**
Yes. Use the `get_inventory` tool with the product's item ID. It will return a list of all SKUs (variants) along with their current stock levels and pricing.

**If I call `get_order` with an order ID that doesn't exist, how should my agent handle the error?**
The agent will return a standard API response indicating the resource wasn't found. Always confirm you have the correct, unique order identifier before requesting details via this tool.

**How do I get sales performance stats for a specific time range using `get_sales_stats`?**
You must provide both start and end dates to the `get_sales_stats` function. The tool requires these date parameters to calculate accurate metrics for that period.

**How do I find all recent purchases made by a customer using `list_customers` and `list_orders`?**
First, run `list_customers` to get the specific customer ID. Then, use that ID when querying `list_orders` or `get_order` to pull their transaction history.

**What's the difference between listing products using `list_items` and checking details with `get_item`?**
`list_items` provides a quick view of all currently on-sale product identifiers. Use `get_item` when you need deep, specific metadata for one particular item.

**If I want to know the total stock count across multiple items, should I use `get_inventory` or check each product individually?**
You must call `get_inventory` once for every distinct SKU you need. There is no single tool that aggregates stock levels across an entire store.