Connect a shopping assistant to product search with MCP
How to connect a shopping assistant to product search with MCP
A step-by-step guide to giving a shopping assistant structured product search over MCP: connecting a hosted server, choosing the right tool, setting answer rules and handling empty or uncertain results.
Language models are good at understanding what a shopper wants and poor at knowing which real products exist today, what they cost and where to buy them. The fix is to give the assistant a product-search tool and make it answer from what that tool returns. The Model Context Protocol (MCP) is the simplest way to do that when the assistant decides for itself when to search.
What you are building
The pattern has three parts. The model interprets the shopper's request. A tool call fetches candidate products as structured data. The model then writes its answer only from those results, citing the facts that decide the choice and linking to the retailer. Everything the shopper sees should be traceable to a returned field.
The model
Reads intent, constraints and exclusions, decides which tool to call, and explains the result in plain language.
The tool
Returns products with title, identifiers, specifications, image, price snapshot and retailer link, plus a relevance score.
The rules
Tell the model what it may claim, when to ask a follow-up, and when to say it cannot verify something.
Step 1: Connect the MCP server
Simlir runs a hosted MCP server over Streamable HTTP. Any MCP client that supports remote servers can connect with an API key sent as a bearer token. Keep the key on your server or in your local client config, never in browser code or source control.
Once connected, the client lists the available tools and the model can call them like any other function. If you are building on ChatGPT, it uses Simlir account sign-in and OAuth approval instead of a pasted key. Full setup details are in the Simlir docs.
Step 2: Pick the right tool for each question
Tool
Use it when
Credits
simlir_search_products
The shopper describes what they want in words: "a quiet cordless vacuum for a small flat".
1
simlir_search_products_by_image
The shopper has a photo and wants that product or something like it.
2
simlir_lookup_products_by_identifier
You already know the exact product: a GTIN, MPN or SKU from a receipt, listing or previous result.
1
A useful rule: search when the shopper is still deciding, look up when the product is already known. Lookup avoids the ambiguity of near-identical product names and is the safer choice for price checks or reorders.
Step 3: Pass the market and keep constraints intact
Product availability and prices depend on where the shopper is. Pass a market with every search. The live docs list GB, US, DE, FR, ES, IT, AU and CA. If you do not know the shopper's market, ask once and reuse the answer.
Do not let the model compress a detailed request into two keywords. "Under £200, fits under a 45 cm worktop, no app needed" contains three hard constraints. Send the shopper's own wording as the query, and use structured filters such as price range or brand where the shopper has been explicit. Then check every returned candidate against the constraints before recommending it.
Step 4: Write the answer rules
Most bad shopping answers come from the model filling gaps. A short set of rules in the system prompt prevents that.
Answer only from tool resultsEvery spec, price and link in the answer must come from a returned product. No product facts from memory.
Show the price with its contextQuote currency, retailer and the snapshot date when present, and send the shopper to the retailer for today's price.
Respect exclusions as hard filtersIf a candidate breaks a stated constraint, drop it, even if it is otherwise a strong match.
Say when something cannot be verifiedIf a deciding attribute is missing, say so rather than inferring it.
Ask one follow-up when the request is vague"Good for travel" could mean size, weight or battery life. Ask which matters before searching again.
Handle empty results honestlyA result limit is a ceiling, not a promise. If nothing fits, say so and suggest loosening one constraint.
Step 5: Test before you ship
Write ten to twenty real shopper questions and run them end to end. Include a vague request, a request with an exclusion, a comparison, a photo, an exact identifier and a request that should return nothing. For each answer, check that every claim maps to a returned field and that the link goes to the right product variant. Our guide on evaluating product search quality sets out a fuller test plan.
What does it cost to try?
A free account includes 10,000 welcome credits. Text search and identifier lookup cost 1 credit each, and image search costs 2. Credits roll over and do not expire. Current plans are on the pricing page.
Frequently asked questions
Which MCP clients can connect?+−
Any client that supports remote MCP servers over Streamable HTTP with custom headers. ChatGPT connects through Simlir account sign-in and OAuth approval.
Can the assistant buy the product?+−
No. The tools return product details and retailer links. The shopper completes the purchase on the retailer's site.
What happens if the search returns nothing?+−
The assistant should say no suitable match was found, name the constraint most likely to be limiting the search, and offer to relax it. It should not substitute a product from memory.
Should I use MCP or the REST API?+−
Use MCP when the assistant decides for itself when to search. If your own backend decides when to call search, for example on a product page or in a batch job, the REST API is usually simpler.