Amazon SP-API MCP Server logo

Amazon SP-API MCP Server

Community
mansournorouzi

MCP server for Amazon SP-API — connect Claude to Seller Central for sales, inventory, orders, fees, and analytics. LWA-only auth, no AWS credentials required.

Publishermansournorouzi
Repositoryamazon-sp-mcp
LanguageTypeScript
Forks
8
Stars
47
Available tools
0
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    Amazon SP-API MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    47 stars and 8 forks from the linked repository.

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

bash
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:

bash
# Copy the example
cp .env.example .env

Required environment variables:

bash
# 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

RegionMarketplaceID
USAmazon.comATVPDKIKX0DER
CAAmazon.caA2EUQ1WTGCTBG2
MXAmazon.com.mxA1AM78C64UM0Y8
UKAmazon.co.ukA1F83G8C2ARO7P
DEAmazon.deA1PA6795UKMFR9
JPAmazon.co.jpA1VC38T7YXB528

SP-API Endpoints

Usage with Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{
  "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"
      }
    }
  }
}

Restart Claude Desktop after making changes.

Usage with Claude Code

Add .mcp.json to your project root:

json
{
  "mcpServers": {
    "amazon-seller": {
      "command": "node",
      "args": ["./build/index.js"],
      "env": {
        "LWA_CLIENT_ID": "${LWA_CLIENT_ID}",
        "LWA_CLIENT_SECRET": "${LWA_CLIENT_SECRET}",
        "LWA_REFRESH_TOKEN": "${LWA_REFRESH_TOKEN}",
        "SELLER_ID": "${SELLER_ID}",
        "MARKETPLACE_ID": "${MARKETPLACE_ID}",
        "SP_API_ENDPOINT": "${SP_API_ENDPOINT}"
      }
    }
  }
}

Available Tools

Orders

ToolDescription
get_ordersList orders by date range, status, fulfillment channel
get_order_detailsGet details for a specific order
get_order_itemsGet line items for an order

Inventory

ToolDescription
get_inventory_summaryFBA inventory levels and health
get_fba_inventory_detailsDetailed breakdown of reserved/unfulfillable quantities

Sales

ToolDescription
get_sales_metricsSales aggregates by day/week/month

Financial Reports

ToolDescription
get_fba_reimbursementsLost/damaged inventory reimbursements
get_settlement_reportPayment disbursement details
get_fba_fee_estimatesPer-SKU fee breakdown
get_storage_feesMonthly storage charges
get_longterm_storage_feesLTSF for aged inventory (365+ days)

Analytics

ToolDescription
get_sales_traffic_reportSessions, page views, conversion rates
get_search_terms_reportBrand Analytics search terms (Brand Registry required)
get_inventory_ledgerInventory movement summary

Example Queries

Once configured, you can ask Claude questions like:

  • "What were my sales last week?"
  • "Show me my FBA reimbursements for January"
  • "What's my current inventory health?"
  • "Pull my settlement report for the last payment"
  • "What are my storage fees by SKU?"
  • "Which products have the best conversion rate?"
  • "Show me my long-term storage fees"

Development

bash
# Build
npm run build

# Run in development mode
npm run dev

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Lint
npm run lint

# Format
npm run format

Architecture

src/
├── index.ts                    # MCP server entry point
├── config/
│   └── index.ts                # Configuration & validation
├── auth/
│   └── token-manager.ts        # LWA OAuth 2.0 token management
├── client/
│   ├── sp-api-client.ts        # HTTP client (no AWS signing!)
│   └── rate-limiter.ts         # SP-API rate limiting
├── tools/
│   ├── index.ts                # Tool registry
│   ├── orders.ts               # Orders API tools
│   ├── inventory.ts            # Inventory API tools
│   ├── sales.ts                # Sales API tools
│   └── reports/
│       ├── reimbursements.ts   # FBA reimbursements
│       ├── settlements.ts      # Settlement reports
│       ├── fees.ts             # Fee reports
│       └── analytics.ts        # Brand analytics
├── types/
│   └── sp-api.ts               # TypeScript definitions
└── utils/
    ├── csv-parser.ts           # Report CSV parsing
    └── report-poller.ts        # Async report polling

License

MIT

Resources

Installation

TypingMind
{
  "mcpServers": {
    "amazon-sp-mcp": {
      "command": "node",
      "args": [
        "/path/to/amazon-sp-mcp/build/index.js"
      ],
      "env": {
        "LWA_CLIENT_ID": "<LWA_CLIENT_ID>",
        "LWA_CLIENT_SECRET": "<LWA_CLIENT_SECRET>",
        "LWA_REFRESH_TOKEN": "<LWA_REFRESH_TOKEN>",
        "SELLER_ID": "<SELLER_ID>",
        "MARKETPLACE_ID": "<MARKETPLACE_ID>"
      }
    }
  }
}

Use Amazon SP-API MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Amazon SP-API MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Amazon SP-API MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Amazon SP-API MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "amazon-sp-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "amazon-sp-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Amazon SP-API MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Amazon SP-API MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Amazon SP-API MCP Server to help me with this task?
Amazon SP-API MCP Server
Sure. I read it.
Here is what I found using Amazon SP-API MCP Server.

Frequently asked questions

What is the Amazon SP-API MCP Server MCP server used for?

Amazon SP-API MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Amazon SP-API MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Amazon SP-API MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Amazon SP-API MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Amazon SP-API MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Amazon SP-API MCP Server MCP to TypingMind?

Amazon SP-API MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Amazon SP-API MCP Server MCP provide in TypingMind?

Amazon SP-API MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Amazon SP-API MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Amazon SP-API MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇