# PedidosYa MCP

> PedidosYa MCP automates your entire restaurant operation across Latin America's leading food delivery platform. Manage incoming orders, adjust menus on the fly, and dispatch couriers—all through natural conversation with any AI client.

## Overview
- **Category:** ecommerce
- **Price:** Free
- **Tags:** food-delivery, restaurant-operations, menu-management, logistics, order-processing

## Description

Managing a popular restaurant means juggling more than just cooking; you're running logistics, marketing, and inventory simultaneously. This MCP lets you treat your PedidosYa partner account like an extension of your mind. You can receive new orders and instantly accept or reject them without ever touching the physical tablet. Need to mark items as sold out because you ran low? Do it in real-time on your live menu listing. It goes deeper than just order status: you can even request a courier for internal B2B deliveries and track their exact GPS location until they arrive at your kitchen door.

If you're looking for reliable, multi-platform control over high-volume delivery operations in Latin America, Vinkius hosts this MCP so you connect once to manage everything. You can even set up automated webhooks that fire when cancellations happen or new orders come in, keeping your systems always updated.

## Tools

### accept_order
Accepts a pending customer order, signaling to the system that your kitchen is preparing the items for pickup.

### update_product_price
Changes the listed price of any menu item, with the update taking effect immediately on the public listing.

### update_product_status
Toggles a product's availability online, marking it sold out or bringing it back to the active menu without changing its price or description.

### create_webhook
Sets up event-driven webhooks so your systems automatically react when things like new orders or cancellations occur.

### get_order
Retrieves the complete details for a specific customer order using an identifier.

### get_restaurant
Fetches operational data and status information for a particular registered restaurant location.

### list_menu_sections
Gets a full list of menu categories and all products within them, including current pricing and availability.

### list_orders
Lists incoming orders, allowing you to filter by status—pending, being prepared, or ready for pickup.

### list_restaurants
Shows a list of all your partner restaurant venues, including their operational hours and current open/closed state.

### list_webhooks
Displays all the webhook event subscriptions you have currently configured.

### mark_order_ready
Triggers the courier dispatch process for an order, assuming a delivery courier hasn't arrived yet.

### reject_order
Declines an incoming customer order and provides a specific reason like 'out of stock' or 'too busy'.

### request_courier
Schedules an on-demand courier pickup for external deliveries, specifying both the starting and ending addresses.

### track_shipment
Provides real-time GPS coordinates and status updates for a currently active courier shipment.

## Prompt Examples

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

**Response:** 
```
You have 3 pending orders: 1. Order #PY-88412 — 2x Burger Clásica + 1x Papas Fritas ($345 UYU, 5 min ago). 2. Order #PY-88415 — 1x Pizza Margherita + 2x Coca-Cola ($520 UYU, 2 min ago). 3. Order #PY-88418 — 3x Empanadas + 1x Flan ($280 UYU, just now). Would you like me to accept all three?
```

**Prompt:** 
```
Mark the Chocotorta as sold out on restaurant ID R-4421.
```

**Response:** 
```
Done! Product 'Chocotorta' (ID: P-9922) has been marked as unavailable on restaurant R-4421's PedidosYa menu. Customers will see it greyed out until you re-enable it. Would you like to update any other products?
```

**Prompt:** 
```
Request a courier to pick up a package from Av. 18 de Julio 1234, Montevideo and deliver to Rambla Wilson 500.
```

**Response:** 
```
Courier requested! Shipment #SH-77201 has been created. Pickup: Av. 18 de Julio 1234, Montevideo. Dropoff: Rambla Wilson 500, Montevideo. Estimated pickup in 12 minutes. A courier will be assigned shortly. Use `track_shipment` with ID SH-77201 to monitor real-time GPS location.
```

## Capabilities

### Manage Order Lifecycle
Receive and act on incoming orders by accepting them for preparation, rejecting them with a reason, or marking them as ready for pickup.

### Control Menu Availability
Instantly update pricing or toggle products on or off so customers only see what you actually have in stock right now.

### Coordinate Courier Logistics
Schedule on-demand couriers for package pickups and track their real-time location until the delivery is complete.

### Monitor Restaurant Health
View operational details, including all registered restaurant locations and their current business hours.

## Use Cases

### Handling a sudden rush of orders
A manager notices 15 new pending orders. Instead of logging into the tablet and hitting 'Accept' fifteen times, they prompt their agent: 'Review all pending orders and accept them for preparation.' The MCP handles the `accept_order` sequence instantly.

### Coordinating a multi-site inventory check
A dark kitchen operator needs to know which brand's menu items are sold out across three different locations. They ask for a full list of menu sections, and the agent runs `list_menu_sections` on each venue to confirm stock levels before going live.

### Emergency courier pickup
A logistics manager needs parts picked up from a client's site across town. They tell their agent: 'Request a courier for a package pick-up at X address and drop off at Y address.' The MCP handles the `request_courier` call, giving them a tracking ID.

### Addressing pricing discrepancies
The finance team realizes the price of their flagship dish is wrong online. They tell the agent to 'Update the price for the main course' using `update_product_price`, ensuring the marketplace listing reflects the correct cost immediately.

## Benefits

- Accept and manage orders using the `list_orders` tool. Instead of clicking through a tablet interface, you simply ask your agent to process all pending deliveries in natural language.
- You maintain full menu control by using `update_product_status`. If an item sells out, mark it unavailable immediately so customers don't place orders for things you don't have.
- Handle last-mile logistics with the `request_courier` tool. Schedule pickups and track shipments in real time using `track_shipment`, keeping your inventory flowing smoothly.
- Keep your data pipelines running by setting up webhooks via `create_webhook`. This ensures that when a cancellation happens, your internal systems are instantly notified without needing manual checks.
- Adjust pricing on the fly. The `update_product_price` tool lets you change menu costs immediately, making sure your online listing always matches your current financial model.

## How It Works

The bottom line is you use natural language prompts to execute complex operational tasks that normally require logging into a separate portal and clicking through multiple screens.

1. Subscribe to this MCP using your PedidosYa Partner Client ID and Secret.
2. Connect the credentials to your AI client (like Claude or Cursor).
3. Ask your agent to perform an action, such as listing all pending orders or requesting a courier.

## Frequently Asked Questions

**How do I accept an order using the PedidosYa MCP?**
You use the `accept_order` tool. Simply tell your agent to 'Accept all pending orders' and it executes the necessary steps, committing you to preparing the items.

**Can I update prices with the PedidosYa MCP?**
Yes, use the `update_product_price` tool. You provide the menu product ID and the new local currency price, and it updates instantly on the live listing.

**What is the best way to track a delivery with PedidosYa MCP?**
Use the `track_shipment` tool. You input the shipment ID provided when you run `request_courier`, and the agent gives you real-time GPS updates on the courier's location.

**How do I handle sold out items with PedidosYa MCP?**
Use `update_product_status`. You specify the product ID, and it toggles the item off the menu instantly. This is much faster than manually editing the menu listing.

**Can I set up automatic alerts for new orders with PedidosYa MCP?**
Yes, you use `create_webhook`. You specify events like 'new_order' or 'order_cancelled,' and your systems will automatically get notified when those things happen.

**Can my AI agent accept or reject incoming orders automatically?**
Yes! Use `accept_order` to confirm an incoming order or `reject_order` with a reason (out_of_stock, closing_soon, too_busy, item_unavailable). Once accepted, the PedidosYa system begins assigning a delivery courier. When ready, use `mark_order_ready` to signal the courier for pickup.

**How do I mark items as sold out on my live menu?**
Use the `update_product_status` tool with the restaurant ID, product ID, and set `available` to false. The product will immediately show as unavailable on PedidosYa. To bring it back, call the same tool with `available` set to true.

**Can I request a courier for deliveries outside of food orders?**
Yes! Use the `request_courier` tool to create a shipment request with pickup and dropoff addresses. This leverages PedidosYa's logistics network for B2B courier services, independent of restaurant orders. Track the courier in real-time with `track_shipment`.