Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@E-Commerce Product HuntFind the lowest price for a 4-star rated Samsung Galaxy S24"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐๏ธ 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:
MCP Server: Provides three tools for scraping Pakistani e-commerce sites
MCP Client: Uses LangChain + Google Gemini to orchestrate tool calls
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
๐๏ธ 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:
get_daraz_products(query)- Scrapes Daraz with 4+ rating filterget_telemart_products(query)- Scrapes Telemart search resultsget_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-MCP2. Create Virtual Environment
# Create virtual environment
python -m venv venv
# Activate virtual environment
venv\Scripts\activate3. 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.txtIf you don't have
# Install uv first
pip install uv
# Then install dependencies
uv install4. 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:
Download from Claude Desktop
Make sure you have the latest version
2. Configure Claude Desktop: Open the Claude Desktop configuration file:
Windows:
code %APPDATA%\Claude\claude_desktop_config.json3. 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.pyMethod 3: MCP Inspector (Development & Testing)
Use the official MCP Inspector to test and debug your server:
uv run mcp dev mcp_server.pyThis 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
GitHub: @SyedHussainAhmad
LinkedIn: Syed Hussain Ahmad
Special Thanks
Syed Fassih Shah: @FassihShah
โญ Star this repository if you found it helpful!
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.