Amazon Creators API | TypeScript MCP Server
A TypeScript CLI and MCP server for the Amazon Creators API that gives AI product lookups for affiliate links. 7 AI tools let Claude search products, fetch details, and generate affiliate links, with 12 CLI commands, AES-256 encrypted credentials, built-in rate limiting, and 3 production dependencies.
Who it helps
This toolkit helps affiliate publishers and developers get Amazon product data, prices, images, descriptions, and affiliate links without fighting the API. Its MCP server gives AI assistants product lookups for affiliate links.
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. Several Frog Stone Media content sites need that product data, and wrestling the API takes time away from building features.
This is the kind of problem a purpose-built tool solves. Instead of every project reimplementing the same authentication, caching, and error handling, one tool handles all of it and exposes clean interfaces for every use case.
What it does
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.
The MCP integration
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, product research becomes a conversation instead of a round of browser tabs. For developers building product recommendation features, the API integration work is already done.
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.
Why purpose-built 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 as a standard MCP server. The CLI runs in the same terminal where the content gets written. 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.
Frog Stone Media builds tools like this for businesses: precision tools that cut repetitive work and plug directly into how your team already operates. If your team spends hours on tasks that follow the same pattern every time, a tool built for your workflow can take that pattern over.
Want something like this for your business?
Send a short email about the problem you want solved and get a written scope back. No sales call required.
Start With a Free Email Scope