A Model Context Protocol (MCP) service for Amazon Product Advertising API integration.
Project description
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.
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
Local Setup
Initial Setup
# Sync dependencies from uv.lock (creates virtual environment automatically)
uv sync
# Alternatively, activate the virtual environment manually
source .venv/bin/activate # Linux/Mac
# or
.venv\Scripts\activate # Windows
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
Usage
from service import AmazonPAAPIService
# Create service (uses environment variables)
service = AmazonPAAPIService()
# Search for items
items = service.search_items("echo dot", "Electronics", 5)
Running the MCP Server
# Run directly with uv (recommended)
uv run python server.py
# Or if you have activated the virtual environment
python server.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_amazon_paapi-0.4.0.tar.gz.
File metadata
- Download URL: mcp_amazon_paapi-0.4.0.tar.gz
- Upload date:
- Size: 65.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3316d7665833bcf2656373bf20af7f69d11ac55b64fc00247390bda57d35f364
|
|
| MD5 |
f8ed07794d6d5d0296e1e3c23c4756bc
|
|
| BLAKE2b-256 |
a39f8c95505211125ca19ad497d7c445907024ca228da84ebbce83fa9411b233
|
Provenance
The following attestation bundles were made for mcp_amazon_paapi-0.4.0.tar.gz:
Publisher:
python-publish.yml on jademind/mcp-amazon-paapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_amazon_paapi-0.4.0.tar.gz -
Subject digest:
3316d7665833bcf2656373bf20af7f69d11ac55b64fc00247390bda57d35f364 - Sigstore transparency entry: 245888984
- Sigstore integration time:
-
Permalink:
jademind/mcp-amazon-paapi@7def16b6fc3d2005b8591ec941c6813eaaea041b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/jademind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7def16b6fc3d2005b8591ec941c6813eaaea041b -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_amazon_paapi-0.4.0-py3-none-any.whl.
File metadata
- Download URL: mcp_amazon_paapi-0.4.0-py3-none-any.whl
- Upload date:
- Size: 218.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1d2e3a181e510a28770b53f0094ada2e2702af46bbaed3bcfb88cdef3b67d9d
|
|
| MD5 |
16534d7d509200fa0dbc8b2612f25530
|
|
| BLAKE2b-256 |
3eb0645271b9f378dc296d2c4d7fef1293eec9d1f4d7022821248fdfe04d3c49
|
Provenance
The following attestation bundles were made for mcp_amazon_paapi-0.4.0-py3-none-any.whl:
Publisher:
python-publish.yml on jademind/mcp-amazon-paapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_amazon_paapi-0.4.0-py3-none-any.whl -
Subject digest:
f1d2e3a181e510a28770b53f0094ada2e2702af46bbaed3bcfb88cdef3b67d9d - Sigstore transparency entry: 245888985
- Sigstore integration time:
-
Permalink:
jademind/mcp-amazon-paapi@7def16b6fc3d2005b8591ec941c6813eaaea041b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/jademind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7def16b6fc3d2005b8591ec941c6813eaaea041b -
Trigger Event:
release
-
Statement type: