Get the FREE Ultimate OpenClaw Setup Guide →

amazon

MCP server for your Amazon cart. Made for Poke.com but works for everyone.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio meimakes-amazon-mcp-server node /absolute/path/to/amazon-mcp-server/dist/server.js \
  --env PORT="3000" \
  --env HEADLESS="false" \
  --env AUTH_TOKEN="your-token-here" \
  --env AMAZON_DOMAIN="amazon.com" \
  --env USER_DATA_DIR="./user-data"

How to use

This Amazon Cart MCP Server exposes tools that let an AI assistant interact with your personal Amazon cart via browser automation. It supports searching for products, adding items to your cart, viewing the cart contents, and checking login status. The server is designed to be used with MCP-compatible clients such as Poke and Claude Desktop, and can be exposed securely through ngrok. After starting, clients can connect to the /sse endpoint to exchange structured MCP actions and responses. Use the provided tools in Poke to query, add items, or verify login before attempting cart operations.

How to install

Prerequisites:

  • Node.js v20 or higher
  • npm or yarn
  • ngrok account (free tier works)

Installation steps:

  1. Clone the repository: git clone https://github.com/meimakes/amazon-mcp-server.git cd amazon-mcp-server

  2. Install dependencies: npm install

  3. Configure environment: cp .env .env.local # Optional: keep your settings separate Edit .env and set:

    • AUTH_TOKEN: generate a secure token (required)
    • HEADLESS: false for first-time login
    • AMAZON_DOMAIN: amazon.com (or your locale domain)
    • PORT: 3000 (or your preferred port)
    • USER_DATA_DIR: ./user-data (Chrome session data)
  4. Build the project: npm run build

  5. Start the server: npm start

  6. Enable ngrok tunneling (in a separate terminal): npm run tunnel

    Note the HTTPS URL (e.g., https://abc123.ngrok.io)

  7. Connect clients (Poke or Claude Desktop) using the exposed /sse endpoint and the AUTH_TOKEN for authentication.

Additional notes

Tips and troubleshooting:

  • Ensure AUTH_TOKEN is kept secret and rotated periodically.
  • The server uses Puppeteer to automate a Chrome session; HEADLESS=false is needed for the initial manual login to save a session in ./user-data.
  • Expose the server securely with ngrok or other tunneling; always use HTTPS endpoints when exposed publicly.
  • If tools aren’t visible in Poke, restart the server, verify the ngrok tunnel is active, and check server logs for tool discovery events.
  • Environment variables are defined in .env; never commit this file to version control.
  • The /sse endpoint is the primary communication channel for MCP interactions.
  • For Claude Desktop integration, you may need to point to the dist/server.js with proper environment variables set for HEADLESS and AMAZON_DOMAIN.

Related MCP Servers

Sponsor this space

Reach thousands of developers