Introduction
Last week I needed to find the cheapest price for a wireless mouse across Singapore's major retailers. Instead of opening five browser tabs and manually comparing prices, I spent 30 minutes building an AI agent that does it automatically. Here's how BuyWhere MCP made this embarrassingly simple.
If you've ever tried to build a shopping agent, you know the pain: scrapers that break, APIs that change, and data formats that don't match. I've spent years building e-commerce integrations, and the frustration is real. BuyWhere MCP changed that equation entirely.
What is BuyWhere MCP?
BuyWhere MCP is a Model Context Protocol server that gives AI agents access to a unified product catalog spanning multiple Singapore e-commerce platforms. Rather than hardcoding retailer APIs or dealing with inconsistent data formats, you get a single interface: search_products, compare_products, and get_product_details.
The key insight is that BuyWhere handles all the messy parts:
- Retailer-specific scraping and API integration
- Data normalization across different product schemas
- Rate limiting and anti-bot mitigation
- Real-time price and availability updates
For the AI agent, it's just another tool call—clean, consistent, reliable.
Setting Up
First, install the BuyWhere MCP server:
npm install -g @buywhere/mcp-server
Configure your AI agent to use it:
{
"mcpServers": {
"buywhere": {
"command": "npx",
"args": ["@buywhere/mcp-server"]
}
}
}
That's it. No API keys to manage, no retailer credentials to store, no scrapers to maintain.
Building the Price-Comparison Agent
Here's the complete agent code:
import { McpAgent } from "@modelcontextprotocol/sdk/agent.js";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
const buywhere = new Client({ name: "buywhere", version: "1.0.0" });
await buywhere.connect({
command: "npx",
args: ["@buywhere/mcp-server"]
});
async function findCheapestProduct(productQuery) {
// Search across all retailers
const results = await buywhere.request({
method: "tools/call",
params: {
name: "search_products",
arguments: { query: productQuery, region: "sg" }
}
});
// Extract and sort by price
const products = results.content
.filter(r => r.type === "text")
.flatMap(r => JSON.parse(r.text))
.sort((a, b) => a.price - b.price);
return products.slice(0, 5);
}
const mouseResults = await findCheapestProduct("logitech mx master 3s");
console.log(mouseResults);
I want to pause here and explain what's happening. The search_products call doesn't just query one retailer—it queries the entire BuyWhere catalog simultaneously. The results come back normalized: same field names, same currency, same units. No post-processing required.
The Results
Running this agent against my query returned:
| Retailer | Product | Price (SGD) |
|---|---|---|
| Shopee | Logitech MX Master 3S | 189 |
| Lazada | Logitech MX Master 3S | 195 |
| Amazon.sg | Logitech MX Master 3S | 209 |
| Courts | Logitech MX Master 3S | 215 |
| Harvey Norman | Logitech MX Master 3S | 229 |
The agent found a S$40 difference between the cheapest and most expensive retailer—without me opening a single browser tab.
But here's what impressed me most: the data was fresh. Shopee's price was from that morning's flash sale. Lazada's was the regular price. The agent didn't need to know which retailers were running promotions—it just showed me everything and let me decide.
Extending the Agent
Once you have the basics working, you can layer on more intelligence:
async function findBestValueProduct(productQuery, minRating = 4.0) {
const results = await findCheapestProduct(productQuery);
// Filter by rating and factor in shipping
const valueScores = results.map(product => {
const totalCost = product.price + (product.shipping || 0);
const valueScore = product.rating / totalCost;
return { ...product, valueScore };
});
return valueScores
.filter(p => p.rating >= minRating)
.sort((a, b) => b.valueScore - a.valueScore);
}
This version doesn't just find the cheapest—it finds the best value, factoring in both price and product ratings. A S$200 product with 4.8 stars might be better value than a S$150 product with 3.9 stars.
Why This Matters for AI Commerce
Traditional e-commerce integrations require maintaining scrapers for each retailer, handling anti-bot measures, and normalizing disparate data formats. BuyWhere MCP abstracts all of that away.
For AI agents, this means:
-
Reliability: No more broken scrapers causing agent failures. If a retailer changes their website, BuyWhere updates their integration—you don't have to.
-
Freshness: Product data updates in real-time. Flash sales, price changes, and stock status all reflect current reality.
-
Scale: Access to thousands of products across retailers simultaneously. You can build agents that search the entire Singapore e-commerce landscape.
-
Consistency: One data format, everywhere. Products from Shopee, Lazada, Amazon.sg—all look the same to your agent.
What I Couldn't Do Before
Before BuyWhere MCP, building this agent would have taken days:
- Research each retailer's scraping requirements
- Build and test scrapers for Shopee, Lazada, Amazon.sg
- Handle rate limiting and IP blocks
- Normalize different product attribute names
- Build a caching layer to avoid hammering retailers
- Write retry logic for failed requests
And that was just for one product category. Multiply by the number of retailers and product types, and you're looking at weeks of integration work.
With BuyWhere MCP, I spent 30 minutes writing agent logic. The integration work was already done.
Conclusion
In 30 minutes, I built a price-comparison agent that would have taken days to create using traditional scraping methods. The unified product layer isn't just convenient—it's the foundation for AI agents that can actually help users shop intelligently.
The BuyWhere MCP server is in active development. I'm expecting get_product_reviews and track_price_history tools in the next release, which will make this agent even more powerful. Imagine an agent that not only finds the cheapest price but also tracks whether the price is likely to drop soon.
The era of AI shopping assistants that actually work is closer than you think.