Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables searching Daraz.pk products with smart cheapest detection and category support using documented API patterns.

README.md

Daraz MCP Server - Clean & Fast

A streamlined Model Context Protocol (MCP) server for searching Daraz.pk products. Built using documented Daraz API patterns for maximum reliability and performance.

✨ Features

  • 🎯 Simple & Clean: Just 2 tools instead of 6 confusing ones
  • 📡 Official API Patterns: Uses documented mods.listItems structure and ajax=true endpoints
  • 💸 Smart Cheapest Search: Auto-detects "cheapest" queries and searches extensively
  • 🚫 No Cache: Always fresh results, no .db files created
  • 🔄 Multi-method: JSON API primary, Playwright browser fallback
  • 🎨 Beautiful Output: Human-readable results with clickable links
  • ⚡ Fast: Optimized using officially documented endpoints

🛠️ Tools Available

1. search_daraz - The Main Search Tool

Smart search that handles everything automatically:

# Regular search
search_daraz("wireless mouse")

# Auto-detects cheapest requests  
search_daraz("cheapest wireless mouse")  # Searches 15 pages, sorts by price

# Explicit cheapest mode
search_daraz("mouse", cheapest=True)

# Price filtering
search_daraz("laptops", max_price=50000)

# Category search (uses documented category endpoints)
search_daraz("TV", category="televisions")

Features:

  • Auto-detects "cheapest" in query and switches to extensive search mode
  • Searches 15 pages for cheapest queries vs 5 for regular
  • Sorts results by price for cheapest queries
  • Returns formatted, clickable results

2. product_details - Get Product Info

product_details("https://www.daraz.pk/products/product-url")

📡 API Implementation

This server uses officially documented Daraz.pk endpoints:

Search Endpoint

GET https://www.daraz.pk/catalog/
    ?ajax=true
    &q=query
    &page=1
    &_keyori=ss

Category Endpoint

GET https://www.daraz.pk/{category}/
    ?ajax=true
    &page=1
    &q=search_within_category

Response Structure: data.mods.listItems[] contains product array

🚀 Quick Setup

  1. Install dependencies:
pip install fastmcp requests beautifulsoup4 playwright
  1. Add to LM Studio mcp.json:
{
  "mcpServers": {
    "daraz-search": {
      "command": "C:\\path\\to\\python.exe",
      "args": ["C:\\path\\to\\server_merged.py"]
    }
  }
}
  1. Test in LM Studio:
  • "Find cheapest Nothing phone case"
  • "Search for wireless mice under 2000 PKR"
  • "Show me gaming laptops"

🎯 Improvements from Previous Version

Before (Confusing):

❌ 6 different tools: search_daraz, search_daraz_structured, search_daraz_formatted, search_cheapest_daraz, search_most_expensive_daraz, product_details ❌ Cache causing stale results ❌ AI couldn't decide which tool to use

After (Clean):

✅ 2 simple tools: search_daraz (smart), product_details ✅ No cache - always fresh results ✅ Auto-detection of user intent ✅ Uses documented API patterns

📊 Search Behavior

| Query Type | Pages Searched | Results | Sorting | |------------|---------------|---------|---------| | Regular search | 5 pages | Up to 10 | As found | | "Cheapest" query | 15 pages | 1 item | Price (lowest first) | | With cheapest=True | 15 pages | 1 item | Price (lowest first) | | With max_price | 5 pages | Filtered | As found |

🔧 No Cache = Always Fresh

  • ✅ No .db files created
  • ✅ Every search hits Daraz API fresh
  • ✅ Latest prices and stock status
  • ✅ No stale cached results

🛡️ Anti-Bot Protection

  • User-Agent rotation (5 different browsers)
  • Random delays between requests (1.0-2.5s)
  • Proper headers and referrers
  • Graceful fallback to browser automation

📖 Usage Examples

For Users in LM Studio:

  • "Find me the cheapest Nothing phone 1 case"
  • "Search for wireless mice under 1500 PKR"
  • "What are some good gaming laptops?"
  • "Show me TVs in the television category"

For Developers:

# The AI will automatically choose the right parameters
search_daraz("cheapest phone cases")  # cheapest=True, max_results=1
search_daraz("phone cases")           # regular search, max_results=10
search_daraz("cases", max_price=500)  # price filtering

🎉 Ready to Use

This server is production-ready and uses officially documented Daraz.pk API patterns for maximum reliability. No seller account required - works with public endpoints only.

Start LM Studio, add the MCP server, and start shopping! 🛍️

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.