Skip to main content
Dev Sac
API

Amazon Creators API | TypeScript MCP Server

A TypeScript CLI and MCP server for the Amazon Creators API. 7 AI tools let Claude search products, fetch details, and generate affiliate links in seconds. 12 CLI commands, AES-256 encrypted credentials, built-in rate limiting, and only 3 production dependencies.

TypeScript Node.js MCP Server Zod Commander
Amazon Creators API | TypeScript MCP Server screenshot 1
Amazon Creators API | TypeScript MCP Server screenshot 2
0
API Operations
0
AI Tools
0
CLI Commands
0
Dependencies

The problem

Amazon’s product data is locked behind an API that fights you at every step. Authentication requires OAuth 2.0 token management. Responses come back as deeply nested JSON with inconsistent field structures across endpoints. Rate limits cap you at one request per second, and exceeding them gets your credentials throttled. I needed product data (prices, images, descriptions, affiliate links) for several Frog Stone Media content sites, and I was spending more time wrestling the API than building features.

This is the kind of problem that bespoke tooling solves. Instead of every project reimplementing the same authentication, caching, and error handling, I built one tool that handles all of it and exposes clean interfaces for every use case.

TYPESCRIPT CLI + MCP SERVER Amazon Creators API Bespoke AI Tooling for Product Intelligence

What I built

A TypeScript toolkit with three interfaces that all share one core: a CLI for terminal workflows, an MCP server for AI assistants, and a library for direct integration into Node.js applications.

The CLI (mkc) gives you 12 commands for searching products, fetching details, generating affiliate links, managing credentials, and validating API access. The MCP server exposes 7 tools that AI assistants like Claude can call directly, turning natural language product research into structured data with affiliate links attached. The library exports the same functionality as typed functions for embedding into any Node.js project.

All three interfaces share the same authentication, rate limiting, caching, and response validation. Build once, use everywhere.

mkc CLI demonstrating product search, affiliate link generation, and credential validation

The MCP integration

This is where the project pays for itself. The MCP (Model Context Protocol) server turns Claude into a product research assistant. Ask it to find wireless headphones under $50, and it calls amazon_search with the right filters, returns formatted results with prices and ratings, then generates affiliate links on the spot. No browser tabs, no copy-pasting, no manual formatting.

The seven MCP tools cover the full product research workflow: search with filters, fetch detailed product data, browse variations (colors, sizes), get category information, generate affiliate links, list configured sites, and import credentials. Each tool validates inputs with Zod schemas and returns structured, typed responses.

For content creators running affiliate sites, this collapses a 15-minute manual workflow into a 10-second conversation. For developers building product recommendation features, it eliminates weeks of API integration work.

Claude AI assistant MCP MCP Server rate limiter TTL cache OAuth 2.0 REST Amazon Creators API
Claude Code conversation using MCP tools to search Amazon products and generate affiliate links

Architecture

Every request flows through the same pipeline regardless of which interface initiated it.

Authentication: Credentials are stored locally using AES-256-GCM encryption with machine-specific keys derived via scrypt. The encryption is tied to the hostname, so credentials cannot be decrypted on a different machine. OAuth 2.0 tokens are managed automatically.

Rate limiting: Amazon enforces a strict 1 request per second limit. A promise-chain serializer queues concurrent requests without external dependencies. If multiple tools fire at once, they execute in order without exceeding the limit.

Caching: A TTL cache (5-minute default) prevents duplicate API calls. Search the same query twice within five minutes, and the second response comes from memory instantly.

Validation: Every API response passes through Zod schemas before reaching the caller. If Amazon changes their response format, the schema catches it at the boundary instead of letting malformed data propagate through the application.

Retry logic: Transient failures (429 rate limits, 401 token expiry) trigger automatic retry with exponential backoff. The system refreshes OAuth tokens and requeues failed requests without manual intervention.

Request CLI or MCP OAuth AES-256 Rate Limit 1 TPS queue Cache 5-min TTL Amazon API + retry logic Zod Validated typed response Result clean data

Why bespoke tooling matters

Off-the-shelf solutions exist for Amazon product data. They charge monthly fees, limit API calls, and give you generic dashboards built for everyone and optimized for no one. Building a custom tool costs more upfront but pays back in three ways.

First, it fits exactly into existing workflows. The MCP server drops into Claude Code with zero configuration. The CLI runs in the same terminal where I’m already writing content. The library imports directly into the build pipelines that generate affiliate pages. No adapters, no middleware, no glue code.

Second, it stays lean. Three production dependencies total: Commander for CLI parsing, Zod for validation, and the MCP SDK for the protocol layer. No ORMs, no HTTP frameworks, no utility belts. Every line of code exists because a specific feature requires it.

Third, it compounds. Every Frog Stone Media project that needs product data gets it through the same tool. The WHFoods nutrition site pulls Amazon product recommendations. The content workflow uses it for affiliate link generation. Each new project gets product intelligence for free because the tool already exists.

Before Open browser Search Amazon manually Copy product details Format affiliate links Paste into content ~15 min per product After "Find me wireless headphones under $100" ↓ Claude + MCP Formatted results + affiliate links ready ~10 seconds

This is what I build for businesses. Not generic SaaS products, but precision tools that eliminate repetitive work and plug directly into how you already operate. If your team spends hours on tasks that follow the same pattern every time, that pattern can be automated with a tool built specifically for your workflow.

Like what you see?

I build tools that solve real problems. If you have an idea or a project that needs engineering, let's talk.

Get in Touch