E-Commerce Product Hunt

E-Commerce Product Hunt

Enables searching and scraping of product listings from major Pakistani e-commerce platforms including Daraz, Telemart, and iShopping. It provides tools to find the lowest-priced items with ratings of four stars or higher through automated web scraping.

Category
Visit Server

README

šŸ›ļø E-Commerce Product Hunt

A Model Context Protocol (MCP) implementation that finds the lowest-priced products with good ratings (4+ stars) across major Pakistani e-commerce platforms including Daraz, Telemart, and iShopping.

MCP

Model Context Protocol (MCP) is a standardized protocol that enables AI applications to securely connect to external data sources and tools. It acts as a bridge between AI models (like Gemini) and various services, databases, APIs, and applications.

MCP Architecture Components:

  • MCP Servers - Provide specific tools, resources, or data to clients
  • MCP Clients - AI applications that want to access external resources
  • Transport Layer - Communication mechanism between clients and servers

šŸŽÆ Project Overview

This project demonstrates MCP implementation by creating:

  1. MCP Server: Provides three tools for scraping Pakistani e-commerce sites
  2. MCP Client: Uses LangChain + Google Gemini to orchestrate tool calls
  3. Streamlit Frontend: User-friendly web interface for product searches

Note: In this project both server and client run on the same host for learning purposes.

✨ Features

  • šŸ” Multi-Platform Search: Scrapes Daraz, Telemart, and iShopping simultaneously
  • ⭐ Quality Filtering: Prioritizes products with 4+ star ratings
  • šŸ’° Price Search: Finds the lowest-priced genuine products
  • šŸ¤– AI-Powered: Uses Google Gemini for intelligent product matching
  • šŸ’¬ Chat Interface: Conversational UI with memory
  • šŸš€ Async Processing: Non-blocking operations for better performance

<img width="1366" height="671" alt="PriceHunt" src="https://github.com/user-attachments/assets/19b36d89-77cc-4295-b9aa-44d51d098e0c" />

šŸ›ļø MCP Architecture

This Project's MCP Implementation:

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   Streamlit     │    │   MCP Client    │    │   MCP Server    │
│   Frontend      │◄──►│  (LangChain +   │◄──►│   (FastMCP)     │
│   (app.py)      │    │   Gemini)       │    │                 │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                                                        │
                                                        ā–¼
                                               ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                                               │   E-commerce    │
                                               │   Websites      │
                                               │ • Daraz.pk      │
                                               │ • Telemart.pk   │
                                               │ • iShopping.pk  │
                                               ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

MCP Tools Defined:

  1. get_daraz_products(query) - Scrapes Daraz with 4+ rating filter
  2. get_telemart_products(query) - Scrapes Telemart search results
  3. get_ishopping_products(query) - Scrapes iShopping catalog

šŸ“ Project Structure

PriceHunt-MCP/
ā”œā”€ā”€ project/             # Client-side code
│   └── app.py              # Streamlit web interface
|   └── mcp_client.py          # MCP Client with LangChain integration
|   └── mcp_server.py          # MCP Server with 3 e-commerce tools
ā”œā”€ā”€ python-version         # Python version specification
ā”œā”€ā”€ pyproject.toml         # Python project configuration
ā”œā”€ā”€ README.md             # This file
└── uv.lock               # UV dependency lock file

šŸš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/FassihShah/PriceHunt-MCP.git
cd PriceHunt-MCP

2. Create Virtual Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
venv\Scripts\activate

3. Install Dependencies

Since we're using uv, install dependencies with:

# If using uv (recommended)
uv install

# Or using pip with requirements.txt
pip install -r requirements.txt

If you don't have uv installed:

# Install uv first
pip install uv
# Then install dependencies
uv install

4. Set Up Environment Variables

Create a .env file in the project root:

GOOGLE_API_KEY=your_google_gemini_api_key_here

šŸ–„ļø Using with Claude Desktop

This MCP server can also be integrated directly with Claude Desktop application, allowing to use the e-commerce tools directly in your conversations with Claude!

Setup for Claude Desktop:

1. Install Claude Desktop:

2. Configure Claude Desktop: Open the Claude Desktop configuration file:

Windows:

code %APPDATA%\Claude\claude_desktop_config.json

3. Add Your MCP Server: Create or update the claude_desktop_config.json file:

{
  "mcpServers": {
    "ecommerce-scraper": {
      "command": "python",
      "args": ["/path/to/your/project/mcp_server.py"],
      "env": {
        "PYTHONPATH": "/path/to/your/project"
      }
    }
  }
}

Once configured, you can directly ask Claude things like:

  • "Find me the cheapest Ronin Earbuds"

Claude will automatically use these MCP tools to scrape the websites and provide results!

šŸŽ® Usage

Method 1: Claude Desktop Integration

After setting up Claude Desktop configuration (see section above)

Method 2: Streamlit Web Interface

streamlit run app.py

Method 3: MCP Inspector (Development & Testing)

Use the official MCP Inspector to test and debug your server:

uv run mcp dev mcp_server.py

This will:

  • Launch a web interface
  • Test all your tools interactively
  • View tool schemas and parameters

šŸ“š Learning Outcomes

This project demonstrates:

  • MCP Protocol: Understanding of server/client architecture
  • AI Integration: LangChain + LLM tool orchestration
  • Async Programming: Non-blocking operations

šŸ‘¤ Author

Syed Hussain Ahmad

Special Thanks


⭐ Star this repository if you found it helpful!

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured