Skip to main content
Glama
ludodelot

Amazon Product Research MCP Server

by ludodelot
README.md
# Amazon Product Research MCP Server

A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that
gives an AI assistant (e.g. Claude Code) tools to search and inspect Amazon
product data, over stdio.

## Features

- **`search_products`** — search products by keyword.
- **`get_product`** — fetch full details for a single product by ID.
- Written in strict TypeScript, validated at runtime with [Zod](https://zod.dev).
- Unit tested with [Vitest](https://vitest.dev).
- Linted with [ESLint](https://eslint.org) (`typescript-eslint`) and formatted
  with [Prettier](https://prettier.io).

## Project structure

```
src/
├── index.ts              # Entry point: wires the server to a stdio transport
├── server.ts              # Registers MCP tools on the McpServer instance
├── types/
│   └── product.ts         # Shared Product type
└── tools/
    ├── product-data.ts     # In-memory product catalog (mock data)
    ├── search-products.ts  # search_products tool: input schema + handler
    └── get-product.ts      # get_product tool: input schema + handler
tests/
├── search-products.test.ts
└── get-product.test.ts
```

## Requirements

- Node.js 20+
- npm

## Getting started

```bash
npm install
npm run dev
```

This starts the server over stdio using `tsx`, ready to be connected to by an
MCP client.

### Connecting from Claude Code

```bash
claude mcp add amazon-research -- npx tsx /absolute/path/to/amazon-product-research-mcp/src/index.ts
```

## Scripts

| Command                | Description                                     |
| ---------------------- | ----------------------------------------------- |
| `npm run dev`          | Run the server directly from TypeScript source. |
| `npm run build`        | Type-check and compile to `dist/`.              |
| `npm start`            | Run the compiled server from `dist/`.           |
| `npm test`             | Run the unit test suite (Vitest).               |
| `npm run lint`         | Lint the codebase with ESLint.                  |
| `npm run format`       | Format the codebase with Prettier.              |
| `npm run format:check` | Check formatting without writing changes.       |

## Tools reference

### `search_products`

Search Amazon products by keyword (matches against the product name,
case-insensitive).

**Input**

```json
{ "query": "kindle" }
```

**Output**

```json
[
  {
    "id": "kindle-paperwhite",
    "name": "Kindle Paperwhite",
    "price": 169.99,
    "currency": "USD",
    "rating": 4.7,
    "reviewCount": 12543,
    "description": "A high-resolution e-reader designed for reading comfortably indoors and outdoors."
  }
]
```

### `get_product`

Get full details for a single product by its ID.

**Input**

```json
{ "product_id": "kindle-paperwhite" }
```

**Output**: a single `Product` object, or `null` if no product matches.

## Data

Product data currently lives in a small in-memory mock catalog
(`src/tools/product-data.ts`) rather than a live Amazon API — this keeps the
project self-contained and safe to run without any credentials. `.env.example`
documents the environment variables a real API integration would need.

## License

[MIT](./LICENSE) © Ludovic Delot Bravo

TDQS

B3.3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are clearly distinct: search_products finds products by keyword, while get_product retrieves detailed information for a specific product. No overlap or ambiguity exists between them.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern using snake_case (search_products, get_product), making the naming predictable and easily understandable.

Tool Count3/5

With only 2 tools, the set feels thin for a product research server. While it covers the basic search-and-detail flow, it lacks breadth seen in more comprehensive servers, but it is not extreme enough to be a 1 or 2.

Completeness3/5

The tool surface provides the minimum necessary for product research—searching and retrieving details—but notably lacks capabilities like browsing categories, accessing reviews, or comparing products, which are expected in a full research context.

Maintenance

ActivitySlowing
ResponsivenessNo issues