ShopWithin builds stateless MCP server for boutique stock
An in-depth look at ShopWithin's stateless MCP server featuring 6 tools for AI agents to check independent boutique stock, based on production data from Sept 27, 2026.

Stock photo for illustration only, not from the actual event
- ShopWithin developed a stateless MCP server exposing 6 boutique stock tools
- Runs on Vercel and React Router without persisting session state between calls
- Supports both plain text responses and structuredContent for ChatGPT widgets
The Model Context Protocol (MCP) server operated by ShopWithin exposes a total of 6 tools, none of which possess capabilities to reserve, hold, or charge payments. Its core function is to allow AI agents to query stock availability across independent boutiques, returning piece details, sizes, prices, and direct product page URLs. All reference data and system behaviors are drawn directly from production as of September 27, 2026.
Under the hood, the endpoint operates as a route within a React Router application hosted on Vercel. Every POST request constructs a fresh McpServer instance and transport layer, answers a single message, and immediately discards both. Utilizing the Streamable HTTP transport renders sessions entirely optional, while the SDK features a native stateless mode tailored for this exact architecture, eliminating the need to maintain an active session store between function invocations.

Stock photo for illustration only, not from the actual event
AI models select appropriate tools based on descriptive text written from a shopper's perspective. Items are identified across tools by combining boutique_domain with a unique identifier, allowing models to chain a search directly into a get_piece query without parsing complex URLs. For instance, a live production call searching WDLT117's inventory for MM6 items under $300 processes natural language through the exact same parser utilized by the site's search bar, converting "under $300" into a strict price ceiling while preserving "MM6" as the search query.
Adopting a stateless architecture for an MCP server represents a crucial strategy for minimizing server memory overhead and infrastructure complexity. As the volume of AI agents scales upward, abandoning session persistence enables seamless horizontal scaling across serverless environments like Vercel. Nevertheless, operating without sessions introduces inherent trade-offs, such as the inability to retain client identifiers, which forces analytics logging to record client names as unknown.
Every response is structured into two distinct halves. The content text format provides one line per item designed for seamless model quotation, detailing the designer, currency-formatted price, available sizes, shop name, and URL. Meanwhile, the structuredContent half is strictly typed and validated against the tool's zod outputSchema, serving as the data source consumed by ChatGPT widgets. For example, a tested boot returned a price of 249 Canadian Dollars with 1 unit in stock, while its condition field returned null because the original listing omitted it and the system refuses to guess.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment