MA

mansournorouzi/amazon-sp-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

52 stars 8 forks 质量 73 趋势 14

mansournorouzi/amazon-sp-mcp 是从 https://github.com/mansournorouzi/amazon-sp-mcp. 导入的 MCP 服务器候选服务器。

概览

mansournorouzi/amazon-sp-mcp 是从 https://github.com/mansournorouzi/amazon-sp-mcp. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,通过SP-API将Claude与亚马逊卖家中心连接。支持销售数据、库存、报告、费用、报销和分析的自然语言查询。

安全通知(2026年3月31日): axios npm包曾短暂在一次供应链攻击中被攻破。恶意版本[1.14.1和0.30.4于3月31日00:21至03:15 UTC间发布,随后npm将其移除。这些版本包含一个木马化依赖(plain-crypto-js),安装了远程访问木马。**本仓库的Axios依赖已被钉定为1.14.0(最后一个干净版本)。**如果您在攻击窗口运行了npm install],请删除您的node_modules文件夹并重新安装。参见:Snyk警示,Datadog分析。

关键功能:无需AWS凭证

截至2023年10月,Amazon SP-API 不再需要 AWS IAM 凭证。该服务器仅支持 LWA(与亚马逊登录)OAuth 2.0,使设置更简单且更安全。

特色

核心行动

  • 订单:获取订单、订单详情及商品
  • 库存:FBA库存摘要及详细健康指标

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Amazon SP-API MCP Server

A Model Context Protocol (MCP) server that connects Claude to Amazon Seller Central via the SP-API. Enables natural language queries for sales data, inventory, reports, fees, reimbursements, and analytics.

Security Notice (March 31, 2026): The axios npm package was briefly compromised in a supply chain attack. Malicious versions 1.14.1 and 0.30.4 were published between 00:21 and 03:15 UTC on March 31 before npm removed them. These versions contained a trojanized dependency (plain-crypto-js) that installed a remote access trojan. This repo’s axios dependency has been pinned to 1.14.0 (the last clean version). If you ran npm install during the attack window, delete your node_modules folder and reinstall. See: Snyk advisory, Datadog analysis.

Key Feature: No AWS Credentials Required

As of October 2023, Amazon SP-API no longer requires AWS IAM credentials. This server uses LWA (Login with Amazon) OAuth 2.0 only, making setup simpler and more secure.

Features

Core Operations

  • Orders: Get orders, order details, and order items
  • Inventory: FBA inventory summary and detailed health metrics
  • Sales: Sales metrics by day/week/month with totals and averages

Financial Reports

  • Reimbursements: FBA reimbursements for lost/damaged inventory
  • Settlements: Payment disbursement details and breakdowns
  • Fee Estimates: Per-SKU FBA fee estimates
  • Storage Fees: Monthly storage charges
  • Long-term Storage Fees: LTSF for aged inventory

Analytics

  • Sales & Traffic: Sessions, page views, conversion rates, buy box %
  • Search Terms: Brand Analytics search term performance (requires Brand Registry)
  • Inventory Ledger: Track inventory movements and adjustments

Prerequisites

  • Node.js 18+
  • Amazon Seller Central account
  • SP-API application registered in Developer Central
  • LWA credentials (Client ID, Client Secret, Refresh Token)

Installation

git clone https://github.com/mansournorouzi/amazon-sp-mcp.git
cd amazon-sp-mcp
npm install
npm run build

Configuration

Create a .env file with your credentials:

# Copy the example
cp .env.example .env

Required environment variables:

# Login with Amazon (LWA) OAuth 2.0 Credentials
LWA_CLIENT_ID=amzn1.application-oa2-client.xxxxx
LWA_CLIENT_SECRET=your_lwa_client_secret
LWA_REFRESH_TOKEN=Atzr|your_refresh_token

# Seller Information
SELLER_ID=your_seller_id
MARKETPLACE_ID=ATVPDKIKX0DER

# SP-API Endpoint (optional, defaults to North America)
SP_API_ENDPOINT=https://sellingpartnerapi-na.amazon.com

Marketplace IDs

Region Marketplace ID
US Amazon.com ATVPDKIKX0DER
CA Amazon.ca A2EUQ1WTGCTBG2
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "amazon-seller": { "command": "node", "args": ["/path/to/amazon-sp-mcp/build/index.js"], "env": { "LWA_CLIENT_ID": "amzn1.application-oa2-client.xxxxx", "LWA_CLIENT_SECRET": "your_secret", "LWA_REFRESH_TOKEN": "Atzr|your_token", "SELLER_ID": "your_seller_id", "MARKETPLACE_ID": "ATVPDKIKX0DER", "SP_API_ENDPOINT": "https://sellingpartnerapi-na.amazon.com" } } } }