mcp-retail-sim
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-retail-simSearch for headphones, add SKU-1001 to cart-1, then place the order"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-retail-sim
Synthetic retail store MCP server for building and evaluating shopping / support agents.
No real payments, inventory DB, or third-party APIs — fixtures load into memory so demos and evals stay deterministic.
What you get
Primitive | Examples |
Tools |
|
Resources |
|
Prompts |
|
Transports | stdio (default) · Streamable HTTP |
Cart/order flows are stateless at the protocol layer: the client passes a cart_id handle (no server login session).
Same tools, resources, and prompts are available on both transports — only how the client connects changes.
Related MCP server: Commerce MCP Server
Demo catalog
About 500 synthetic products. Search is a case-insensitive substring of name, description, category, or brand. A random word often returns no rows.
Try this | What you should see |
| Matching products |
| LumenLab Pro Headphones |
| In stock |
| Out of stock ( |
| New cart, stock unchanged |
| Order id |
| That |
| Store policy text |
Categories include electronics, computers, home and kitchen, furniture, clothing, beauty, sports, toys, books, grocery, health, automotive, pets, office, and baby. SKUs look like SKU-1000.
Transports
stdio | Streamable HTTP | |
Start | Client spawns the process | You start the server; it listens on a port |
Connect | Pipes (stdin/stdout) | URL, e.g. |
Lifetime | Usually tied to the client | Long-lived until you stop it |
Typical use | Cursor, Claude Desktop, Inspector spawn | LangChain / remote-style clients, multi-client |
uvx downloads the package from PyPI and runs it. Use these commands if you are not developing this repo:
# stdio (default) — for desktop hosts / Inspector spawn
uvx mcp-retail-sim
# same as:
uvx mcp-retail-sim --transport stdio
# Streamable HTTP — long-lived local server
uvx mcp-retail-sim --transport http --host 127.0.0.1 --port 8050
# MCP endpoint: http://127.0.0.1:8050/mcpCLI flags (HTTP only uses host/port):
Flag | Default | Meaning |
|
|
|
|
| Bind address for HTTP |
|
| Bind port for HTTP |
Quick start (from a git checkout)
uv run uses the local source and the project virtualenv. It does not download the PyPI release.
cd mcp-retail-sim
uv sync
uv run mcp-retail-sim --helpMCP Inspector
stdio — Inspector starts the server for you (do not run the server yourself).
Published package from PyPI:
npx @modelcontextprotocol/inspector uvx mcp-retail-simLocal checkout & Run it from the mcp-retail-sim directory:
npx @modelcontextprotocol/inspector uv run mcp-retail-simHTTP — start the server first, then point Inspector at the URL:
# terminal 1
uvx mcp-retail-sim --transport http --port 8050
# terminal 2
npx @modelcontextprotocol/inspector \
--server-url http://127.0.0.1:8050/mcp \
--transport httpCursor / Claude Desktop (stdio)
{
"mcpServers": {
"mcp-retail-sim": {
"command": "uvx",
"args": ["mcp-retail-sim"]
}
}
}LangChain / HTTP client sketch
# Server must already be running:
# uvx mcp-retail-sim --transport http --port 8050
config = {
"mcpServers": {
"mcp-retail-sim": {
"url": "http://127.0.0.1:8050/mcp",
}
}
}Architecture (high level)
Client (agent / Inspector / LangChain)
│
├─ stdio: client spawns process, JSON-RPC over pipes
└─ http: client connects to http://host:port/mcp
▼
┌─────────────────────────────┐
│ mcp-retail-sim (FastMCP) │
│ tools · resources · prompts│
│ cli: --transport stdio|http│
└─────────────┬───────────────┘
│
▼
┌─────────────────────────────┐
│ In-memory store │
│ ← fixtures (products, │
│ inventory, policies) │
│ + carts / orders │
└─────────────────────────────┘Status
MVP: tools, resources, prompts, stdio + Streamable HTTP.
Failure injection is planned (see [scope.md](./scope.md)) — not shipped yet.
License
Available Tools
6 toolsadd_to_cartAdd To CartA
Add a product to a cart. Does not decrement stock.
Example: cart_id=cart-1, product_id=SKU-1001, qty=1. Use any new cart id; the cart is created if it does not exist. Fails if the SKU is unknown or out of stock (try SKU-1002 to see that error).
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | ||
| cart_id | Yes | Client-generated cart handle, e.g. cart-123 | |
| product_id | Yes | Alphanumeric product SKU (hyphens ok), e.g. SKU-1001 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does real work: 'Does not decrement stock' is a non-obvious side-effect disclosure, plus auto-creation of missing carts and two explicit failure modes. It omits auth/permission requirements, but for a cart-add this is solid behavioral coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action and the key side-effect caveat in the first two sentences, then the example. The trailing parenthetical '(try SKU-1002 to see that error)' is more test-harness narration than agent guidance and is the only slack.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need no explanation. The description covers side effects, id semantics, and failure modes, which is most of what an agent needs. It is only thin on qty semantics and cart state after repeated adds.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67%: cart_id and product_id are documented in the schema, but qty has no description. The worked example shows qty=1 and the id formats, adding modest value, but it never explains qty bounds, merge behavior for duplicate SKUs, or what happens when qty is omitted.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Add a product to a cart'), which is immediately distinguishable from siblings like place_order or check_inventory. It does not explicitly name an alternative, but the mutation-vs-query boundary is obvious from the wording.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Adds useful operating context — any new cart id works, the cart is created if absent — and states the failure conditions (unknown SKU, out of stock). However, it never says when to prefer this over check_inventory or place_order, leaving the agent to infer the post-cart workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_inventoryCheck InventoryB
Check stock for a SKU.
Example in stock: SKU-1001. Example out of stock: SKU-1002. Returns stock_qty and in_stock. Does not change inventory.
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | Alphanumeric product SKU (hyphens ok), e.g. SKU-1001 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden, and it does disclose the key trait that this is a non-mutating read ('Does not change inventory'). It stays silent on other behavior an agent may need: what happens for an unknown or malformed SKU, whether the result is cached/eventually consistent, and any auth requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short lines with the purpose front-loaded and no padding. The paired example SKUs are marginally redundant given the schema already supplies SKU-1001, but they are cheap and aid quick testing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter read tool with a full output schema and complete param documentation, the description covers the essentials: what it reads and that it does not mutate. Only the unknown-SKU behavior is left unaddressed, a minor gap at this complexity level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single product_id parameter, so the schema already documents format and gives the SKU-1001 example. The description's example SKUs repeat that same example rather than adding syntax, validation, or edge-case meaning, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Check stock for a SKU'), which is enough to separate it from siblings like add_to_cart, place_order, and get_order_details. It does not, however, draw a line against get_product_details, which plausibly also exposes stock information, so sibling differentiation is incomplete.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description never says when to prefer this tool over get_product_details or search, nor does it state any preconditions. The in-stock/out-of-stock example SKUs hint at how to exercise the tool but are not usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_order_detailsGet Order DetailsA
Read an order created by place_order.
Pass the order_id from that response, for example ORD-E2F0C262. Orders exist only in this server process; a new process has none.
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | Order id from place_order, e.g. ORD-E2F0C262 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does meaningfully discharge part of it by disclosing that orders exist only in this server process and vanish on restart — a non-obvious statefulness constraint that prevents misuse. It does not cover failure behavior for a stale or unknown order_id, which is the remaining gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, zero filler, with the core action stated first and the provenance and lifetime constraints following. Nothing could be removed without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter read tool with an output schema present (so return shape need not be described), the description covers what it reads, where the identifier comes from, and the process-scoped lifetime of the data. That is everything an agent needs to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the only parameter already documents "Order id from place_order, e.g. ORD-E2F0C262". The description repeats that provenance and example verbatim rather than adding format, validity, or error semantics, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ("Read") and resource ("an order created by place_order"), so an agent can separate it from get_product_details, search, and place_order without opening a schema. It stops short of explicitly routing away from a sibling (e.g., "orders are not searchable via search"), so it is clear rather than maximally distinguishing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives clear conditional context: this tool is used after place_order and consumes the order_id from that response, which tells the agent where in the workflow the call belongs. It names no alternative tool or exclusion case, so it is clear context rather than full when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_product_detailsGet Product DetailsB
Get one product by SKU. Example: SKU-1001 (LumenLab Pro Headphones).
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | Alphanumeric product SKU (hyphens ok), e.g. SKU-1001 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, and it discloses essentially nothing about behavior: no error/not-found handling for an invalid SKU, no permission or auth requirements, no note on whether the result is cached or live. For a zero-annotation tool this is a real gap, though the read-only lookup nature is implied by 'Get'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with the operation and key before the example. Nothing is padded, though the example sentence is largely redundant with the schema and could be spent on distinguishing this tool from 'search'.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter lookup with a 100%-covered schema and an output schema, the description covers the essentials and needn't explain return values. It is still incomplete on not-found/error behavior and on when to prefer this over the sibling 'search' tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the single parameter is fully documented by the schema; baseline is 3. The description's 'SKU-1001 (LumenLab Pro Headphones)' example merely repeats the schema's own 'e.g. SKU-1001' example and adds no new syntax or format meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Get one product') and the lookup key ('by SKU'), which is enough for an agent to understand the operation. It does not differentiate itself from the sibling 'search' tool, which is the main ambiguity a caller would face.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'by SKU' implies the precondition that the caller already holds an exact SKU, which is an implicit usage signal. There is no explicit when-to-use, no exclusion, and no routing to 'search' for name or keyword lookups.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
place_orderPlace OrderA
Check out a cart created by add_to_cart.
Example: cart_id=cart-1 after adding SKU-1001. Decrements stock, returns an order_id like ORD-XXXXXXXX, and deletes the cart.
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | Client-generated cart handle, e.g. cart-123 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses that stock is decremented, an order_id is produced, and the cart is deleted, which is the key destructive side effect an agent must anticipate. It stops short of describing failure behavior (e.g., insufficient stock, invalid or already-consumed cart) or whether checkout is reversible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences plus one example line, front-loaded with the action and followed by side effects. Every element earns its place, and the example illustrates the required handle rather than restating the type.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return-value documentation is unnecessary, and the description still notes the order_id shape and the cart deletion. For a mutation tool with zero annotations, the remaining gap is error/edge-case behavior (empty cart, out-of-stock item), which is the only thing an agent might still need.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the single cart_id parameter is already documented with an example format, so the schema does the heavy lifting. The description's inline example (cart_id=cart-1) is consistent with but not more informative than the schema's own 'cart-123' example, so it lands at the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Check out a cart') and explicitly ties it to the cart produced by add_to_cart, which distinguishes it from sibling add_to_cart and the read-only siblings (search, get_product_details, check_inventory, get_order_details). An agent can place this tool in the workflow without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The precondition is clear: it operates on a cart created by add_to_cart, and the worked example (cart_id=cart-1 after adding SKU-1001) reinforces the ordering constraint. It does not, however, state exclusions such as what to do with an empty cart or how it relates to get_order_details afterwards.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchSearchA
Search the synthetic catalog (about 500 products).
Example queries that return rows: headphones, laptop, coffee, yoga, tv, jacket. Matching is a case-insensitive substring of name, description, category, or brand.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Substring matched against name, description, category, and brand. Try headphones, laptop, coffee, yoga, or tv. A random word often returns []. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the matching algorithm, the searched fields, and the catalog size. It says nothing about result limits, ordering/ranking, or pagination behavior, which matter for predicting what a search returns; the 'random word often returns []' hint lives in the schema rather than the description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences plus an example line, front-loaded with the resource and its size. The example-query line partly duplicates the parameter description, which is the only real redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter search tool with an output schema covering return values, the description gives enough to call it correctly: what is searched, how matching works, and what kinds of terms succeed. The remaining gap is result-set behavior (limits, ordering), which is a minor omission rather than a blocking one.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the sole parameter is fully documented in the schema, and the description largely repeats it (matching fields, example queries). No new syntax, limits, or formatting constraints are added beyond what the schema already provides, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource (search a ~500-product catalog) and spells out exactly what is matched (case-insensitive substring of name, description, category, brand). It does not name any sibling tool, but its scope is clearly distinct from get_product_details and check_inventory, so an agent can place it without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: you search to discover products. There is no explicit when-to-use/when-not guidance and no routing to alternatives such as switching to get_product_details once an ID is known. The example queries are practical hints but not selection guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
add_to_cart - First observed
check_inventory - First observed
get_order_details - First observed
get_product_details - First observed
place_order - First observed
search
TDQS
Scored across 6 tools
Each tool targets a distinct action: catalog search, single-product lookup by SKU, stock check, cart addition, checkout, and order read. The boundaries between get_product_details and check_inventory are clarified by descriptions (one returns product data, the other returns stock_qty/in_stock).
Consistent snake_case with a verb_noun pattern for five tools (get_product_details, check_inventory, add_to_cart, place_order, get_order_details). The lone exception is 'search', which lacks an explicit noun/target, a minor deviation from the otherwise predictable pattern.
Six tools is well-scoped for a retail simulation, covering the essential browse-to-checkout flow without redundancy. Each tool earns its place and none feels like filler.
The core lifecycle (search, inspect, inventory, cart, order) is covered end-to-end. Minor gaps exist: no cart inspection/removal, no order listing or cancellation, which an agent could work around for a simple sim.
Maintenance
Related MCP Connectors
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
AI shopping gateway for product search, inventory, carts, and merchant-hosted checkout.
Live prices, stock & price history across 100+ U.S. retailers for any AI agent.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform e-commerce operations including product search, budget-constrained shopping recommendations, and sustainability analysis. Includes a secure HTTP bridge with OAuth integration and observability features for production deployment.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to browse product catalogs, search products with filters, and initiate checkouts, generating order summaries and checkout URLs.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to provide e-commerce customer service with product search, RAG-based FAQ answers, human handoff, and automated security auditing with a review workflow.-
- AlicenseNot gradedqualityBmaintenanceEnables agents to translate consumer shopping intent into aggregated item discovery, cross-merchant cart consolidation, and structured transaction checkout payloads across multiple merchants. It runs as a zero-dependency Python MCP server or importable module compatible with Claude Desktop, Cursor, and other work agent frameworks.7MIT