Labsco
jademind logo

Amazon Product Advertising API

from jademind

Integrate with the Amazon Product Advertising API to search for products and access product information.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

Amazon PA-API MCP Service

A Model Context Protocol (MCP) service for Amazon Product Advertising API integration. This project uses the Python SDK officially provided at Product Advertising API 5.0.

PyPI - Downloads

Integration in Claude & Cursor

For configuring host, region and markeplace, consult the Locale Reference for Product Advertising API documentation.

{
  "mcpServers": {
    "amazon-paapi": {
      "command": "uvx",
      "args": [
        "mcp-amazon-paapi"
      ],
      "env": {
        "PAAPI_ACCESS_KEY": "your-access-key",
        "PAAPI_SECRET_KEY": "your-secret-key",
        "PAAPI_PARTNER_TAG": "your-partner-tag",
        "PAAPI_HOST": "webservices.amazon.de",  // select EU or US servers and region
        "PAAPI_REGION": "eu-west-1",
        "PAAPI_MARKETPLACE": "www.amazon.de" // set your preferred marketplace
      }
    }
  }
}

Project Structure

mcp-amazon-paapi/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ mcp_amazon_paapi/           # Main package
โ”‚       โ”œโ”€โ”€ __init__.py             # Package initialization
โ”‚       โ”œโ”€โ”€ service.py              # Amazon PA-API service class with dependency injection
โ”‚       โ”œโ”€โ”€ server.py               # FastMCP server implementation
โ”‚       โ””โ”€โ”€ _vendor/                # Vendored dependencies
โ”‚           โ””โ”€โ”€ paapi5_python_sdk/  # Amazon PA-API Python SDK
โ”œโ”€โ”€ test/                           # Test suite
โ”‚   โ”œโ”€โ”€ __init__.py                 # Test package initialization
โ”‚   โ””โ”€โ”€ test_service.py             # Tests for service module
โ”œโ”€โ”€ pyproject.toml                  # Project configuration and dependencies
โ”œโ”€โ”€ uv.lock                         # Dependency lock file
โ”œโ”€โ”€ README.md                       # Project documentation

Environment Variables

export PAAPI_ACCESS_KEY="your-access-key"
export PAAPI_SECRET_KEY="your-secret-key"
export PAAPI_PARTNER_TAG="your-partner-tag"
export PAAPI_HOST="webservices.amazon.de"       # optional defaults to webservices.amazon.de
export PAAPI_REGION="eu-west-1"                 # optional defaults to eu-west-1
export PAAPI_MARKETPLACE="www.amazon.de"        # optional, defaults to www.amazon.de

Testing

Run the simple test suite:

# Run all tests with uv (recommended)
uv run python -m pytest test/test_service.py -v

# Or if you have activated the virtual environment
pytest test/test_service.py -v

The test suite includes:

  • Service initialization tests
  • Configuration management tests
  • Search functionality tests with mocking
  • Error handling tests