Skip to content

Repository files navigation

shopdeals — the MCP server for shopping

shopdeals

The MCP server for shopping. Free, open, rate-limited, no API key.

CI License: MIT MCP 1.x Hosted endpoint Node 22+

Follow @idanmann10 GitHub stars

shopdeals gives AI agents shopping superpowers. One MCP endpoint lets Claude, ChatGPT, or Cursor compare live seller prices, watch products until they hit a target price, and apply coupon codes that actually work at checkout.

Quick start →  ·  Tools  ·  Self-host  ·  Website

Drop https://mcp.shopdeals.sh/mcp into any MCP client. No signup, no API key. 60 calls/minute per client, free forever.


Quick start

The hosted server lives at https://mcp.shopdeals.sh/mcp. Pick your client:

Claude Desktop

Add to ~/.claude/mcp.json (macOS / Linux) or %APPDATA%\Claude\mcp.json (Windows):

{
  "mcpServers": {
    "shopdeals": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.shopdeals.sh/mcp"]
    }
  }
}

ChatGPT (Plus / Pro custom connector)

Settings → ConnectorsAdd custom MCP server → paste:

https://mcp.shopdeals.sh/mcp

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "shopdeals": {
      "url": "https://mcp.shopdeals.sh/mcp"
    }
  }
}

That's it. Restart your client and ask "find me the best deal on..." — the agent picks the tool.


Tools

Ten MCP tools, all spec-compliant. Inputs are Zod-validated, outputs are structured JSON. Full input schemas in src/mcp/tools/.

Shopping

  • find_best_deal — compare live seller prices for a query, attach matching coupons, flag Amazon price lows via Keepa, return the ranked best buy plus alternatives.
  • find_products — live Google Shopping search via SerpApi. Returns each seller's direct buy link, price, and any coupon we hold.
  • get_price_history — 30-day / 90-day / all-time price history for any Amazon ASIN or product URL (Keepa-backed).

Coupons & deals

  • find_deals — search the merchant-verified coupon catalog by merchant, query, country, or category.
  • get_deal — fetch a single deal by id with full discount spec, stack rules, and attribution.
  • get_code_for_url — given any merchant URL (Amazon, Best Buy, etc.), return the best active coupon codes for that merchant.
  • report_code_result — agent reports whether a code worked at checkout. Updates the rolling 30-day success rate.

Merchants & links

  • list_merchants — browse merchants with at least one active deal. Filter by category, country, or name substring.
  • redeem_link — wrap any merchant URL with affiliate tracking so a buy converts to commission. Preserves existing referral cookies.

Watches

  • watch_price — persist a price watch. Returns a watch id; we notify the user when the product hits a target price.

Example conversation

Paste this prompt into Claude / ChatGPT / Cursor with shopdeals connected:

Find me the best deal on Sony WH-1000XM5 headphones. Stay under $300 if you can, and double-check that any coupon you find actually works at checkout.

The agent picks the tools — typically find_best_deal to compare sellers, then get_code_for_url to verify the winning coupon.

You:     Find me the best deal on Sony WH-1000XM5 headphones. Stay under
         $300 if you can, and double-check that any coupon you find actually
         works at checkout.

Claude:  → tools/call find_best_deal { query: "Sony WH-1000XM5", alternatives: 3 }
         (412 ms · 3 sellers · 49 merchants checked)

         Best Buy   $349.99
         Amazon     $399 → $323.00  code SAVE25 → effective $298.00  ★
         Target     $329.99

         → tools/call get_code_for_url {
             url: "https://www.amazon.com/dp/B09XS7JWHH", limit: 3
           }
         (128 ms · SAVE25 92% success rate over 421 agent reports / 30d)

         The best deal is Amazon at $298.00 after SAVE25 — $51 below Best
         Buy and comfortably under your $300 cap. The coupon is verified
         working at checkout (92% success rate). Ships free with Prime.

Two tool calls. find_best_deal returns a structured { best, alternatives, appliedCoupons }; get_code_for_url returns the live success rate so the agent can vouch for the code before recommending it.


Self-hosting

shopdeals runs anywhere Node 22 and a Postgres 16 connection string can. The repo ships with a Dockerfile, a railway.json, and a fly.toml.

Locally

git clone https://github.com/idanmann10/shopdeals.git
cd shopdeals
cp .env.example .env          # at minimum, set DATABASE_URL
npm install
npm run db:migrate
npm run dev                   # MCP server on http://localhost:3000/mcp

Docker

docker build -t shopdeals .
docker run --rm -p 3000:3000 --env-file .env shopdeals npm run start:prod

Railway

railway.json is wired for one-click deploy of the MCP service. A second service running npm run ingest:prod on a */15 * * * * schedule keeps the deal catalog fresh — see DEPLOYMENT.md for the full walkthrough.

Fly.io

fly launch --copy-config --no-deploy   # reads fly.toml
fly secrets set DATABASE_URL=postgres://...
fly deploy

Required environment

Var Purpose
DATABASE_URL Postgres 16 connection string (Neon's free tier is fine).
SERPAPI_KEY Live Google Shopping for find_best_deal / find_products.
KEEPA_API_KEY Amazon price history for get_price_history.
COUPONAPI_KEY Coupon catalog (free 7-day trial at couponapi.org).
AMAZON_ASSOCIATES_TAG Affiliate tag appended to amazon.* links on the way out.
SKIMLINKS_PUBLISHER_ID Universal affiliate for non-Amazon merchants.

Every key is optional — adapters whose keys are missing are silently skipped at ingest time. The Slickdeals adapter is free and runs unconditionally. Full env surface in src/lib/env.ts and .env.example.


Architecture

  MCP client (Claude / ChatGPT / Cursor)
            │  JSON-RPC over Streamable HTTP
            ▼
  Hono server  ──►  auth ──►  rate limit (60/min)  ──►  McpContext
            │                                                │
            │                                                ▼
            │                                tool handler (Drizzle / Keepa /
            │                                SerpApi / CouponAPI / affiliate)
            ▼
  Postgres (Neon)  ◄── ingest cron (every 15 min)
  • Server: Hono + @modelcontextprotocol/sdk, Streamable HTTP transport.
  • Storage: Postgres via Drizzle ORM. Schema in src/db/schema.ts.
  • External APIs: SerpApi, Keepa, CouponAPI, Awin, Impact, FMTC. Each wrapped in src/lib/ or src/sources/ with rate limiting and an in-memory LRU.
  • Affiliate rewriter: src/lib/affiliate.ts — Amazon Associates + Skimlinks, never overwrites existing referral cookies.

Deeper dive: docs/ARCHITECTURE.md.


Rate limits

The hosted endpoint is free and rate-limited at 60 calls per minute per client. No API key, no account, no per-call fees. The limit exists to keep one looping agent from torching the shared SerpApi / Keepa budget.

When you hit the ceiling you get a clean JSON-RPC 429 with a Retry-After header — well-behaved clients back off automatically.

Need more headroom? Self-host. All the rate limits are configurable, and your own SerpApi / Keepa keys mean the only ceiling is your wallet.


Contributing

PRs welcome. Start with CONTRIBUTING.md — short, covers the branch flow, the conventional-commit style, and the rules for adding a new affiliate-network adapter.

npm install
npm test
npm run typecheck
npm run lint

Be excellent to each other. We follow the Contributor Covenant 2.1.


License

MIT — copyright 2026 idanmann10.

Acknowledgements

Built on the shoulders of Model Context Protocol, Hono, Drizzle ORM, and the public-API generosity of Keepa, SerpApi, and CouponAPI.


Ready to give your agent a shopping cart?

Get started free

Star History

Copyright © 2026 idanmann10. Released under the MIT License.

About

The MCP server for shopping. Gives AI agents (Claude, ChatGPT, Cursor) the ability to find the best deal, watch prices, and apply working coupon codes.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages