Provides mock commerce functionality including product search, details retrieval, reviews access, and budget-constrained shopping recommendations with sustainability calculations
Agentic Shopping MCP
Production-ready MCP (Model Context Protocol) server that exposes commerce tools, plus a secure HTTP bridge that Cequence can place in front of for OAuth, scoping, and observability. Includes a simple Next.js demo UI.
Hackathon focus: “Build the Infrastructure for Autonomous Software”.
Transform apps into AI-ready, agent-accessible services using a Cequence AI Gateway with OAuth (Descope) and MCP.
🧱 What’s in here
MCP Server (
src/server.ts→dist/server.js)
Tools:commerce:ping,commerce:echocommerce:search(local mock catalog)commerce:details,commerce:reviewscommerce:budget_top(Budget Constraint AI)commerce:sustainability(approx CO₂ calc)
HTTP Bridge (
src/http_bridge.ts)
ExposesPOST /mcp/tools/call→ spawns MCP server over stdio → calls tool.Auth: Dev Bearer token or JWT (HS256/RS256).
Emits JSON logs w/
requestId→ gateway-friendly.
Web Demo (
/web, Next.js 15 + Tailwind)Budget Constraint AI form
Sustainability badge
🗂️ Repo Structure (key paths)
. ├─ data/ │ ├─ catalog.sample.json │ └─ reviews.sample.json ├─ dist/ # built server files (gitignored) ├─ scripts/ │ └─ test_client.ts # MCP stdio test ├─ src/ │ ├─ app/api/commerce/route.ts # Web API -> MCP server │ ├─ http_bridge.ts # HTTP Bridge -> MCP server │ ├─ providers/amazon.ts # sample provider (file-based) │ └─ server.ts # MCP server (tools) └─ web/ ├─ src/app/page.tsx # UI └─ (Next.js project)
⚙️ Prerequisites
Node.js 20+
npm
(Optional) curl + jq for testing
🚀 Quick Start (Local)
This server cannot be installed