Skip to main content

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 search, get_product_details, check_inventory, add_to_cart, place_order, get_order_details
Resources product://{sku}, policy://returns, policy://shipping, policy://privacy
Prompts compare_products, find_best_deal
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.

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. http://127.0.0.1:8050/mcp
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
# stdio (default) — for desktop hosts / Inspector spawn
uv run mcp-retail-sim
# same as:
uv run mcp-retail-sim --transport stdio

# Streamable HTTP — long-lived local server
uv run mcp-retail-sim --transport http --host 127.0.0.1 --port 8050
# MCP endpoint: http://127.0.0.1:8050/mcp

CLI flags (HTTP only uses host/port):

Flag Default Meaning
--transport stdio stdio or http
--host 127.0.0.1 Bind address for HTTP
--port 8050 Bind port for HTTP

Once published to PyPI, the same commands work with uvx mcp-retail-sim instead of uv run mcp-retail-sim.

Quick start (from this repo)

cd mcp-retail-sim
uv sync
uv run mcp-retail-sim --help

MCP Inspector

stdio — Inspector starts the server for you (do not also run the server yourself):

npx @modelcontextprotocol/inspector uv run mcp-retail-sim

HTTP — start the server first, then point Inspector at the URL:

# terminal 1
uv run mcp-retail-sim --transport http --port 8050

# terminal 2
npx @modelcontextprotocol/inspector \
  --server-url http://127.0.0.1:8050/mcp \
  --transport http

Cursor / Claude Desktop (stdio)

{
  "mcpServers": {
    "mcp-retail-sim": {
      "command": "uvx",
      "args": ["mcp-retail-sim"]
    }
  }
}

For a local checkout before publish, use uv + run + mcp-retail-sim (with working directory set to this project) instead of uvx.

LangChain / HTTP client sketch

# Server must already be running:
#   uv run 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) — not shipped yet.

License

MIT

Metadata

Release files for mcp-retail-sim 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-retail-sim 0.1.0
File Size Uploaded
mcp_retail_sim-0.1.0.tar.gz 29.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-retail-sim 0.1.0
File Interpreter ABI Platform
mcp_retail_sim-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 60.2 kB

Release files / mcp_retail_sim-0.1.0.tar.gz

Download URL mcp_retail_sim-0.1.0.tar.gz
Size 29.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c0fa60d2725dec58aaef8738abd4aa08931f7958afa4425c9206d52147ab7162
BLAKE2b-256 checksum
How to use checksums
2f8be57e94f159b4e7cbe466bdaa256656e4b5c61995da72b6f5f56b3f01c2ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mcp_retail_sim-0.1.0-py3-none-any.whl

Download URL mcp_retail_sim-0.1.0-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70bfc1651c1001f31615efa766ffc46846cdddf34ac3feda239554dd348f985e
BLAKE2b-256 checksum
How to use checksums
9939c27e81d528d99a59d89d790d84e71f404151e7c1403d8b897d73b4225a9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page