# Meituan Waimai MCP

> Meituan Waimai connects your restaurant operations to any AI client. Use this server to manage the entire food delivery lifecycle: check order status, confirm new orders, process refunds, and update menu stock—all via conversation. It’s essential for multi-location operators who need real-time control over their shop floor.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** food-delivery, restaurant-management, order-processing, menu-control, refund-handling, delivery-tracking

## Description

Meituan Waimai connects your restaurant ops straight into your AI client. Instead of logging into some bloated merchant dashboard, you manage everything—from confirming an order to adjusting how much stock you have on hand—all through conversation. This server is built for multi-location operators who need real-time control over the shop floor without leaving their chat window.

When you run into complex, multi-step tasks that used to require manual clicks and jumping between different systems, this tool gives your agent the ability to handle it all in sequence. You'll be able to manage the entire food delivery lifecycle through conversation alone.

### Managing Order Flow

You can get a bird’s eye view of what’s happening with `get_order_list`, which lets you pull up multiple orders for your location and filter them by status, whether they're pending or already delivered. When a new order comes in, use **`confirm_order`** to change its status from pending to confirmed; this kicks off the prep work for your kitchen team. If an order gets stuck or needs attention, you can grab all the specifics on a single job using **`get_order_detail`**, which pulls up everything like customer notes and item contents based on the correct order ID. You've got options if things go south; you can use **`cancel_order`** to shut down a specific delivery, but you gotta provide a mandatory reason why. Once the food is out the door, you mark it as delivering using **`mark_delivering`**, and you can even optionally add rider tracking details so the customer knows exactly where their food is. When everything is done, use **`complete_order`** to mark the order as finished—that signals the customer got the food and triggers payment settlement.

### Handling Money and Disputes

When customers complain or something goes wrong financially, you manage it all with **`handle_refund`**. This tool lets you review a refund claim and either approve it or reject it; in either case, you gotta provide a mandatory reason for your decision so the records are clean.

### Running Inventory and Menu Control

You don't have to guess what sells. You can pull your entire menu catalog using **`list_menus`**, which shows item names, current prices, and—most importantly—your real-time stock levels. If you run low on something, use **`update_stock`** right away; this adjusts the quantity of a specific menu item, letting you mark it as sold out or restock inventory instantly so customers can't order what you don't have. You'll also find that when you need general info about your business—like operational hours or delivery coverage for a location—you use **`get_restaurant_info`**, just by providing the specific POI ID.

This gives you total control, letting your agent handle the whole operation without needing to switch between tabs.

## Tools

### cancel_order
Cancels a specific Meituan delivery order, requiring you to provide a mandatory reason for the cancellation.

### complete_order
Marks an order as finished, signaling the customer has received the food and triggering payment settlement.

### confirm_order
Changes an order from pending status to confirmed, starting the preparation process for the restaurant team.

### get_order_detail
Retrieves all specific information about one order ID, including contents, address, and customer notes.

### get_order_list
Lists multiple orders for a location, allowing filtering by status like pending or delivered.

### get_restaurant_info
Gets general business data—like hours or coverage area—for any specific restaurant POI ID.

### handle_refund
Processes a refund request, letting you approve or reject the claim and providing a mandatory reason for your decision.

### list_menus
Pulls the entire menu catalog for a restaurant, showing item names, prices, and current stock levels.

### mark_delivering
Changes an order's status to 'out for delivery,' optionally adding rider tracking details for customer visibility.

### update_stock
Adjusts the quantity of a menu item, marking it as sold out or restocking inventory instantly.

## Prompt Examples

**Prompt:** 
```
Show me all pending orders for my restaurant POI123.
```

**Response:** 
```
📋 Found 3 pending orders for POI123: Order #ORD-001 (¥45.50, 2 items, customer: Zhang Wei), Order #ORD-002 (¥78.00, 4 items, customer: Li Na), Order #ORD-003 (¥32.00, 1 item, customer: Wang Fang). All orders are awaiting your confirmation. Would you like me to confirm all of them?
```

**Prompt:** 
```
Mark food ID 4567 as sold out for POI123 — we ran out of chicken.
```

**Response:** 
```
✅ Stock updated successfully! Food item #4567 has been marked as sold out (stock=0) for restaurant POI123. The item is no longer visible on the customer menu, preventing new orders until you replenish stock.
```

**Prompt:** 
```
Handle refund request for order ORD-789 — customer says food never arrived. Approve it.
```

**Response:** 
```
✅ Refund approved and processed successfully! Order ORD-789 refund has been approved. The refund amount (¥56.00) will be returned to the customer's original payment method within 1-3 business days. The customer has been notified of the successful refund.
```

## Capabilities

### Manage Order Status
You can list orders by status (pending, confirmed, etc.), confirm new ones, or mark them as delivered using `get_order_list`, `confirm_order`, and `mark_delivering`.

### Process Refunds & Disputes
Use `handle_refund` to review customer complaints and either approve or reject refund claims after checking order history.

### Control Inventory and Menu
Access the menu via `list_menus`, check current stock levels, and update availability using `update_stock` so customers can't order what you don't have.

### Track Specific Orders
Get deep details on a single order—including customer info and items—by calling `get_order_detail` with the correct order ID.

### View Restaurant Data
Check operational data like business hours or delivery coverage for any specific location using `get_restaurant_info` (POI ID).

## Use Cases

### The Morning Rush: Handling 50 Pending Orders
A manager wakes up and sees a flood of pending orders. Instead of clicking through the dashboard fifty times to confirm each one, they ask their agent: 'Confirm all pending orders for POI123.' The agent runs `get_order_list` and then executes bulk confirmations using `confirm_order`. Done in seconds.

### The Inventory Crisis
A key ingredient runs out mid-day. Instead of waiting for a customer to complain or the system to fail, the kitchen staff member tells their agent: 'Mark chicken as sold out.' The agent executes `update_stock`, and the item instantly disappears from the customer menu.

### The Refund Investigation
A customer claims they never received their food. Instead of asking the customer for more proof, the service agent runs `get_order_detail` using the order ID. They check the delivery status and use that data to run `handle_refund`, providing a clear, documented reason for approval or denial.

### Multi-Location Coordination
The Ops Manager needs to know if three different store locations (POI A, POI B, POI C) are even open today. They run `get_restaurant_info` for all three IDs in one command, getting instant status checks and business hours.

## Benefits

- **Streamlined Order Flow:** Use `get_order_list` to pull all pending orders instantly. Instead of manually checking the dashboard for new requests, your agent gathers them in one list so you can confirm everything at once.
- **Real-Time Inventory Control:** Don't let customers order what you sold out of. By calling `update_stock`, you immediately change item availability on the customer menu, preventing lost sales and frustration.
- **Faster Dispute Resolution:** When a refund claim comes in, use `get_order_detail` to pull all necessary data (items, price, address) in seconds. Then, run `handle_refund` with confidence, knowing your decision is backed by verifiable order history.
- **Single Source of Truth:** Need to check if the restaurant is open or if delivery covers a certain area? Run `get_restaurant_info` using only the POI ID—no need to Google it or call the store directly. It keeps all location data centralized.
- **Automated Fulfillment Tracking:** When an order moves from confirmed to out for delivery, use `mark_delivering`. This updates the customer tracking status automatically, improving transparency without manual intervention.

## How It Works

The bottom line is, your AI client runs complex, multi-step business processes using simple chat commands.

1. Subscribe to the Meituan Waimai server and provide your App ID/App Secret credentials.
2. Your AI client uses a conversational prompt, telling the agent what needs doing (e.g., 'I need to confirm all pending orders for POI123').
3. The agent executes the necessary tool calls (`get_order_list`, then `confirm_order`), and returns the final status or required action to you.

## Frequently Asked Questions

**How do I use the `confirm_order` tool?**
You must provide both the order ID and the restaurant POI ID. This tool moves an order from a waiting state to confirmed, starting the preparation process for kitchen staff.

**What is the difference between `get_order_list` and `get_order_detail`?**
`get_order_list` gives you a summary view of many orders (status, total price). `get_order_detail` drills down into one specific order to see every item, customer note, or address.

**Can I use `handle_refund` without providing a reason?**
No. The API requires you to provide a clear explanation for the refund decision (both approval and rejection). This ensures your decision is documented correctly.

**`update_stock` needs a food ID—where do I get it?**
You must first run `list_menus`. That tool provides the full catalog, which includes the necessary Food IDs you need to pass into the `update_stock` function.

**Before I run any order tool, how do I verify my restaurant's location using `get_restaurant_info`?**
Use this tool with your Point of Interest (POI) ID. It confirms the restaurant’s existence, checks current business hours, and validates delivery coverage for that specific location before you try to manage orders.

**What are the critical conditions I must know when using `cancel_order`?**
You absolutely must provide a detailed reason; canceling negatively impacts merchant ratings. Also, the order has to be in a state that allows cancellation—it can't already be marked as delivered or completed.

**When exactly should I call `complete_order`?**
Only run this tool after the customer physically receives the food. Calling it too early will fail and won't trigger the payment settlement to your merchant account.

**How do I connect my system and get started with the Meituan Waimai API?**
You need to register through the developer portal to generate your specific App ID and App Secret. These credentials authenticate your agent and allow it to interact with your restaurant data.

**How do I get my Meituan Waimai App ID and App Secret?**
Log in to the [Meituan Waimai Developer Console](https://developer.waimai.meituan.com/), navigate to **API Documentation** > **Access Guide**, and register your application. You'll receive an App ID and App Secret. Make sure your application has the required API permissions for order management, menu access, and refund handling. The signature algorithm uses MD5 hashing of sorted parameters combined with your App Secret.

**What's the order lifecycle in Meituan Waimai?**
The typical order flow is: **1) Pending (待确认, status=1)** — Customer placed order, awaiting merchant confirmation. **2) Confirmed (已确认, status=3)** — Merchant accepted the order, kitchen starts preparation. **3) Delivering (配送中, status=5)** — Food is out for delivery with rider. **4) Completed (已完成, status=7)** — Customer received the order, payment settled. **5) Cancelled (已取消, status=8)** — Order was cancelled by merchant or customer. At each stage, you can query details, and merchants can confirm, mark delivering, or complete the order.

**How do I handle stock management and sold-out items?**
Use the `update_stock` tool to set stock quantities for menu items. Set `stock=0` to mark an item as sold out (it will immediately disappear from the customer menu). Set a positive number to replenish stock. Get the food ID from the `list_menus` tool first. This is critical during peak hours when ingredients run out — quickly updating stock prevents customers from ordering unavailable items and reduces refund requests.