Hosted MCP · Zero Local Server ~79% Token Savings · mode="summary" Claude · Cursor · Python · TypeScript · cURL 10 min build

Build an AI Agent Walmart US Buy Box, WFS & Review Risk Tracker

Catch unauthorized MAP undercuts, Walmart Fulfillment Services (WFS) stockouts, and emerging product-defect themes before they tank your conversion rate. Connect Claude or Cursor directly to https://mcp.upp3.com/mcp or deploy the scheduled Python httpx / TypeScript loop below using mode="summary" for ~79% token reduction.

4 REST Calls
items/{id}, /offers, /summary, and /browse
~79% Less
LLM input tokens via mode="summary" projection
4 MCP Tools
walmart_get_item, _offers, _review_summary, _reviews
WFS + Buy Box
Tracks Buy Box winner, shipping fees, fulfillment & AI cons

1. Verified Walmart US REST Endpoints & Native MCP Tools

Retail monitoring agents fail when they scrape bloated page HTML or make 10 fragmented calls per SKU. EdgeData exposes four verified Walmart US endpoints (with identical MCP tools) that cover Buy Box winner tracking, WFS fulfillment status, official AI Review Summaries, and category discovery:

ITEM DETAIL · enrich=true

walmart_get_item

GET /v1/walmart/items/5296511223?enrich=true&mode=summary returns structured pricing, stock, seller, BTF specs, and bundled AI pros/cons.

BUY BOX & WFS OFFERS

walmart_get_offers

GET /v1/walmart/items/5296511223/offers?mode=summary isolates buy_box, price_stats (min/max/avg), shipping, and WFS vs 3P fulfillment.

OFFICIAL AI SUMMARY

walmart_get_review_summary

GET /v1/walmart/items/5296511223/summary?mode=summary extracts Walmart’s official AI pros, cons, aspect sentiment, and rating breakdown.

CATEGORY DISCOVERY

/v1/walmart/browse & walmart_get_reviews

GET /v1/walmart/browse?cat_id=3944&mode=summary discovers top Electronics SKUs; pair with walmart_get_reviews when deeper defect evidence is needed.

2. Claude / Cursor Hosted MCP Setup & Buy Box Guard Prompt

Connect Cursor, Windsurf, or Claude directly to EdgeData’s Streamable HTTP MCP endpoint at https://mcp.upp3.com/mcp—zero local Docker containers or stdio wrappers required. Public tool discovery works immediately; add your Bearer API key to invoke live tool calls.

MCP Config — .cursor/mcp.json (Streamable HTTP)
{
  "mcpServers": {
    "edgedata": {
      "url": "https://mcp.upp3.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_EDGEDATA_API_KEY"
      }
    }
  }
}
Agent Prompt — Buy Box Price Drop & WFS Stockout Audit
Audit Walmart US item_id "5296511223" for Buy Box pricing risk, WFS fulfillment health, and product-defect signals using EdgeData MCP tools (keep mode="summary"):
1. Call walmart_get_item(item_id="5296511223", enrich=true, mode="summary") for baseline price, stock, and seller status.
2. Call walmart_get_offers(item_id="5296511223", mode="summary") to compare the current Buy Box winner against all competing offers (price, shipping_price, fulfillment, in_stock).
3. Call walmart_get_review_summary(item_id="5296511223", mode="summary") to inspect official AI pros, cons, and negative aspect sentiment.
4. If the AI summary flags recurring hardware/shipping defects, call walmart_get_reviews(item_id="5296511223", mode="summary") to verify recent customer complaints.

Return a structured Markdown alert table with:
- Current Buy Box winner, landed price (price + shipping), and delta vs cheapest competing offer
- Whether a WFS-fulfilled offer is in stock or lost the Buy Box to a 3P seller
- Top 3 customer-complaint risk themes from official AI cons
- Recommended repricing or inventory action.

3. mode="summary" vs Full Payload (~79% Token Savings)

Full Walmart product and offers responses include hundreds of storefront merchandising modules, image CDN variants, and deeply nested fulfillment flags. Passing mode=summary strips visual clutter while preserving every Buy Box, WFS, and AI sentiment metric needed for agent reasoning.

Full / Raw Payload (mode="raw") ~9,200 tokens / SKU check

Verbose Walmart storefront trees, merchandising badges, full offer arrays, and uncompacted spec blobs.

Summary Mode (mode="summary") ~1,930 tokens (~79% saved)

Projects buy_box, price_stats, top 10 normalized offers, and structured AI pros/cons/aspects.

Walmart US Endpoint Full Payload (mode="raw") mode="summary" (Agent Default) Est. Token Savings
GET /v1/walmart/items/{id}?enrich=true ~3,900 tokens (full BTF & DOM metadata) ~780 tokens (price, stock, seller, rating, key highlights) ~80% saved
GET /v1/walmart/items/{id}/offers ~2,450 tokens (nested raw offer objects) ~510 tokens (buy_box, price_stats, top_offers with WFS flag) ~79% saved
GET /v1/walmart/items/{id}/summary ~1,350 tokens (full review theme payloads) ~290 tokens (ai_summary, pros, cons, aspects) ~78% saved
GET /v1/walmart/browse?cat_id=3944 ~1,500 tokens (full catalog cards) ~350 tokens (compact item IDs, prices, ratings, pagination) ~77% saved

Sample /offers?mode=summary Response

JSON — Compact Buy Box & WFS Snapshot
{
  "ok": true,
  "source": "walmart",
  "mode": "summary",
  "data": {
    "source": "walmart",
    "item_id": "5296511223",
    "total_offers": 6,
    "price_stats": { "min": 24.98, "max": 34.50, "avg": 28.41 },
    "buy_box": {
      "seller_name": "Walmart.com",
      "price": 24.98,
      "shipping_price": 0.0,
      "fulfillment": "WFS",
      "in_stock": true,
      "is_buy_box": true
    },
    "top_offers": [
      {
        "seller_name": "Walmart.com",
        "price": 24.98,
        "shipping_price": 0.0,
        "fulfillment": "WFS",
        "in_stock": true,
        "is_buy_box": true
      },
      {
        "seller_name": "Authorized Direct Supply",
        "price": 26.40,
        "shipping_price": 0.0,
        "fulfillment": "SELLER_FULFILLED",
        "in_stock": true,
        "is_buy_box": false
      }
    ],
    "estimated_tokens_saved_pct": 79.2
  }
}

4. Production Code: Scheduled Buy Box & WFS Change Detector

Run this self-contained script via cron, GitHub Actions, or an autonomous agent tool call. It compares live Buy Box pricing and WFS availability against your MAP floor, pulls official AI Review Summary cons on anomalies, and optionally scans Electronics category 3944.

walmart_buybox_watcher.py — Python httpx
import os
import json
from pathlib import Path
import httpx

API_BASE = "https://api.upp3.com"
API_KEY = os.environ["EDGEDATA_API_KEY"]
STATE_FILE = Path("walmart_state.json")

WATCHLIST = [
    {"item_id": "5296511223", "map_floor": 25.00, "require_wfs": True},
]


def get_json(client: httpx.Client, path: str, params: dict) -> dict:
    resp = client.get(
        f"{API_BASE}{path}",
        headers={"X-API-Key": API_KEY},
        params=params,
        timeout=30.0,
    )
    resp.raise_for_status()
    return resp.json().get("data", {})


def check_item(client: httpx.Client, rule: dict, prev_state: dict) -> tuple[dict, list[str]]:
    item_id = rule["item_id"]

    # 1) Enriched item snapshot (summary mode saves ~79% tokens)
    item = get_json(
        client,
        f"/v1/walmart/items/{item_id}",
        {"enrich": "true", "mode": "summary"},
    )
    # 2) Competing seller offers & Buy Box winner
    offers = get_json(
        client,
        f"/v1/walmart/items/{item_id}/offers",
        {"mode": "summary"},
    )
    # 3) Official Walmart AI review summary (pros/cons & sentiment)
    review_summary = get_json(
        client,
        f"/v1/walmart/items/{item_id}/summary",
        {"mode": "summary"},
    )

    buy_box = offers.get("buy_box") or {}
    bb_price = buy_box.get("price")
    bb_seller = buy_box.get("seller_name")
    bb_fulfillment = str(buy_box.get("fulfillment") or "")
    bb_in_stock = bool(buy_box.get("in_stock", True))

    alerts = []
    if bb_price is not None and float(bb_price) < rule["map_floor"]:
        alerts.append(f"MAP violation: Buy Box ${bb_price:.2f} < floor ${rule['map_floor']:.2f} ({bb_seller})")
    if rule["require_wfs"] and "WFS" not in bb_fulfillment.upper():
        alerts.append(f"WFS shift: Buy Box fulfillment is now '{bb_fulfillment or 'UNKNOWN'}' ({bb_seller})")
    if not bb_in_stock:
        alerts.append(f"Stockout risk: Buy Box offer marked out of stock for item {item_id}")

    prev = prev_state.get(item_id, {})
    if prev.get("buy_box_price") is not None and bb_price != prev.get("buy_box_price"):
        alerts.append(f"Price changed: ${prev['buy_box_price']} -> ${bb_price}")

    snapshot = {
        "item_id": item_id,
        "title": item.get("title"),
        "buy_box_seller": bb_seller,
        "buy_box_price": bb_price,
        "fulfillment": bb_fulfillment,
        "in_stock": bb_in_stock,
        "total_offers": offers.get("total_offers"),
        "ai_cons": (review_summary.get("cons") or [])[:3],
    }
    return snapshot, alerts


def main() -> None:
    prev_state = json.loads(STATE_FILE.read_text()) if STATE_FILE.exists() else {}
    next_state = dict(prev_state)

    with httpx.Client() as client:
        for rule in WATCHLIST:
            snap, alerts = check_item(client, rule, prev_state)
            next_state[rule["item_id"]] = snap
            print(json.dumps({"snapshot": snap, "alerts": alerts}, indent=2))

        # Optional: discover fresh Electronics items (cat_id=3944)
        cat = get_json(client, "/v1/walmart/browse", {"cat_id": "3944", "mode": "summary"})
        print("Category 3944 items fetched:", len(cat.get("items") or []))

    STATE_FILE.write_text(json.dumps(next_state, indent=2))


if __name__ == "__main__":
    main()

5. Provision Your Instant Free API Key

Generate a free EdgeData API key right here to power your Cursor/Claude MCP server or run the Walmart watcher script immediately.