Back to optimizer

Swiggy Builders Club

Swiggy Food MCP — integration guide

Official documentation: mcp.swiggy.com/builders/docs. BudgetFood AI is a demo agent that mirrors the discover → score → shortlist phase; production ordering uses the tools below against https://mcp.swiggy.com/food.

Demo disclaimer: This web app uses static menus and a local scoring engine. It does not call Swiggy APIs from the browser. To submit real orders, wire an MCP client with OAuth as described in Authenticate.

MCP servers (Builders Club)

ServerEndpointTools
Foodhttps://mcp.swiggy.com/food14
Instamarthttps://mcp.swiggy.com/im13
Dineouthttps://mcp.swiggy.com/dineout8

Transport: Streamable HTTP (JSON-RPC) · Auth: OAuth 2.1 with PKCE

Canonical Food order flow

From Order food end-to-end: address → restaurants → menu → cart → coupons → place → track. v1: COD only; ₹1000 cart cap; confirm before place_food_order.

  1. 1

    Resolve delivery address

    Use saved address label + addressId before any search. Never pass raw coordinates as args.

    get_addresses
  2. 2

    Find restaurants

    Pass addressId + query. Only surface restaurants with availabilityStatus OPEN; mention distance for far picks.

    search_restaurants
  3. 3

    Browse menu

    Paginated categories; use search_menu for keyword search across items.

    get_restaurant_menusearch_menu
  4. 4

    Build cart

    Single-restaurant cart; switching restaurant flushes cart — use flush_food_cart to restart explicitly.

    update_food_cart
  5. 5

    Apply coupon (optional)

    v1 COD only — prefer coupons that do not require online payment.

    fetch_food_couponsapply_food_coupon
  6. 6

    Confirm & place

    Builders Club ₹1000 cart cap. Confirm with user before place_food_order — not idempotent; check get_food_orders before retry on 5xx.

    get_food_cartplace_food_order
  7. 7

    Track delivery

    Poll at most every ~10s for ETA updates.

    track_food_order

Food MCP tools (14)

discover

get_addressesget_restaurant_menusearch_menusearch_restaurants

cart

apply_food_couponfetch_food_couponsflush_food_cartget_food_cartupdate_food_cart

order

place_food_order

track

get_food_order_detailsget_food_orderstrack_food_order

support

report_error

Cursor MCP config

Paste into ~/.cursor/mcp.json (or project .cursor/mcp.json), then reload MCP servers and complete OAuth in the browser — official instructions.

mcp.json
{
  "mcpServers": {
    "swiggy-food": {
      "url": "https://mcp.swiggy.com/food"
    },
    "swiggy-instamart": {
      "url": "https://mcp.swiggy.com/im"
    },
    "swiggy-dineout": {
      "url": "https://mcp.swiggy.com/dineout"
    }
  }
}

How BudgetFood AI maps to MCP

  • Budget & cravings UI → replaces blind browse; agent still calls search_restaurants / search_menu with structured intent.
  • Scoring & combos → offline heuristic; production ranks MCP menu payloads before update_food_cart.
  • Checkout → demo simulation; real flow ends with place_food_order (paymentMethod: COD) and track_food_order.

Readiness & demo data

“Ready” depends on whether you are shipping a showcase demo or production MCP traffic.

Current build

Catalog source: demo (static lib/menu-data.ts + lib/restaurant-data.ts). Set NEXT_PUBLIC_DATA_SOURCE=mcp when your scoring layer consumes MCP payloads only.

Demo / submission ready

  • npm run build exits 0 (no TypeScript or lint failures).
  • npm run dev serves http://localhost:3000 — Execute Analysis returns scored results; layout works on mobile.
  • Production deploy: build + wrangler pages deploy succeeds; preview URL loads.
  • Judges can read /swiggy-mcp for integration narrative vs official Food MCP flow.

Production MCP ready

  • OAuth 2.1 + PKCE completed for your registered client (Builders Authenticate docs).
  • MCP client or backend proxy calls POST https://mcp.swiggy.com/food with a valid session.
  • Tool sequence follows official recipe: get_addresses → search_restaurants → menu/search_menu → update_food_cart → coupons → place_food_order → track_food_order.
  • COD v1, ₹1000 cart cap; confirm cart before place_food_order; handle non-idempotent placement (see Ship to production).
  • Manual verification with test orders in an approved environment.

Where demo catalog lives (replace for live MCP)

FileRole
lib/menu-data.tsStatic menu items; consumed by lib/recommend.ts for scoring. Replace with MCP menu payloads for production.
lib/restaurant-data.tsDemo restaurants & coupons; used on home / restaurants pages for counts and browsing.
QuestionAnswer
How do I know it’s ready?Demo/submission: build + run + deploy OK; /swiggy-mcp documents integration. Real MCP: OAuth works, tools return live data end-to-end, checkout follows Swiggy rules.
Remove demo restaurants for real MCP?Yes for production paths — discovery and menus must come from MCP tools (search_restaurants, get_restaurant_menu, etc.). Static lib/menu-data.ts and lib/restaurant-data.ts are not live catalog data; remove or gate behind demo-only mode.

Official links