I Taught Claude to Order My Milk Every Morning from Zepto

Hi there ๐Ÿ‘‹

So, I did a thing. I automated my daily milk ordering on Zepto using Claude Code Routines and Zepto’s MCP server. Every morning, while I’m still half-asleep, Claude wakes up in the cloud, opens Zepto, searches for my milk, adds a protein bar because I promised myself I’d eat healthier, checks the cart total, confirms free delivery, picks my address, pays with Zepto Cash, and places the order.

By the time I actually open my eyes, the delivery person is already on his way.

Let me walk you through the whole journey: the problem, and the eventual “wait, this actually works?!” moment.

TL;DR

  • Zepto has an official MCP server at https://mcp.zepto.co.in/mcp.
  • Claude Code Routines (launched April 14, 2026) lets you run a prompt + MCP connectors on a schedule, on Anthropic’s cloud. No laptop needed.
  • I connected Zepto MCP to Claude Code, wrote a prompt with fallback milk selection, cart value checks, and delivery fee guards, and set it to run daily at 11 AM
  • Claude now autonomously orders my milk and a protein bar every morning, pays via Zepto Cash, and delivers to my saved address
  • It takes about 30 minutes to set up. The hardest part is writing a good prompt.

The problem: I’m bad at routines, Zepto is good at delivery

Here’s the thing about ordering milk every day – It sounds trivial until you actually have to do it every single day. I live in Kanpur, I use Zepto for groceries, and my morning routine depends on having fresh milk at home.

But I kept messing it up. Some days, I’d forget to order until noon (or evenings on some days). Don’t even get me started on the number of times I’ve had โ‚น85 in my cart and then had to hunt for something small to cross the โ‚น99 free delivery threshold. That’s time I could spend sleeping. Or, you know, actually drinking the tea or latte.

I’m a Tech Geek by interest and an API Engineer by profession. If I can build integrations all day at IFTTT, surely I can automate a milk order. Right?

Claude Code Routines: exactly what I needed

I was scrolling through Claude’s blog (without the intention to automate milk) on April 14, 2026, when Anthropic announced Routines in Claude Code as a research preview. The timing was perfect.

Here’s what Claude Code Routines are, if you haven’t seen the announcement yet: they let you save a prompt + a set of MCP connectors + optional repos, and then run that configuration autonomously on Anthropic’s cloud infrastructure on a schedule. No laptop needed. No terminal open. It just runs.

The three trigger types are:

  • Scheduled: daily, hourly, weekdays, weekly, or custom cron expressions
  • API: each routine gets its own HTTP endpoint with a bearer token
  • GitHub webhook: reacts to PRs, pushes, issues, etc.

The scheduled trigger is what caught my eye. Daily? That’s literally what I need. And the killer feature: all your connected MCP connectors are available to the routine.

Zepto has a proper MCP server at https://mcp.zepto.co.in/mcp with real tools for search, cart management, order placement, and payments. I connected it to Claude Code by going to https://claude.ai/settings/connectors and using the “Add custom connector” option. Followed the steps mentioned here, and authenticated with my Zepto account.

Zepto’s MCP uses OAuth 2.1 with mandatory PKCE: phone number + OTP flow, scoped JWT tokens, the works. The AI agent never sees your master token, only a scoped credential for MCP operations. Solid security design. Once authenticated via the Claude connector (the redirect URI for Claude is natively whitelisted by Zepto), everything just snaps together.

I went from reading the announcement to having a working prototype in about 30 minutes.

Building the prompt, step by step

This is where it gets fun. A Claude Code Routine is essentially a prompt that runs autonomously, so the prompt IS the product (or your agent, if you see it that way). You need to be precise, cover edge cases, and think about failure modes, because there’s no human in the loop to fix things when the routine runs at 11 AM.

Let me walk through the logic I needed:

The mandatory item. Every order must include a Superyou Chocolate Protein Wafer Bar. This is non-negotiable. I’m trying to build a habit of eating a protein-rich snack with breakfast, and the only way I’ll actually do it is if it shows up at my door every morning, whether I remember or not.

The milk, with fallback logic. Living in Kanpur, my preferred milk is Namaste India. But Zepto’s inventory is real-time. Sometimes it’s out of stock at my nearest dark store. When that happens, I want Amul as the fallback.

Priority-based selection. First choice โ†’ search โ†’ not available? โ†’ second choice โ†’ search โ†’ add to cart.

Quantity logic. 2 x 500ml packs (1L total) is for the daily run. Enough for chai, coffee, and other stuff without over-ordering.

The โ‚น99 cart value check. Zepto charges delivery fees below โ‚น99. The Superyou bar is around โ‚น50, and the milk is around โ‚น28-29 per pack (500ml). The prompt needs to verify that the cart value is above โ‚น99 before placing the order. If it’s not, flag it rather than proceed with a delivery charge.

โ‚น0 delivery charges check. Even above โ‚น99, I want the prompt to explicitly verify that delivery charges are โ‚น0 in the order preview.

Delivery address. All orders go to “New Home”. That’s my saved address label on Zepto for my new apartment. The routine needs to select this specific address, not just pick the first one.

Payment via Zepto Cash. I keep my Zepto Cash wallet topped up, and I want all automated orders to pay from there. No COD (I might not be awake to pay), no online payment redirect (nobody to click the payment link). Zepto Cash is the clean path for autonomous ordering.

The final prompt

After a bunch of iterations and testing (I ran it manually with “Run now” about a dozen times before trusting it on a schedule), here’s the prompt I landed on:

You are my daily Zepto grocery ordering assistant. Your job is to 
place a single order on Zepto every morning using the Zepto MCP 
Connector. Follow these steps carefully and in order:

1. Select delivery address: List my saved addresses and select the one labeled "New Home". If this address is not found, STOP and do not place any order.

2. Add mandatory item: Search for "Superyou Chocolate Protein Wafer Bar" and add 1 unit to the cart. This item must be in every order. If it is out of stock, STOP and do not place any order.

3. Add milk with fallback logic:
   - First, search for "Namaste India Toned Fresh Milk". Look for the 500ml variant. If available, add 2 unit to the cart.
   - If "Namaste India Toned Fresh Milk" is NOT available, search for "Amul Taaza" instead. Look for the 500ml variant. If available, add 2 unit to the cart. If not available, look for the 1l variant, and 1 unit to the cart.
   - If neither milk option is available, STOP and do not place any order.

4. Review cart: View the cart and verify:
   - The cart contains exactly 2 items (1 protein bar + 2 x 500ml milk).
   - The total cart value is above โ‚น99. If the cart value is โ‚น99 or below, STOP and do not place the order.

5. Preview order: Create an order preview (do NOT confirm yet). Verify:
   - Delivery charges are โ‚น0. If delivery charges are not โ‚น0, STOP and do not place the order.
   - The delivery address is "New Home".

6. Place order: If all checks pass, place the order using Zepto Cash as the payment method.

IMPORTANT RULES:
- Do NOT proceed if any check fails. It is better to not order than to order incorrectly.
- Do NOT add any items beyond what is specified above.
- Do NOT change quantities unless explicitly instructed.
- Always prefer the 500ml milk variant.

Saved this as a scheduled routine set to run daily at 11:00 AM IST, with the Zepto MCP connector attached. Created it from the Claude Code web UI at https://claude.ai/code/routines.

Does it actually work? Yes, and it’s a little surreal

The first morning it ran autonomously, I woke up to the doorbell by the Zepto Delivery partner (Yes, I woke up around 11:15 today ๐Ÿ˜…). I checked the order – Superyou bar, 2 packs of Namaste India milk 500ml, paid via Zepto Cash, delivering to my “New Home” address, โ‚น0 delivery fee. Perfect.

I’m on the Claude’s Pro plan, which gives me 5 routine runs per day.

Image: Order placed

The order is actually placed via MCP. Paid via Zepto Cash already in my account.

Image: Order received

Image: Claude Routine

Image: Routine ran!

What this actually represents

Okay, let me step back and be a little philosophical for a moment.

What I built is, objectively, a very small thing. It orders milk and a protein bar. It’s not curing diseases or writing novels. But think about what’s actually happening under the hood: an AI agent is waking up on a schedule, authenticating with a real e-commerce, making real-time inventory decisions with fallback logic, performing financial calculations, and completing a real transaction with real money. All without any human involvement.

That’s not a demo. That’s not a mockup. That’s not “in the future, AI will be able to…”. That’s happening right now, today, on my Zepto account, every morning.

A year ago, if you told me I’d have an AI agent autonomously spending money on my behalf on a daily schedule, I would have said you’re describing science fiction. I would have been very hesitant to let AI use my money. And yet here we are. Kudos to the Zepto team for opening up the MCP.

The hardest part wasn’t the AI or the automation. It was writing a prompt precise enough to handle inventory edge cases and delivery fee logic without a human backstop. The most futuristic part was easy; the most careful part was the prompt engineering. Claude AI helped me write the prompt (and parts of this blog post).

The MCP ecosystem is what makes this possible. Zepto built a proper MCP server with real tools like search, cart, orders, payments. Anthropic built Routines with native MCP connector support. The two pieces just snapped together. This is the power of open protocols and good APIs, and as someone who works on integration platforms & APIs every day, it makes me genuinely happy to see it working in the wild.

I’m already thinking about what else I can automate.

But for now, my milk shows up every morning, and I didn’t have to lift a finger. And honestly? That feels pretty great. ๐Ÿฅ›


Leave a Reply