mcp-amazon-sp-api
MCP server that exposes the Amazon Selling Partner API to Claude Desktop and any other MCP client. It wraps the python-amazon-sp-api SDK and ships 55+ tools across 19 SP-API scopes with automatic pagination, throttle-aware retry and multi-marketplace support.
README
mcp-amazon-sp-api
MCP server that exposes the Amazon Selling Partner API to Claude Desktop and any other client that speaks the Model Context Protocol.
It wraps the python-amazon-sp-api SDK and ships 55+ tools across 19 SP-API scopes — catalog, orders, listings, reports, inventory, pricing, A+ content, feeds, fulfillment, messaging and more — with automatic pagination, throttle-aware retry and multi-marketplace support.
Status: production-ready, used daily against the live SP-API. ~400 unit and integration tests, ~95% coverage.
Features
- 55+ MCP tools covering 19 SP-API scopes (see Tool catalogue).
- Multi-marketplace. Every tool accepts a
marketplaceparameter (ES,DE,FR,IT,GB,NL,BE,PL,SE,IE,US,AE,SA). When omitted, falls back toSP_API_MARKETPLACEfrom.env. - Safe writes. Mutating tools require
confirm=True; without it they return a detailed plan preview so the agent can show the user what would happen. - Automatic pagination on inventory, listings, finances, orders and catalog endpoints.
- Throttle-aware retry with exponential backoff for all SP-API calls.
- Reports pipeline (create → poll → download → parse) for Brand Analytics, FBA reports and Sales & Traffic.
- Bulk updates via
JSON_LISTINGS_FEEDfor price/inventory. - Credential resolution order: environment variables → macOS Keychain →
.env.
Requirements
- Python ≥ 3.12
uv(recommended) or any PEP 517 installer- Amazon SP-API developer credentials (LWA app + refresh token)
Installation
git clone https://github.com/christian-ramos/mcp-amazon-sp-api.git
cd mcp-amazon-sp-api
uv sync
uv sync will create .venv/ and install the runtime dependencies declared in pyproject.toml. For development extras (pytest, ruff):
uv sync --group dev
Configuration
Copy .env.example to .env and fill in your credentials:
cp .env.example .env
SP_API_REFRESH_TOKEN=Atzr|...
LWA_APP_ID=amzn1.application-oa2-client...
LWA_CLIENT_SECRET=...
SP_API_SELLER_ID=...
SP_API_MARKETPLACE=ES
To obtain these:
- In Seller Central, go to Apps & Services → Develop Apps.
- Create (or open) your SP-API application and authorize it for your seller account.
- Note the LWA client ID and LWA client secret.
- Generate a refresh token by self-authorizing the app for your seller account.
- Copy your Seller ID from Settings → Account Info → Your Merchant Token.
Storing credentials in macOS Keychain (optional)
If you prefer not to keep secrets on disk, store them in the Keychain — the server will pick them up automatically:
security add-generic-password -s mcp-amazon-sp-api -a SP_API_REFRESH_TOKEN -w 'Atzr|...'
security add-generic-password -s mcp-amazon-sp-api -a LWA_APP_ID -w 'amzn1.application-oa2-client...'
security add-generic-password -s mcp-amazon-sp-api -a LWA_CLIENT_SECRET -w '...'
Resolution order is: environment variables → Keychain → .env.
Running
As a Claude Desktop MCP server
Add the following to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform:
{
"mcpServers": {
"amazon-sp-api": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/mcp-amazon-sp-api",
"run", "mcp-amazon-sp-api"
]
}
}
}
Restart Claude Desktop. The 55+ tools will appear under the amazon-sp-api server.
Standalone (for debugging)
uv run mcp-amazon-sp-api
This speaks MCP over stdio; you will need an MCP client on the other end (the MCP Inspector is great for this).
Tool catalogue
Tools are grouped by scope. See src/mcp_amazon_sp_api/tool_docs.py for the full per-tool documentation that Claude reads at runtime via the tool-docs:// MCP resource.
| Scope | Tools |
|---|---|
| Catalog & Orders | list_products, get_product_details, get_orders, get_order_items |
| Analytics | get_sales_summary, get_returns_summary, get_order_finances, estimate_fees, get_profitability_report, get_sales_rankings |
| Listings | get_listing_content, list_my_listings, get_listing_issues, get_product_type_info, update_listing_attribute, update_listing_batch |
| Reports infra | request_report, check_report, download_report |
| Brand Analytics | get_search_terms, get_search_performance, get_market_basket, get_repeat_purchases |
| FBA Reports | get_fba_inventory, get_fba_returns, get_fba_fees_report, get_restock_suggestions |
| Sales & Traffic | get_sales_and_traffic |
| Inventory (realtime) | get_inventory |
| Pricing | get_competitive_pricing, get_competitor_offers |
| A+ Content | list_aplus_content, get_aplus_content, get_aplus_asin_relations |
| Pricing cross-marketplace | get_cross_marketplace_prices, update_marketplace_price, sync_marketplace_prices |
| Competitor analysis | analyze_competitor_prices, compare_with_competitors |
| Listings restrictions | check_listing_restrictions, check_expansion_eligibility |
| Feeds | bulk_update_prices, check_feed |
| Fulfillment inbound | list_fba_shipments, get_fba_shipment_items, get_inbound_guidance |
| Messaging | get_messaging_options, send_buyer_message |
| Solicitations | check_review_eligibility, request_review |
| Invoices | get_invoices, download_invoice |
| Sales API | get_order_metrics |
Development
uv sync --group dev # install with dev deps
uv run pytest tests/unit # unit tests (no SP-API credentials needed)
uv run pytest -m integration # integration tests (require live credentials)
uv run ruff check . # lint
Project layout:
src/mcp_amazon_sp_api/
├── server.py # FastMCP entry point — registers all tool packages
├── config.py # Credentials resolution and marketplace map
├── sp_client.py # Re-export of clients/
├── clients/ # One module per SP-API scope (BaseClient + mixins)
├── tools/ # MCP tool implementations, grouped by scope
└── tool_docs.py # Per-tool detailed docs exposed via tool-docs:// resource
See ROADMAP.md for the implementation history and per-phase scope.
Security notes
- This server holds production seller credentials with full SP-API access. Treat
.envlike a password file — never commit it. - Write tools (
update_listing_attribute,update_listing_batch,update_marketplace_price,sync_marketplace_prices,bulk_update_prices,send_buyer_message,request_review) requireconfirm=True. Without confirmation they return a plan preview rather than executing. - All requests honour SP-API rate limits via throttle-aware retry.
Disclaimer
This project is not affiliated with, endorsed by, or supported by Amazon.com, Inc. Trademarks belong to their respective owners.
License
MIT © Christian Ramos
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。