Amazon Product Analysis MCP Server
A production-ready Model Context Protocol (MCP) server for Amazon product analysis, built with mcp-use and powered by Bright Data for Web MCP tool. This server provides an interactive tool and beautiful React widget for analyzing Amazon products with comprehensive insights including pricing, features, specifications, delivery options, and customer reviews.
🚀 Built with mcp-use
This MCP server is powered by mcp-use, a modern framework for building MCP servers with:
- Type-safe server creation - Build MCP servers with full TypeScript support
- React widget support - Create interactive UI components using the OpenAI Apps SDK
- Simplified client connections - Easily connect to other MCP servers
- Built-in development tools - Hot reload, build, and deploy commands
- Zero boilerplate - Focus on your tools, not infrastructure
Features
- 🛒 Amazon Product Analysis - Extract comprehensive product data from any Amazon URL
- 🎨 Interactive Widget - Beautiful React widget for displaying product insights
- 📊 Rich Data Extraction - Pricing, features, specifications, delivery, reviews, and seller info
Prerequisites
- A Bright Data account (sign up here)
- An OpenAI API key (get one here)
Installation
# Install dependencies
yarn install
# or
npm install
Configuration
- Copy the environment example file:
cp .env.example .env
- Set the following required environment variables:
# Required: Your Bright Data API Key
BRIGHTDATA_API_KEY=your_brightdata_api_key_here
# Required: Your OpenAI API Key
# Get from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_openai_api_key_here
Development
mcp-use provides convenient development commands:
# Start development server with hot reload
yarn dev
# or
npm run dev
# Build for production
yarn build
# or
npm run build
# Start production server
yarn start
# or
npm start
# Deploy the server
yarn deploy
# or
npm run deploy
The development server starts:
- MCP server on port 3000
- Widget serving at
/mcp-use/widgets/* - Inspector UI at
/inspector
Available Tools
amazon-product-analysis
Analyze any Amazon product URL. Opens an interactive widget displaying comprehensive product insights.
Parameters:
url(required): Amazon product URL (must contain valid full URL of the product page)zipcode(optional): ZIP code for location-specific pricing and delivery
Widget: amazon-product-analysis - Interactive product analysis display
Returns: Structured product data including:
- Product info (title, image, price, rating, reviews)
- Pricing breakdown (original price, discount, savings)
- Product features
- Specifications
- Delivery options
- Seller information
- Customer reviews summary
- Category rankings
UI Widgets
This server includes a custom React widget built with mcp-use:
Amazon Product Analysis (amazon-product-analysis)
An interactive widget for displaying product insights:
- Product Card - Title, image, price, and star rating
- Image Gallery - Zoomable carousel with thumbnails
- Pricing Deal - Original price, discount percentage, savings
- Features List - Key product features
- Delivery Info - Standard and fast shipping options
- Seller Info - Seller name, rankings, categories
- Customer Reviews - Review summary and top review
- Product Specs - Technical specifications table
The widget is built with:
- React 19
- Tailwind CSS
- TanStack Query
- Zod validation
- OpenAI Apps SDK hooks
Architecture
This server demonstrates the power of mcp-use:
- Server-side: Uses
mcp-use/serverto create tools and widgets - Client-side: Uses
mcp-use/reactfor widget hooks - Type-safe: Full TypeScript support with Zod schemas
- Bright Data Integration: Amazon product scraping via Bright Data SDK
- OpenAI Integration: GPT-4o for intelligent data extraction
Data Flow
User → ChatGPT → MCP Server → amazon-product-analysis tool
↓
Bright Data SDK
↓
Amazon Website
↓
GPT-4o Data Extraction
↓
Widget Display
↓
Product Insights UI
Project Structure
amazon-product-analysis-server/
├── index.ts # Main server file with API endpoints
├── resources/
│ └── amazon-product-analysis/
│ ├── widget.tsx # Main widget component
│ ├── types.ts # Zod schemas and TypeScript types
│ ├── server.ts # Server-side analysis logic
│ ├── brightdata-tools.ts # Bright Data integration
│ ├── utils.ts # Utility functions (image proxy)
│ ├── hooks/
│ │ └── useProductAnalysis.ts # React Query hook
│ └── components/
│ ├── ProductCard.tsx # Product display
│ ├── ImageGallery.tsx # Image carousel
│ ├── PricingDeal.tsx # Price info
│ ├── Features.tsx # Features list
│ ├── DeliveryInfo.tsx # Shipping options
│ ├── SellerInfo.tsx # Seller details
│ ├── CustomerReviews.tsx # Reviews summary
│ └── ProductSpecs.tsx # Specifications
├── package.json # Dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Deployment
mcp-use Cloud
# Install the CLI (if not already done)
npm install -g @mcp-use/cli
# Login to mcp-use cloud
npm run mcp-use login
# Deploy your server
npm run mcp-use deploy
Other Platforms
The server can be deployed to any Node.js hosting platform:
- Vercel
- Railway
- Render
- Fly.io
- AWS Lambda (with adapter)
- Google Cloud Run
Make sure to set the MCP_URL environment variable to your production URL.
Usage in ChatGPT
- Deploy your application and get the MCP endpoint URL (e.g.,
https://your-app.vercel.app/mcp) - In ChatGPT, go to
Apps & Connectors→Advanced Settingsand enable developer mode - Create Connector:
- Go to
Apps & Connectorsand clickCreate - Enter a name for your connector
- Enter your MCP server URL
- Select
No Authentication(or configure auth if needed) - Accept the terms and conditions
- Click
Create
- Go to
- Create a new chat and use the
/command to access the connector - Try: "Analyze this Amazon product: https://www.amazon.in/iPhone-Pro-Max-512-Promotion/dp/B0FQG8XCJ1?ref_=ast_sto_dp"
Troubleshooting
Products not analyzing
- Check your
BRIGHTDATA_API_KEYis set correctly - Verify the Amazon URL contains valid full URL of the product page
- Ensure your Bright Data account has credits
- Check browser console for errors
Images not loading
- Images are proxied through
/api/image-proxyto bypass CORS - Check that the image proxy endpoint is accessible
Widget not displaying
- Verify server is running (
npm run dev) - Check that widget is built (
npm run build) - Ensure
widgetMetadatais exported - Check browser console for errors
Learn More
📬 Stay Updated with Our Newsletter!
Get a FREE Data Science eBook 📖 with 150+ essential lessons in Data Science when you subscribe to our newsletter! Stay in the loop with the latest tutorials, insights, and exclusive resources. Subscribe now!
Contribution
Contributions are welcome! Please fork the repository and submit a pull request with your improvements.
