Amazon Product Intelligence Agent
An autonomous Model Context Protocol (MCP) server that scrapes Amazon product details and reviews, manages local JSON database storage, and visualizes intelligence data using a rich Prefab UI dashboard.
Features
- Asynchronous Scraping: Uses
httpxandBeautifulSoup4to concurrently fetch product metadata (price, title, review count, average rating) and top customer reviews from Amazon. - Local Persistence: Provides full CRUD operations for managing product intelligence data in a local JSON database.
- Rich Dashboard: Generates a beautiful Prefab UI dashboard to visualize the gathered intelligence.
- MCP Standard: Fully compatible with any Model Context Protocol client using
fastmcp.
Prerequisites
- Python 3.12+ (64-bit recommended)
- Node.js (for the MCP Inspector)
Installation
Local Setup
- Clone or download the repository.
- Open a terminal in the project directory.
- Create and activate a virtual environment:
python -m venv venv source venv/Scripts/activate # On Windows Git Bash # OR: .\venv\Scripts\activate # On Windows PowerShell - Install dependencies:
pip install -r requirements.txt
Online Setup (Replit / GitHub Codespaces)
If you cannot install the dependencies locally, you can use a cloud IDE:
- Upload the files to Replit or a GitHub Codespace.
- Run the installation command in the provided terminal:
pip install -r requirements.txt.
Usage & Testing
The easiest way to test the agent's capabilities is using the official MCP Inspector.
- Start the inspector:
npx @modelcontextprotocol/inspector python server.py - Open the provided localhost URL in your browser.
- Navigate to the Tools tab to test the following functions:
fetch_amazon_product: Use an ASIN (likeB08N5WRWNW) to scrape data.manage_product_database: Save the scraped JSON data to your local database.show_product_dashboard: View the generated UI for your saved ASIN.
ASIN is B0821PN8L4
Integrating with an LLM Client
Add the server to your MCP-compatible client (e.g., Claude Desktop) configuration:
{
"mcpServers": {
"amazon-intelligence": {
"command": "python",
"args": ["/absolute/path/to/server.py"]
}
}
}