Dossier โ€บ Document 04
DOCUMENT 04 ยท MCP INTEGRATIONS

The MCP adaptor layer

Five platform adaptors, one unified tool contract. This document catalogues every MCP tool QuickCart calls to fetch products, MRP, live stock, delivery ETA and offers โ€” and states plainly how far each platform actually lets us go.

Blinkit Zepto BigBasket Flipkart Amazon
5
Platform adaptors
1
Unified tool schema
11
Canonical tools
Read-first
Access posture

What is MCP, and how QuickCart uses it

MCP (Model Context Protocol) is an open standard for exposing tools and resources to an agent runtime over JSON-RPC 2.0. A server advertises a list of callable tools (each with a JSON-Schema for its inputs), and a client invokes them by name over a transport โ€” either stdio for a co-located process or streamable HTTP+SSE for a networked one. The protocol is transport-agnostic and schema-first, which is exactly what we want when talking to five very different retail backends.

QuickCart runs a single gateway service โ€” mcp-adaptor โ€” that fronts five per-platform MCP servers, one each for Blinkit, Zepto, BigBasket, Flipkart and Amazon. Every adaptor implements the same normalised tool contract (ยง4), so the Aggregation service can fan a query out to all five with identical call sites and merge the results without special-casing any platform. Each adaptor is a thin translator: it maps our canonical tool call onto whatever surface the platform genuinely offers, then maps the platform's native response back into QuickCart's canonical schema.

Put differently: MCP is our internal integration boundary. It is not something these retailers publish โ€” it is how we choose to wrap them so a new source is "just another adaptor speaking the same eleven tools."

Reality check โ€” these are QuickCart-built adaptors, not vendor MCPs As of 2026, none of Blinkit, Zepto, BigBasket, Flipkart or Amazon publishes an official public Model Context Protocol server. Everything in this document is a QuickCart-built MCP adaptor that wraps each platform's actual available surface โ€” an official affiliate/seller API where one exists, or a partner commerce API granted under a business agreement. Where a platform offers no sanctioned data access, that capability is marked out of scope. We do not treat unauthorised scraping as a production data source (see ยง7).

Adaptor topology

The Aggregation service never speaks to a retailer directly. It speaks MCP to the mcp-adaptor gateway, which routes each canonical tool call to the right per-platform server. Each server owns the credentials, rate-limit budget, native request shape and response-normalisation for exactly one platform.

flowchart LR AGG["Aggregation Service
(Node.js)"] -->|MCP / JSON-RPC| GW{{"mcp-adaptor
gateway"}} GW --> B["Blinkit MCP"] GW --> Z["Zepto MCP"] GW --> G["BigBasket MCP"] GW --> F["Flipkart MCP"] GW --> A["Amazon MCP"] B --> BB["Partner Commerce API
(agreement-gated)"] Z --> ZB["Partner Commerce API
(agreement-gated)"] G --> GB["Partner Commerce API
(agreement-gated)"] F --> FB["Affiliate / Seller API
(restricted)"] A --> AB["PA-API 5.0 / SP-API"] B -.->|normalise| CS[["Canonical schema:
product ยท mrp ยท price ยท
stock ยท eta ยท offers"]] A -.->|normalise| CS F -.->|normalise| CS
Figure 4.1 โ€” One gateway, five adaptors. Each adaptor translates a native backend into the same canonical schema so the Aggregation service stays platform-agnostic.

The unified tool contract

Every adaptor implements the same eleven tools. Read tools are mandatory; write tools are optional and only wired up where a platform's commerce API genuinely permits programmatic cart/checkout. All price fields are in โ‚น (INR); all availability and ETA calls are location-scoped because quick-commerce stock is hyperlocal.

ToolParametersReturns (normalised)Notes
search_productsquery, location, limit[{sourceProductId, title, brand, packSize, image, price, inStock, etaMinutes}]Read. Ranked snippets; drives the search fan-out.
get_productsourceProductIdFull product: title, brand, attributes, images, descriptionRead. Detail-screen hydrate.
get_pricesourceProductId, location{mrp, sellingPrice, effectivePrice, currency}Read. effectivePrice nets applicable auto-offers.
check_stocksourceProductId, location{inStock, quantityAvailable, maxQty}Read. Location-scoped; shortest TTL (~1 min).
get_delivery_estimatesourceProductId, location{minutes, slot, deliveryFee}Read. Real-time; drives the ETA badge.
get_offerssourceProductId, location[{code, type, value, minCart, expiresAt}]Read. Coupons & auto-applied discounts.
list_categoriesโ€”Category treeRead. Seeds catalogue & browse.
list_products_by_categorycategoryId, cursorPaged product listRead. Powers the missing-SKU crawl (Doc 03 ยง5).
create_cartlocation{cartId}Write โ€” only where a partner commerce API allows it.
add_to_cartcartId, sourceProductId, qty{cartId, lineItems, subtotal}Write โ€” partner-gated; otherwise deep-link handoff.
checkoutcartId, address, paymentToken{orderId, status, trackingUrl}Write โ€” rarely available; most platforms are handoff-only.
get_offers โ€” input JSON-Schema
{
  "name": "get_offers",
  "description": "Coupons and auto-applied discounts for a product at a location",
  "inputSchema": {
    "type": "object",
    "required": ["sourceProductId", "location"],
    "properties": {
      "sourceProductId": { "type": "string" },
      "location": {
        "type": "object",
        "required": ["lat", "lng"],
        "properties": {
          "lat": { "type": "number" },
          "lng": { "type": "number" },
          "pincode": { "type": "string" }
        }
      }
    }
  }
}
get_offers โ€” normalised response
{
  "sourceId": "blinkit",
  "sourceProductId": "blk_88213",
  "offers": [
    { "code": "WELCOME50", "type": "FLAT", "value": 50, "minCart": 199, "expiresAt": "2026-09-30T18:30:00Z" },
    { "code": null, "type": "AUTO_PERCENT", "value": 10, "appliesTo": "item" }
  ],
  "fetchedAt": "2026-09-08T10:14:22Z",
  "ttlSeconds": 120
}

Per-platform adaptors

Same eleven tools, five very different realities. The strength of each platform maps directly to what it is: quick-commerce players are unbeatable on hyperlocal stock and ETA; the marketplaces are richer on catalogue depth, MRP and reviews. Access mechanisms and limits below are illustrative of each platform's real posture, not published MCP specs.

Blinkit Blinkit adaptor

Underlying access: partner commerce API, agreement-gated. No public product API โ€” access requires a signed data/commerce partnership.

Supports: search_products, get_product, get_price, check_stock, get_delivery_estimate, get_offers, list_categories, list_products_by_category. Hyperlocal stock & ETA are its standout signals.

Write / checkout: typically handoff โ€” deep-link into the Blinkit app/PDP; programmatic checkout only under a commerce agreement.

Auth: OAuth2 client-credentials + per-partner API key ยท Rate: quota per agreement ยท Freshness: stock ~1 min, ETA real-time.

Zepto Zepto adaptor

Underlying access: partner commerce API, agreement-gated. Same posture as Blinkit โ€” a business relationship is the gate, not a public developer portal.

Supports: the full read set; excellent sub-15-minute ETA and dark-store-level stock. get_offers reflects Zepto Pass / cart-level promos where surfaced by the API.

Write / checkout: handoff by default; cart APIs only if the partnership includes commerce endpoints.

Auth: OAuth2 + API key ยท Rate: per-agreement quota ยท Freshness: stock ~1 min, ETA real-time.

BigBasket BigBasket adaptor

Underlying access: partner/commerce API, agreement-gated. Slotted + express (BB Now) fulfilment, so ETA can be a delivery slot as well as minutes.

Supports: full read set; deepest grocery catalogue and reliable MRP/pack-size data; get_delivery_estimate returns either express minutes or a slot window.

Write / checkout: handoff by default; slot booking via API only under agreement.

Auth: OAuth2 + API key ยท Rate: per-agreement quota ยท Freshness: price ~5 min, stock ~2 min, slots cached to slot expiry.

Flipkart Flipkart adaptor

Underlying access: Flipkart Affiliate API (historically public, now restricted/approval-only) and the Seller/Marketplace API for merchants. Product read is possible for approved affiliates; deep catalogue but no hyperlocal minute-ETA.

Supports: search_products, get_product, get_price (MRP + selling price), get_offers, ratings/reviews, images. get_delivery_estimate returns standard delivery days for a pincode, not minutes.

Write / checkout: affiliate deep-link buy โ€” no programmatic consumer checkout.

Auth: Affiliate ID + token ยท Rate: affiliate quotas ยท Freshness: price ~15 min; must honour affiliate attribution.

Amazon Amazon adaptor

Underlying access: Product Advertising API (PA-API 5.0) for Associates and, for our own listings, SP-API. The richest read surface of the five โ€” full product detail, MRP (SavingBasis), Buy Box price, images and reviews summary.

Supports: search_products (SearchItems), get_product (GetItems), get_price, get_offers, images, ratings. get_delivery_estimate is delivery days / Prime eligibility, not minutes.

Write / checkout: affiliate deep-link (Add-to-Cart / associate links) โ€” no programmatic consumer checkout via PA-API.

Auth: PA-API access/secret keys + Associate tag ยท Rate: TPS tied to shipped-items revenue (throttles hard when low) ยท Freshness: price ~15 min; strict display & attribution terms.

Reading the cards

Two families, two shapes of value:

  • Quick-commerce (Blinkit, Zepto, BigBasket) โ†’ hyperlocal stock + minute-level ETA; access is partnership-gated; checkout is usually handoff.
  • Marketplaces (Flipkart, Amazon) โ†’ deep catalogue, reliable MRP + reviews; access via affiliate/seller programs; buy is an attributed deep-link.

The Price Engine (Doc 05) weights each source's signals by exactly these strengths.

Capability matrix

What each adaptor can actually return today, given the access mechanisms above. This is the single most important table in the document โ€” the Aggregation service degrades gracefully around every โ—‘ and โœ•.

PlatformSearchDetailsMRPSell priceLive stock ETAOffersImagesReviewsBrowseAdd cartCheckoutOrder status
Blinkit โœ“โœ“โœ“ โœ“โœ“โœ“ โœ“โœ“โœ• โœ“โ—‘ โ—‘โ—‘
Zepto โœ“โœ“โœ“ โœ“โœ“โœ“ โœ“โœ“โœ• โœ“โ—‘ โ—‘โ—‘
BigBasket โœ“โœ“โœ“ โœ“โœ“โ—‘ โœ“โœ“โ—‘ โœ“โ—‘ โ—‘โ—‘
Flipkart โœ“โœ“โœ“ โœ“โ—‘ โ—‘โœ“ โœ“โœ“โœ“ โœ•โœ•โœ•
Amazon โœ“โœ“โœ“ โœ“โ—‘ โ—‘โœ“ โœ“โœ“โœ“ โ—‘โœ•โœ•

โœ“ Fully supported โ—‘ Partial / conditional (hover for the caveat) โœ• Not available via sanctioned access

Quick-commerce write/checkout cells are โ—‘ because they depend on a commerce partnership; marketplace checkout is โœ• because affiliate/PA-API programs deliberately exclude programmatic consumer purchase.

To what extent can we use them?

The honest answer differs per capability, not just per platform. Four axes govern everything:

๐Ÿ“–

Read vs write

All five give sanctioned read access to product, price and (for quick-commerce) stock/ETA. Write โ€” cart and checkout โ€” is the exception, available only under a commerce partnership; the default consumer path is a deep-link handoff.

๐Ÿ“

Per-location queries

Stock, ETA and often price are location-scoped. Quick-commerce answers are per dark-store; a query without lat/lng/pincode is meaningless. We cache per (sourceProductId, geohash).

โฑ๏ธ

Rate limits & quotas

PA-API TPS scales with our shipped-items revenue and throttles aggressively when low; affiliate and partner APIs carry per-agreement quotas. The gateway enforces a token bucket per adaptor and sheds load to cache.

๐Ÿ•’

Data freshness

We cache with capability-specific TTLs: price ~2โ€“5 min, stock ~1 min, ETA real-time (no cache), catalogue/images hours. Every response carries fetchedAt so the UI can show staleness.

What we CAN rely on

  • Product search & detail across all five.
  • MRP + selling price on all five (marketplaces are most reliable).
  • Live hyperlocal stock & minute-level ETA from Blinkit & Zepto (BigBasket express).
  • Offers/coupons where the API surfaces them.
  • Attributed deep-link buy to every platform (universal fallback).

What needs a partnership / is out of scope

  • Programmatic cart & checkout on quick-commerce โ€” requires a commerce agreement.
  • Any consumer checkout on Flipkart/Amazon via affiliate/PA-API โ€” excluded by program terms.
  • Live per-unit quantity on marketplaces (only an availability message).
  • Order status for orders we didn't place.
  • Scraping of any platform โ€” out of scope on ToS/legal grounds.
Legal & ToS boundary Production access to each platform is contingent on the relevant affiliate, seller or commerce partnership and its display/attribution terms (e.g. Amazon Associates & PA-API display rules, affiliate link attribution, cached-price display windows). Unauthorised scraping is explicitly out of scope โ€” it violates platform terms, is legally risky, and is not a data source QuickCart ships on. Every adaptor must degrade to a deep-link handoff when a sanctioned data path is unavailable.

Field mapping

Each adaptor's job ends here: collapse a native payload into QuickCart's canonical fields. Native field names below are illustrative โ€” exact for Amazon PA-API, representative for the partner APIs whose schemas aren't public.

Canonical fieldAmazon (PA-API)Flipkart (Affiliate)Blinkit / Zepto / BigBasket (illustrative)
sourceProductIdASINproductIdsku_id / product_id
titleItemInfo.Title.DisplayValueproductBaseInfo.titlename
mrpOffers.Listings.SavingBasis.AmountmaximumRetailPrice.amountmrp
sellingPriceOffers.Listings.Price.AmountflipkartSpecialPrice.amountselling_price
effectivePricePrice โˆ’ applied PromotionsPrice โˆ’ discountPercentagefinal_price (post auto-offer)
inStockOffers.Listings.Availability.TypeinStockavailability.in_stock
quantityAvailableโ€” (message only)โ€” (flag only)availability.qty
deliveryEstimate.minutesโ€” (delivery days)โ€” (delivery days)eta_minutes
deliveryEstimate.deliveryFeePrime / shippingshippingChargesdelivery_charge
imageImages.Primary.Large.URLimageUrls['200x200']image_url
ratingCustomerReviews.StarRatingproductBaseInfo.rating.averageโ€” (usually absent)

Sample MCP call

A single search_products invocation against the Blinkit adaptor over JSON-RPC, and the normalised list it returns. Note the adaptor has already collapsed Blinkit's native payload into our canonical fields โ€” the caller never sees a Blinkit-shaped object.

JSON-RPC request โ†’ blinkit MCP
{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "tools/call",
  "params": {
    "name": "search_products",
    "arguments": {
      "query": "amul butter 500g",
      "location": { "lat": 12.9716, "lng": 77.5946, "pincode": "560001" },
      "limit": 5
    }
  }
}
JSON-RPC result โ† blinkit MCP (normalised)
{
  "jsonrpc": "2.0",
  "id": 42,
  "result": {
    "content": [{ "type": "json", "json": {
      "sourceId": "blinkit",
      "products": [
        {
          "sourceProductId": "blk_88213", "title": "Amul Butter (Pasteurised)",
          "brand": "Amul", "packSize": "500 g",
          "mrp": 290, "sellingPrice": 278, "effectivePrice": 265,
          "inStock": true, "quantityAvailable": 14,
          "deliveryEstimate": { "minutes": 9, "deliveryFee": 0 },
          "image": "https://cdn.example/blk_88213.jpg"
        }
      ],
      "fetchedAt": "2026-09-08T10:14:22Z"
    } }]
  }
}

On the Aggregation side, the same call is one line via the MCP client โ€” the gateway hides transport and auth:

aggregation/sources.ts
import { mcp } from "./mcpAdaptorClient";

// Fan a single canonical tool out to one source; the adaptor normalises the shape.
export async function searchSource(sourceId, query, location) {
  const res = await mcp.call(sourceId, "search_products", {
    query, location, limit: 5
  }, { timeoutMs: 800 });       // per-source deadline; see Doc 05
  return res.products;                     // already in canonical schema
}

How these five per-source results are merged, SKU-matched and ranked into a single best-price answer is the subject of Document 05 โ€” Price & Availability Engine.

Where this fits The mcp-adaptor gateway sits inside the backend described in Document 03 โ€” Architecture, called by the Aggregation service; the list_products_by_category crawl also feeds the missing-SKU pipeline there. Merge & ranking of everything these tools return is covered in Document 05.