DEV Community

AI Dev
AI Dev

Posted on Edited on AI-assisted

Give Your AI Assistant Amazon Price History with an MCP Server (Setup + a Simple Buy-or-Wait Check)

AI assistants are good at reasoning but have no idea what a product cost last month. Ask "is this a good price?" and you get a guess. An MCP server can fix that by giving the assistant real price data to work from.

This post walks through connecting the AIPriceHistory MCP server to your AI tool and using it to decide whether to buy now or wait. (Disclosure: I work on AIPriceHistory. The setup pattern applies to any MCP server.)

What the server returns

For one Amazon product, the server returns:

  • the current price and currency
  • the lowest and highest recorded prices, with dates
  • the average price
  • how far today's price is above the lowest
  • the dated list of price changes

It's free for registered users, with a limit of 100 products per week.

Tools

Tool Input Use
get_price_history ASIN + marketplace (e.g. amazon.in), optional days History for one product
get_price_history_by_link An Amazon link (amzn.in, amzn.to, a.co and amzn.eu short links work), optional days Same, country read from the link
get_usage none Shows your weekly allowance and when it resets

The marketplace is required with an ASIN, because the same ASIN can be priced differently in each country. Your assistant should ask you if you haven't said.

Setup option 1: sign in (no key to copy)

In a tool that supports sign-in for MCP servers, add the server with only its address:

https://aipricehistory.com/api/mcp
Enter fullscreen mode Exit fullscreen mode

Your browser opens, you sign in with Google and click Allow. A free account is created if you don't have one.

For Claude Code:

claude mcp add --transport http aipricehistory https://aipricehistory.com/api/mcp
Enter fullscreen mode Exit fullscreen mode

Then run /mcp and choose to authenticate.

Setup option 2: access key

Create a free account, generate a key on the MCP page, and pass it as a header:

claude mcp add --transport http aipricehistory https://aipricehistory.com/api/mcp \
  --header "Authorization: Bearer YOUR_KEY"
Enter fullscreen mode Exit fullscreen mode

For tools configured with JSON (for example Cursor):

{
  "mcpServers": {
    "aipricehistory": {
      "url": "https://aipricehistory.com/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Keep the key private and don't commit it to a repo.

Try it

Paste a product link and ask:

Check the price history of this Amazon product: https://www.amazon.in/dp/XXXXXXXXXX. Is today's price close to the lowest?

A simple buy-or-wait rule

Raw numbers need a decision rule. This is the one I use. Ask your assistant to apply it:

  1. Compare with the lowest: is today's price within about 5% of the all-time low? If yes, it's a good time to buy.
  2. Compare with the average: is today's price below the average? If not, wait.
  3. Check the recent trend: look at the last 30-90 days (days input). A price that just jumped right before a sale is often a fake discount.

Example prompt:

Using the price history, tell me: (1) how far today's price is above the lowest, (2) whether it's below the average, and (3) whether the price jumped in the last 30 days. Then say buy or wait in one sentence.

Optional: a DIY "watch" routine

The server doesn't push alerts. If your AI tool supports scheduled tasks, you can have it re-run the check for you, for example once a day for a product you're watching, and tell you only when today's price is within your target of the lowest. This depends on your tool's scheduling features, so check what it supports. Each check counts as one product against your weekly allowance, so keep the list of watched products short.

Things to know

  • Prices are past recorded prices, not predictions.
  • Prices vary by country, so always use the right marketplace.
  • The weekly allowance resets on a schedule you can see with get_usage.

Server page and docs: https://aipricehistory.com/mcp. If you build something with it, tell me in the comments.

Top comments (0)