{
  "markdown": "# buywhere-mcp\n\nMCP server for the [BuyWhere](https://buywhere.ai) product catalog. Lets Claude Desktop, Cursor, Windsurf, and other MCP-compatible agents search and retrieve products without writing any HTTP code.\n\n## Setup\n\n### 1. Get your API key\n\nSign up at [buywhere.ai/developers](https://buywhere.ai/dashboard) and copy your API key.\n\n### 2. Configure your client\n\n#### Claude Desktop\n\nOpen `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows) and add:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"python\",\n      \"args\": [\"mcp_server.py\"],\n      \"env\": {\n        \"BUYWHERE_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n#### Cursor\n\nOpen **Settings → MCP** and add a new server, or edit `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"python\",\n      \"args\": [\"mcp_server.py\"],\n      \"env\": {\n        \"BUYWHERE_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n#### Windsurf\n\nEdit `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"buywhere\": {\n      \"command\": \"python\",\n      \"args\": [\"mcp_server.py\"],\n      \"env\": {\n        \"BUYWHERE_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n### 3. Ask your agent to search products\n\nRestart your client, then try:\n\n> *\"Search BuyWhere for wireless earbuds under $50 in Singapore\"*\n\n> *\"Use BuyWhere to compare the cheapest iPhone 15 cases\"*\n\n> *\"Get me the affiliate link for product ID abc123 from BuyWhere\"*\n\n---\n\n## Tools\n\n### `search_products`\n\nSearch the BuyWhere catalog using keywords or natural language.\n\n| Parameter  | Type    | Required | Description |\n|------------|---------|----------|-------------|\n| `query`    | string  | yes      | Keyword or natural-language query |\n| `country`  | string  | no       | Country code hint (`sg`, `my`, `id`) |\n| `category` | string  | no       | Category slug (e.g. `electronics/smartphones`) |\n| `limit`    | integer | no       | Max results, 1–50 (default 10) |\n\n### `get_product`\n\nFetch full details for a single product.\n\n| Parameter    | Type   | Required | Description |\n|--------------|--------|----------|-------------|\n| `product_id` | string | yes      | BuyWhere product ID |\n\n### `get_price`\n\nCompare current prices for a product across all available merchants. Returns listings ranked by total price (including shipping), plus best-price and best-value recommendations.\n\n| Parameter    | Type   | Required | Description |\n|--------------|--------|----------|-------------|\n| `product_id` | string | yes      | BuyWhere product ID |\n\n### `compare_prices`\n\nSide-by-side comparison of 2–5 products. Returns structured differentiators, price range, pros/cons, and a best-value recommendation — purpose-built for AI agent decision-making.\n\n| Parameter     | Type     | Required | Description |\n|---------------|----------|----------|-------------|\n| `product_ids` | string[] | yes      | Array of 2–5 BuyWhere product IDs |\n\n### `get_affiliate_link`\n\nGet the click-tracked BuyWhere affiliate link for a product. Always use this instead of raw product URLs when sharing links with users — it logs the referral and redirects to the merchant page.\n\n| Parameter    | Type   | Required | Description |\n|--------------|--------|----------|-------------|\n| `product_id` | string | yes      | BuyWhere product ID |\n\n### `get_catalog`\n\nList available product categories. Use this to discover what categories exist before searching or filtering.\n\n| Parameter     | Type   | Required | Description |\n|---------------|--------|----------|-------------|\n| `parent_slug` | string | no       | Parent slug for subcategories (omit for top-level) |\n\n## Resources\n\n| URI | Description |\n|-----|-------------|\n| `buywhere://catalog/sg` | Available categories in Singapore |\n| `buywhere://catalog/my` | Available categories in Malaysia |\n| `buywhere://catalog/id` | Available categories in Indonesia |\n\n## Environment variables\n\n| Variable           | Required | Description |\n|--------------------|----------|-------------|\n| `BUYWHERE_API_KEY` | yes      | Your BuyWhere API key |\n| `BUYWHERE_API_URL` | no       | Override API base URL (default: `https://api.buywhere.ai`) |\n\n## Sample agent conversation\n\n```\nUser: Find the cheapest mechanical keyboard on BuyWhere and compare the top 2\n\nClaude: I'll search BuyWhere for mechanical keyboards and compare the top results.\n\n[Calls search_products with query=\"mechanical keyboard\", limit=5]\n\nFound 12 products. Top results:\n1. Keychron K2 — SGD 89.00 (prod_abc123)\n2. Royal Kludge RK61 — SGD 65.00 (prod_def456)\n\n[Calls compare_prices with product_ids=[\"prod_abc123\", \"prod_def456\"]]\n\nComparison: Keychron K2 vs Royal Kludge RK61\nPrice range: SGD 65 – SGD 89\nKey differences:\n  • Keychron K2: full-size TKL layout, Mac-optimised keycaps\n  • RK61: compact 60% layout, budget-friendly\nBest value: Royal Kludge RK61 at SGD 65\n\n[Calls get_affiliate_link with product_id=\"prod_def456\"]\n\nHere's your purchase link: https://api.buywhere.ai/r/prod_def456\n```\n\n## Development\n\n```bash\nnpm install\nnpm run build\nBUYWHERE_API_KEY=your_key python mcp_server.py\n```\n",
  "bytes": 5175,
  "sha": "849e910948a2bfe2f99ca890c1a1f8b9e8efcecf396f67e77a363f957dfabaef",
  "repo_slug": "richmondteo-code/buywhere-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_richmondteo_code_buywhere_mcp_c100c8af/readme"
}