{
  "markdown": "# BuyWhere MCP Server — Product Search & Price Comparison for AI Agents\n\n> **AI agents use BuyWhere to search products, compare prices, and discover deals across Singapore and US merchants in real time.**\n\n## Install in 30 Seconds\n\n```bash\nexport BUYWHERE_API_KEY=bw_live_xxxx\nnpx -y @buywhere/mcp-server\n```\n\nUse with **Claude Desktop, Cursor, VS Code Copilot, Cline, Windsurf, OpenCode, Codex, Continue.dev**, and any MCP-compatible client.\n\n- npm: https://www.npmjs.com/package/@buywhere/mcp-server\n- GitHub: https://github.com/BuyWhere/buywhere-mcp\n- MCP Registry: https://registry.modelcontextprotocol.io/?q=io.github.BuyWhere%2Fbuywhere-mcp\n\n<p align=\"center\">\n  <a href=\"https://buywhere.ai/api-keys\"><img src=\"https://img.shields.io/badge/🔑_Get_your_free_API_key-60_seconds-4f46e5?style=for-the-badge\" alt=\"Get your free API key\"></a>\n</p>\n\n<p align=\"center\">\n  <sub>Or get one in <b>3 seconds, no signup, no email</b>: <code>POST /v1/auth/register</code> · Legacy form: <a href=\"https://buywhere.ai/api-keys\">buywhere.ai/api-keys</a></sub>\n</p>\n\n[![npm version](https://img.shields.io/npm/v/@buywhere/mcp-server.svg)](https://www.npmjs.com/package/@buywhere/mcp-server)\n[![npm downloads](https://img.shields.io/npm/dm/@buywhere/mcp-server.svg)](https://www.npmjs.com/package/@buywhere/mcp-server)\n[![npm weekly downloads](https://img.shields.io/npm/dw/@buywhere/mcp-server?label=downloads%2Fweek)](https://www.npmjs.com/package/@buywhere/mcp-server)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node version](https://img.shields.io/badge/node-%3E%3D18-green)](https://nodejs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue)](https://www.typescriptlang.org)\n[![GitHub stars](https://img.shields.io/github/stars/BuyWhere/buywhere-mcp?style=social)](https://github.com/BuyWhere/buywhere-mcp)\n[![Smithery](https://smithery.ai/badge/@BuyWhere/buywhere-mcp)](https://smithery.ai/servers/@buywhere/mcp-server)\n[![MCP Registry](https://img.shields.io/badge/MCP%20Registry-published-blue)](https://registry.modelcontextprotocol.io/?q=io.github.BuyWhere%2Fbuywhere-mcp)\n[![Hashnode Blog](https://img.shields.io/badge/Hashnode-Blog-2962FF?logo=hashnode&logoColor=white)](https://buywhere.hashnode.dev/)\n\n---\n\n## AI Agents: Use This Package To\n\n- **Search products** across Singapore, US, Malaysia, Thailand, and Vietnam markets by keyword, category, or price range\n- **Compare products** across Lazada, Shopee, Amazon, and local retailers in a single query\n- **Find deals** and track real-time pricing with multi-currency support\n- **Build shopping agents** that recommend, compare, and link to products programmatically\n- **Discover product catalogs** with structured taxonomy for supported markets\n\n---\n\nProduct search API for AI agents via [Model Context Protocol](https://modelcontextprotocol.io). Built for AI agent commerce, not store management.\n\nOfficial MCP Registry listing: [io.github.BuyWhere/buywhere-mcp](https://registry.modelcontextprotocol.io/?q=io.github.BuyWhere%2Fbuywhere-mcp)\n\nWorks with **Claude Desktop, Cursor, VS Code Copilot, Cline, Windsurf, OpenCode, Codex, Continue.dev**, and any MCP-compatible client. Also supports [Agent-to-Agent (A2A)](https://github.com/google/A2A) protocol.\n\n---\n\n## Demo\n\n![BuyWhere MCP in Claude Desktop](https://raw.githubusercontent.com/BuyWhere/buywhere-mcp/main/public/assets/demo/buywhere-mcp-claude-desktop.gif)\n\n*44-second demo: product search, deal discovery, price comparison, and multi-region support.*\n\n```text\nUser:   \"Find me wireless earbuds under $50 available in Singapore\"\nAgent:  [calls search_products → returns 5 matching products]\n\nUser:   \"Compare the top 3\"\nAgent:  [calls compare_products → side-by-side with best-value pick]\n```\n\n## Quick Start\n\n**Get a key in 3 seconds — no signup, no email:**\n\n```bash\n# 1. Register (one call, returns api_key instantly)\ncurl -X POST https://api.buywhere.ai/v1/auth/register \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"agent_name\":\"your-agent\"}'\n# → {\"api_key\":\"bw_...\",\"tier\":\"unverified\",\"rate_limit\":{\"rpm\":20,\"daily\":1000}}\n\n# 2. Use the key\nexport BUYWHERE_API_KEY=bw_...\nnpx -y @buywhere/mcp-server\n```\n\nLegacy email signup (60s, manual approval) → [buywhere.ai/api-keys](https://buywhere.ai/api-keys)\n\n## Tutorials\n\n- **[Part 1: MCP for Ecommerce — The Missing Infrastructure Layer for AI Agent Shopping](https://dev.to/buywhere/mcp-for-ecommerce-the-missing-infrastructure-layer-for-ai-agent-shopping-1i7d)** — Architecture and why agents need a product catalog API\n- **[Part 2: Build a Real Shopping Agent in 15 Minutes](https://dev.to/buywhere/mcp-for-ecommerce-part-2-build-a-real-shopping-agent-in-15-minutes-4f5b)** — Hands-on: set up MCP server, search products, compare prices, build a working agent\n\n## From the Blog\n\nRead the **[BuyWhere Engineering Blog](https://buywhere.ai/blog)** for deep dives on MCP architecture, agent commerce, and the ecosystem.\n\nAlso follow the **[BuyWhere Hashnode blog mirror](https://buywhere.hashnode.dev/)** for the same engineering content on Hashnode.\n\n- **[MCP for Ecommerce 2026](https://buywhere.ai/blog/mcp-for-ecommerce-2026)** — How AI agents search real products, compare prices across markets, and why MCP is the standard\n- **[Building Production MCP Servers](https://buywhere.ai/blog/building-production-mcp-servers)** — Architecture, tool design patterns, and distribution (verified ~1,050 npm downloads/month)\n- **[MCP Server Ecosystem 2026](https://buywhere.ai/blog/mcp-server-ecosystem-2026)** — Every MCP category mapped (4,800+ servers across 40+ domains)\n- **[AI Agent Commerce: Missing Infrastructure](https://buywhere.ai/blog/ai-agent-commerce-missing-infrastructure)** — Why shopping is the last unbuilt layer of the agent-native economy\n- **[Cross-Border Price Comparison Tutorial](https://buywhere.ai/blog/cross-border-price-comparison-agent-tutorial)** — Build a shopping agent in 10 minutes with BuyWhere MCP\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `search_products` | Search catalog by keyword, category, price, country |\n| `get_product` | Full product details by ID (prices, specs, images) |\n| `compare_products` | Side-by-side comparison of 2–10 products |\n| `find_best_price` | Cheapest deliverable listing for a product across merchants |\n| `get_deals` | Products with significant price drops |\n| `list_categories` | Available product category taxonomy |\n| `find_similar` | Similar products by vector similarity |\n| `ingest_products` | Submit product URLs for catalog ingestion (agents/merchants) |\n| `search_products_v2` | v2 search; requires `deliver_to` (ISO country) |\n| `get_product_v2` | v2 product details by ID |\n| `compare_products_v2` | v2 comparison; optional `deliver_to` |\n| `get_deals_v2` | v2 deals; requires `deliver_to` |\n| `find_best_price_v2` | v2 best price; requires `deliver_to` |\n\nRemote MCP: `POST https://api.buywhere.ai/mcp` (JSON-RPC 2.0, protocolVersion 2024-11-05, 13 tools). Glama listing: https://glama.ai/mcp/servers/BuyWhere/buywhere-mcp\n\n## MCP Client Configuration\n\nFramework quickstarts:\n\n- CrewAI: [API key](https://buywhere.ai/api-keys) · [BuyWhere quickstart](https://github.com/BuyWhere/buywhere-mcp#quick-start)\n- Mastra: [API key](https://buywhere.ai/api-keys) · [BuyWhere quickstart](https://github.com/BuyWhere/buywhere-mcp#quick-start)\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@buywhere/mcp-server\"],\n      \"env\": { \"BUYWHERE_API_KEY\": \"bw_live_xxxx\" }\n    }\n  }\n}\n```\n\n### Cursor / VS Code / Cline\n\nAdd to your MCP settings file:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@buywhere/mcp-server\"],\n      \"env\": { \"BUYWHERE_API_KEY\": \"bw_live_xxxx\" }\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.windsurf/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@buywhere/mcp-server\"],\n      \"env\": { \"BUYWHERE_API_KEY\": \"bw_live_xxxx\" }\n    }\n  }\n}\n```\n\n### OpenCode / Codex\n\nAdd to `opencode.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@buywhere/mcp-server\"],\n      \"env\": { \"BUYWHERE_API_KEY\": \"bw_live_xxxx\" }\n    }\n  }\n}\n```\n\n### Continue.dev (VS Code / JetBrains)\n\nAdd to `~/.continue/config.json`:\n\n```json\n{\n  \"experimental\": {\n    \"mcpServers\": {\n      \"buywhere\": {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@buywhere/mcp-server\"],\n        \"env\": { \"BUYWHERE_API_KEY\": \"bw_live_xxxx\" }\n      }\n    }\n  }\n}\n```\n\n### Mastra\n\n[Mastra](https://mastra.ai) is a TypeScript-first AI agent framework with native MCP support.\n\n```bash\nnpm install @mastra/core @mastra/mcp\n```\n\n```typescript\nimport { Mastra } from '@mastra/core';\nimport { MastraMCPClient } from '@mastra/mcp';\n\nconst buywhere = new MastraMCPClient({\n  name: 'buywhere',\n  server: {\n    url: new URL('https://api.buywhere.ai/mcp'),\n    requestInit: {\n      headers: { 'Authorization': `Bearer ${process.env.BUYWHERE_API_KEY}` },\n    },\n  },\n});\n\nconst agent = new Mastra({\n  agents: {\n    shoppingAgent: {\n      instructions: 'You are a shopping assistant. Use BuyWhere to find and compare products.',\n      tools: await buywhere.tools(),\n    },\n  },\n});\n\nconst result = await agent.agents.shoppingAgent.generate(\n  'Find me the best deal on a Sony WH-1000XM5 in Singapore'\n);\n```\n\nFull guide: [BuyWhere + Mastra Integration](https://api.buywhere.ai/docs/guides/mastra-integration)\n\n### LangChain\n\nUse BuyWhere tools in LangChain agents via the MCP adapter:\n\n```python\nfrom langchain_mcp_adapters.client import MultiServerMCPClient\nfrom langgraph.prebuilt import create_react_agent\nfrom langchain_anthropic import ChatAnthropic\n\nasync def main():\n    async with MultiServerMCPClient({\n        \"buywhere\": {\n            \"url\": \"https://api.buywhere.ai/mcp\",\n            \"transport\": \"streamable_http\",\n            \"headers\": {\"Authorization\": f\"Bearer {BUYWHERE_API_KEY}\"},\n        }\n    }) as client:\n        tools = await client.get_tools()\n        agent = create_react_agent(ChatAnthropic(model=\"claude-sonnet-4-5\"), tools)\n        result = await agent.ainvoke({\"messages\": [(\"user\", \"Find the cheapest Sony headphones in Singapore\")]})\n```\n\n### LlamaIndex\n\nConnect BuyWhere via LlamaIndex MCP client:\n\n```python\nfrom llama_index.tools.mcp import BasicMCPClient, McpToolSpec\nfrom llama_index.agent.openai import OpenAIAgent\n\nasync def main():\n    mcp_client = BasicMCPClient(\n        command_or_url=\"https://api.buywhere.ai/mcp\",\n        headers={\"Authorization\": f\"Bearer {BUYWHERE_API_KEY}\"},\n    )\n    mcp_tool_spec = McpToolSpec(client=mcp_client)\n    tools = mcp_tool_spec.to_tool_list()\n    agent = OpenAIAgent.from_tools(tools)\n    response = await agent.achat(\"Compare prices for iPhone 16 Pro across Singapore and US\")\n```\n\n### CrewAI\n\nUse BuyWhere in a CrewAI agent with MCP tool integration:\n\n```python\nfrom crewai import Agent, Task, Crew\nfrom crewai_tools import MCPServerAdapter\n\nbuywhere_server = MCPServerAdapter(\n    server_params={\n        \"url\": \"https://api.buywhere.ai/mcp\",\n        \"headers\": {\"Authorization\": f\"Bearer {BUYWHERE_API_KEY}\"},\n        \"transport\": \"streamable-http\",\n    }\n)\n\nshopping_agent = Agent(\n    role=\"Shopping Research Analyst\",\n    goal=\"Find the best deals across Singapore and US markets\",\n    tools=[buywhere_server],\n)\n\ntask = Task(\n    description=\"Find the best price for Sony WH-1000XM5 headphones across all available markets\",\n    agent=shopping_agent,\n    expected_output=\"Product comparison with prices and merchant links\",\n)\n\ncrew = Crew(agents=[shopping_agent], tasks=[task])\nresult = crew.kickoff()\n```\n\n## Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `BUYWHERE_API_KEY` | (required) | API key (no signup: `POST /v1/auth/register {\"agent_name\":\"<name>\"}`) — returns instantly, no email verification |\n| `BUYWHERE_API_URL` | `https://api.buywhere.ai/mcp` | Custom API base URL |\n\n## Install\n\n```bash\n# Run directly (no install)\nnpx -y @buywhere/mcp-server\n\n# Install globally\nnpm install -g @buywhere/mcp-server\nbuywhere-mcp\n```\n\n## Use Cases\n\n- **Shopping agents** — build AI agents that search, compare, recommend products across markets\n- **Price comparison** — multi-market pricing in a single query across Lazada, Shopee, Amazon, local retailers\n- **Deal discovery** — find best-value products with real-time pricing and inventory\n- **Ecommerce automation** — integrate product search into any MCP-compatible app\n- **Cross-border commerce** — compare prices between Singapore, US, Malaysia, Thailand, and Vietnam markets\n- **Agent-to-Agent commerce** — delegate shopping tasks between agents via A2A protocol\n\n## Architecture\n\n```\nDeveloper's AI Agent (Claude, Cursor, etc.)\n  │\n  ├── MCP Protocol (stdio)\n  │\n  ├── @buywhere/mcp-server\n  │     ├── search_products(q, category, min_price, max_price, country_code, deliver_to)\n  │     ├── get_product(product_id)\n  │     ├── compare_products(product_ids[])\n  │     ├── find_best_price(product_name, country_code, deliver_to)\n  │     ├── get_deals(country_code, deliver_to, category)\n  │     ├── list_categories()\n  │     ├── find_similar(product_id)\n  │     └── ingest_products(urls[])\n  │\n  └── BuyWhere API (api.buywhere.ai)\n        └── Product catalog across SG, US, MY, TH, and VN merchants\n```\n\n## Development\n\n```bash\ngit clone https://github.com/BuyWhere/buywhere-mcp.git\ncd buywhere-mcp\nnpm install\nnpm run build\nnpm start\n```\n\n## Why BuyWhere?\n\nBuyWhere is a product search API for AI agents. We aggregate product data from Singapore, US, Malaysia, Thailand, and Vietnam merchants into a single, agent-friendly interface — no store management, no Shopify integration. Just search and compare products in real time.\n\n- **One API** — all markets, all retailers\n- **Agent-native** — built for MCP from day one\n- **Real-time** — live pricing and availability\n- **Developer-first** — no SDK needed, just add the server\n\n## Works Well With\n\nThese complementary MCP packages extend BuyWhere into powerful multi-tool workflows:\n\n- **[@modelcontextprotocol/server-filesystem](https://www.npmjs.com/package/@modelcontextprotocol/server-filesystem)** — Save shopping results and product research to your local filesystem. Combine with BuyWhere to export deal lists, price comparisons, and product specs as structured files.\n- **[@supabase/mcp-server-supabase](https://www.npmjs.com/package/@supabase/mcp-server-supabase)** — Store favorite products, user preferences, and price alerts in Supabase. Persist shopping history across agent sessions.\n- **[n8n-mcp](https://www.npmjs.com/package/n8n-mcp)** — Automate price monitoring workflows. Build no-code pipelines that watch BuyWhere prices and trigger notifications on price drops.\n- **[tavily-mcp](https://www.npmjs.com/package/tavily-mcp)** — Research products before buying. Use Tavily to find reviews and comparisons, then use BuyWhere to get current prices and purchase links.\n- **[@playwright/mcp](https://www.npmjs.com/package/@playwright/mcp)** — E2E test your shopping agent interactions. Verify that product search, price comparison, and checkout flows work correctly in browser automation.\n\n## Protocols\n\n| Protocol | Support |\n|----------|---------|\n| **MCP** (Model Context Protocol) | Full support — 10 tools, stdio transport |\n| **A2A** (Agent-to-Agent) | Multi-agent task delegation — [Agent Card](https://buywhere.ai/.well-known/agent.json) |\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for how to report issues, submit PRs, and suggest features.\n\n## From the Blog\n\nLearn more about MCP servers and the BuyWhere ecosystem:\n\n- [MCP server discovery](https://buywhere.hashnode.dev/the-mcp-server-discovery-gap) — Understanding the MCP server discovery gap\n- [Building production MCP servers](https://buywhere.hashnode.dev/building-production-mcp-servers) — Production best practices for MCP servers\n- [MCP servers that earn their context window](https://buywhere.hashnode.dev/5-mcp-servers-that-earn-context-window) — MCP servers that maximize context window value\n- [MCP ecommerce guide](https://buywhere.hashnode.dev/mcp-for-ecommerce-definitive-guide) — Definitive guide to MCP for ecommerce\n- [BuyWhere MCP launch](https://buywhere.hashnode.dev/buywhere-mcp-goes-live) — Announcing the BuyWhere MCP server launch\n- [MCP server ecosystem 2026](https://buywhere.hashnode.dev/mcp-server-ecosystem-2026-complete-guide) — Complete guide to the MCP server ecosystem in 2026\n\n## Support\n\nIf you find this project useful:\n\n- ⭐ **Star the repo** — it helps others discover BuyWhere\n- 🐛 [Open an issue](https://github.com/BuyWhere/buywhere-mcp/issues/new) for bugs or feature requests\n- 💬 [Start a discussion](https://github.com/BuyWhere/buywhere-mcp/discussions) for questions or ideas\n- 📣 Share it with other developers who build AI agent tools\n\n## License\n\nMIT\n",
  "bytes": 16986,
  "sha": "9ebb762f1b434b03e5e1159c7cce391a9d4a70dee91351c700d9306607c2394c",
  "repo_slug": "buywhere/buywhere-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_ai_buywhere_buywhere_mcp_16eafff9/readme"
}