AI Shopping Assistant
A conversational AI shopping assistant for web-based product discovery and decision-making.
๐๏ธ AI Shopping Assistant
An intelligent, conversational shopping assistant powered by the Groq AI model and Model Context Protocol (MCP) for smart web-based product discovery and decision-making.
โจ Overview
The AI Shopping Assistant is an interactive, AI-powered chatbot that helps users make smarter shopping decisions. Backed by xAIโs Groq LLM and the Model Context Protocol (MCP), it can:
- ๐ง Understand natural language queries
- ๐ Conduct real-time searches on shopping platforms
- ๐ Compare products, services, and features
- ๐ธ Provide price guidance and recommendations
Whether you're choosing between phones, comparing streaming services, or searching for the best air purifier under a budgetโthis assistant is your ultimate shopping buddy.
๐งฉ Features
| Feature | Description |
|---|---|
| ๐ Product Comparison | Compare products (e.g., iPhone 15 vs. Galaxy S24) |
| ๐ฏ Smart Recommendations | Get suggestions based on your needs and budget |
| ๐ Feature Analysis | Understand specs, pros, cons, and more |
| ๐ต Price Guidance | Determine best value options |
| ๐ Service Comparison | Compare services like Netflix vs. Prime Video |
| ๐ Web Search (via MCP) | Searches shopping platforms like Amazon, Flipkart, Best Buy |
| ๐ฌ Context-Aware Chat | Maintains conversation context and provides summaries |
| ๐ Retries & Fallbacks | Smart handling of failed searches with category advice |
| ๐ก Chat Commands | /exit, /clear, /context, /status supported |
๐ Installation
1. Clone the Repository
git clone <repository-url>
cd ai-shopping-assistant
2. Set Up a Virtual Environment (Optional)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
3. Install Python Dependencies
pip install -r requirements.txt
4. Install MCP Node.js Dependencies
Make sure Node.js and npm are installed:
npm install -g @playwright/mcp @openbnb/mcp-server-airbnb duckduckgo-mcp-server
5. Environment Setup
Create a .env file in the root directory:
echo "GROQ_API_KEY=your-api-key-here" > .env
6. MCP Configuration
Ensure you have a valid browser_mcp.json in your MCP directory (e.g., D:\mcp\mcpdemo\):
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
},
"airbnb": {
"command": "npx",
"args": ["-y", "@openbnb/mcp-server-airbnb"]
},
"duckduckgo-search": {
"command": "npx",
"args": ["-y", "duckduckgo-mcp-server"]
}
}
}
In shopping_assistant.py, set:
self.config_file = r"path/to/your/browser_mcp.json"
๐ง Usage
Start the Assistant:
python shopping_assistant.py
Example Queries:
๐ You: Best laptop for programming under $1000
๐ค Assistant: ๐ Searching... (attempt 1/3)
โ
Successfully retrieved current information
[Laptop recommendations with specs and prices]
Commands You Can Use:
exitorquitโ End the sessionclearโ Reset chat historycontextโ View recent conversation summarystatusโ Check last search time and rate limits
๐๏ธ Project Structure
ai-shopping-assistant/
โโโ shopping_assistant.py # Main assistant logic
โโโ requirements.txt # Python dependencies
โโโ .env # Environment variables
โโโ browser_mcp.json # MCP config for search engines
โโโ README.md # You're reading it!
๐ฆ Requirements
Add the following to your requirements.txt:
langchain-grok==0.1.0
python-dotenv==1.0.0
requests==2.31.0
mcp-use==<latest-version>
โ๏ธ Configuration Details
| Setting | Description |
|---|---|
| ๐ GROQ_API_KEY | Set in .env for xAIโs Grok access |
| ๐ Rate Limiting | 3-second delay between API searches |
| ๐ Retries | Up to 3 search retries with 5s backoff |
| ๐ MCP File | JSON config for search integration |
| ๐ฆ Model | Default: qwen-qwq-32b (Grok model) |
| ๐๏ธ Categories | Electronics, appliances, services, clothing, home |
โ ๏ธ Limitations
- Requires internet connection for API and MCP search
- Prices may varyโverify with retailers
- Only predefined categories supported
- MCP setup requires proper Node.js configuration
- Offline fallbacks may offer limited depth
๐ฎ Future Enhancements
- ๐ Real-time price scraping from major e-retailers
- ๐งฌ Personalized recommendations via user profiles
- ๐ฅ๏ธ Web-based UI for a seamless UX
- ๐ ๏ธ Enhanced MCP integration with more shopping portals
๐ค Contributing
Contributions are welcome! To contribute:
-
Fork the repository
-
Create your feature branch
git checkout -b feature/your-feature -
Commit your changes
git commit -m "Add your feature" -
Push and open a PR
git push origin feature/your-feature
Images:
1:
2:
3:
4:
5:
6: 
๐ง AI + Shopping = Smarter Choices Start your intelligent shopping journey now with the AI Shopping Assistant.
Related Servers
Bright Data
sponsorDiscover, extract, and interact with the web - one interface powering automated access across the public internet.
MCP Webscan Server
Fetch, analyze, and extract information from web pages.
ScreenshotOne
Render website screenshots with ScreenshotOne
Firecrawl MCP
Adds powerful web scraping and search capabilities to LLM clients like Cursor and Claude.
https://prowldata.dev/mcp
Real-world intelligence for AI agents via x402 micropayments. Prediction markets, economics, weather, narrative, and geopolitics.
Intercept
Give your AI the ability to read the web. Fetches URLs as clean markdown with 9 fallback strategies. Handles tweets, YouTube, arXiv, PDFs, and regular pages.
Xiaohongshu Search & Comment
An automated tool to search notes, retrieve content, and post comments on Xiaohongshu (RedBook) using Playwright.
Firecrawl
Scrape, crawl, and extract data from any website using the Firecrawl API.
YouTube Transcript
A zero-setup server to extract transcripts from YouTube videos on any platform.
Markdown Downloader
Download webpages as markdown files using the r.jina.ai service, with configurable directories and persistent settings.
Google Flights
An MCP server to interact with Google Flights data for finding flight information.