Let AI agents search weekly supermarket deals.
Under the hood
1/6 Collect
A scraper reads the half-price deals from Coles and Woolworths. It writes them to a JSON file.
How it works
The search_deals tool takes a text query. It joins vector search and full-text search in one SQL query. A retailer filter and a maximum price are optional.
Titan Text Embeddings V2 on Bedrock makes the vectors. Aurora PostgreSQL with pgvector stores them. An HNSW index finds the nearest deals.
Each deal has a retailer, a price, valid dates, and a source URL. Each result has an as_of date. A model never creates a price.
Text from store websites is data. The ingest step cleans it. Each tool description tells the agent to not follow instructions in it.
AWS Lambda functions run in Sydney (ap-southeast-2). API Gateway exposes the MCP server over HTTPS.
A scraper writes the weekly deals to a JSON file. The ingest function cleans, embeds, and upserts them. A second run adds no duplicates.
Half Price MCP is an MCP server. An AI agent calls it to find half-price deals at Coles and Woolworths. The server turns each deal into an embedding and keeps it in a vector database. With these results, an agent can plan a shopping basket or suggest when to buy an item. I built it to show a full AI system on AWS: data collection, retrieval, and a tool interface.
Connect your agent
The server uses MCP over streamable HTTP. The URL is https://halfprice.terrydo.dev/mcp. No token or account is needed.
Run this command.
claude mcp add --transport http half-price https://halfprice.terrydo.dev/mcpAdd this entry to the MCP configuration file of your client. For Claude Code, the file is .mcp.json. Other clients can use a different file name or key names.
{ "mcpServers": { "half-price": { "type": "http", "url": "https://halfprice.terrydo.dev/mcp" } }}Run the Inspector. Select the Streamable HTTP transport. Enter the URL. Then call the search_deals tool.
npx @modelcontextprotocol/inspectorThe server has one tool: search_deals. It takes a query. The retailer and max_price arguments are optional. Each result has an as_of date. Each deal has a retailer, a price, valid dates, and a source URL. Try this prompt:
Find coffee deals at half price. Plan a basket for under $40 and tell me which items to buy this week.Built with