Shopping_Agent_Using_MCP_Server
An intelligent, conversational shopping assistant built to revolutionize the online shopping experience. Powered by the Groq AI model and seamlessly integrated with the Model Context Protocol (MCP), this assistant offers smart, multi-context product discovery tailored to your needs. It engages in natural, context-aware conversations to help you
Documentation
🛍️ 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
cd ai-shopping-assistant2. Set Up a Virtual Environment (Optional)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate3. Install Python Dependencies
pip install -r requirements.txt4. Install MCP Node.js Dependencies
Make sure Node.js and npm are installed:
npm install -g @playwright/mcp @openbnb/mcp-server-airbnb duckduckgo-mcp-server5. Environment Setup
Create a `.env` file in the root directory:
echo "GROQ_API_KEY=your-api-key-here" > .env6. 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.pyExample 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:
- `exit` or `quit` – End the session
- `clear` – Reset chat history
- `context` – View recent conversation summary
- `status` – 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==⚙️ 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:
1. Fork the repository
2. Create your feature branch
git checkout -b feature/your-feature3. Commit your changes
git commit -m "Add your feature"4. Push and open a PR
git push origin feature/your-featureImages:
> 🧠 AI + Shopping = Smarter Choices
> Start your intelligent shopping journey now with the AI Shopping Assistant.
Frequently asked questions
What is Shopping_Agent_Using_MCP_Server?
Shopping_Agent_Using_MCP_Server is An intelligent, conversational shopping assistant built to revolutionize the online shopping experience. Powered by the Groq AI model and seamlessly integrated with the Model Context Protocol (MCP), this assistant offers smart, multi-context product discovery tailored to your needs. It engages in natural, context-aware conversations to help you
How do I install Shopping_Agent_Using_MCP_Server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is Shopping_Agent_Using_MCP_Server open source?
Yes — it is hosted on GitHub at https://github.com/sakshirajeshirke/Shopping_Agent_Using_MCP_Server and has 2 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP