Amazon Product Search MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "HF_API_TOKEN=${HF_API_TOKEN}" -e "x-rapidapi-key=${x-rapidapi-key}" amazon-product-search -- python "<FULL_PATH_TO_SHOPASSIST_MCP>/dist/index.js"

Replace <FULL_PATH_TO_SHOPASSIST_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:HF_API_TOKENx-rapidapi-key
README.md

AI-powered Amazon product search and recommendations using FastMCP

Amazon Product Search MCP Server

The site is live here ! : https://shopassist-sharavana.streamlit.app/

An MCP (Model Context Protocol) server that provides AI-powered Amazon product search and recommendations using FastMCP.

Features

  • šŸ” Smart product search with Amazon API
  • šŸ¤– AI-powered product recommendations using Hugging Face
  • šŸ’° Price range filtering
  • šŸ“‹ Feature-based matching
  • šŸŽÆ Tailored recommendations for Small/Medium Enterprises

Installation

  1. Clone this repository and navigate to the project directory
  2. Install dependencies:
    # Using uv (recommended)
    uv sync
    
    # Or using pip
    pip install -r requirements.txt
    

Server Setup

Running the MCP Server

# Activate your virtual environment
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Run the server
python main.py

The server exposes one main tool:

  • getdata: Search Amazon products with AI recommendations

Client Options

We provide multiple client implementations to interact with your MCP server:

1. Python Interactive Client (`client.py`)

A full-featured Python client with examples and interactive mode.

python client.py

Features:

  • Pre-built examples (laptops, smartphones)
  • Interactive search mode
  • Real-time communication with MCP server

2. Command Line Interface (`cli_client.py`)

Quick command-line searches for automation and scripting.

# Basic search
python cli_client.py "laptop"

# With features and price range
python cli_client.py "laptop" --features "8GB RAM, SSD storage" --min-price 30000 --max-price 80000

# Smartphone search
python cli_client.py "smartphone" --features "good camera, 5G" --min-price 15000 --max-price 50000

Arguments:

  • product: Product to search for (required)
  • --features, -f: Specific features to look for
  • --min-price, -min: Minimum price in rupees
  • --max-price, -max: Maximum price in rupees

3. Web Interface (`web_client.py`)

A beautiful web interface with REST API backend.

# Install additional dependencies
pip install fastapi uvicorn

# Run the web server
python web_client.py

Then open http://localhost:8000 in your browser for a user-friendly interface.

API Endpoints:

  • GET /: Web interface
  • POST /search: REST API for product search
  • GET /health: Health check

4. MCP CLI Integration

You can also use the MCP CLI to interact with your server:

# Install MCP CLI if not already installed
pip install mcp

# Connect to your server
mcp connect stdio -- python main.py

Usage Examples

Example 1: Laptop Search

{
    "product": "laptop",
    "specific_features": "8GB RAM, SSD storage, good for programming",
    "min_price": 30000,
    "max_price": 80000
}

Example 2: Smartphone Search

{
    "product": "smartphone",
    "specific_features": "good camera, long battery life, 5G support",
    "min_price": 15000,
    "max_price": 50000
}

Example 3: Budget Headphones

{
    "product": "wireless headphones",
    "specific_features": "noise cancellation, comfortable",
    "min_price": 1000,
    "max_price": 5000
}

Configuration

API Keys Required

Make sure you have:

  1. Hugging Face API Token: Update HF_API_TOKEN in server/buy.py
  2. RapidAPI Key: Update the x-rapidapi-key in server/buy.py

Customization

You can customize the AI recommendation prompt in the decision_agent function in server/buy.py.

Integration with Claude Desktop

To use this MCP server with Claude Desktop, add this configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "amazon-search": {
      "command": "python",
      "args": ["path/to/your/main.py"],
      "env": {}
    }
  }
}

Troubleshooting

Common Issues

  1. Import errors: Make sure you're in the correct virtual environment
  2. API failures: Check your API keys and internet connection
  3. Connection issues: Ensure the MCP server is running before starting clients

Error Messages

  • "No result": Usually indicates API issues or no products found
  • "Connection refused": MCP server is not running
  • "Tool not found": Server initialization issue

Development

Adding New Features

  1. Add new tools in server/buy.py using the @mcp.tool() decorator
  2. Update client code to use new tools
  3. Test with the interactive client first

Testing

# Test the server directly
python -c "from server.buy import mcp; print('Server loads successfully')"

# Test with the interactive client
python client.py

Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   MCP Client    │◄──►│   MCP Server    │◄──►│  External APIs  │
│  (Your Choice)  │    │   (FastMCP)     │    │ (Amazon/HF AI)  │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
       │                        │                        │
       ā–¼                        ā–¼

Tools (1)

getdataSearch Amazon products with AI recommendations

Environment Variables

HF_API_TOKENrequiredHugging Face API token for AI recommendations
x-rapidapi-keyrequiredRapidAPI key for Amazon product data access

Configuration

claude_desktop_config.json
{"mcpServers": {"amazon-search": {"command": "python", "args": ["path/to/your/main.py"]}}}

Try it

→Find me a laptop between 30000 and 80000 rupees that is good for programming with at least 8GB RAM.
→Search for smartphones with a good camera and 5G support in the 15000 to 50000 price range.
→Recommend some wireless headphones that feature noise cancellation and are comfortable, priced between 1000 and 5000 rupees.

Frequently Asked Questions

What are the key features of Amazon Product Search MCP?

Smart product search using Amazon API. AI-powered product recommendations via Hugging Face. Price range filtering for search results. Feature-based product matching. Tailored recommendations for Small/Medium Enterprises.

What can I use Amazon Product Search MCP for?

Automating product research for e-commerce price comparison. Assisting small business owners in finding equipment based on specific technical requirements. Building custom shopping assistants that filter by budget and feature sets.

How do I install Amazon Product Search MCP?

Install Amazon Product Search MCP by running: pip install -r requirements.txt

What MCP clients work with Amazon Product Search MCP?

Amazon Product Search MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Amazon Product Search MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare