Case Study: How an AI Agent Buys a Product in 8 Steps — Demo Store Walkthrough
Walk through the exact 8-step flow an AI agent follows to discover, compare, and purchase a product from the AgenticMCPStores demo store. No API key needed for discovery — try it yourself with the curl examples.
Executive summary
End-to-end case study of an AI agent purchasing from the AgenticMCPStores demo store. Covers the complete 8-step MCP flow: search → product details → create cart → shipping rates (with elicitation) → select shipping → apply discount → preview → checkout. Includes runnable curl examples and explains trust scoring, protocol detection, and address elicitation in Claude.ai.
Published
2026-04-06
10 min
Author
Integration Architecture Team
Implementation architects
The integration architecture team focuses on practical rollout patterns for stores adopting MCP-compatible commerce surfaces.
View profileCategory
case-study
What does it actually look like when an AI agent buys something? Not in theory — in practice. In this walkthrough, we'll follow a Claude agent through every step of a real purchase from the AgenticMCPStores demo store: 30 products, 8 categories, 3 discount codes, multiple shipping options, and a checkout flow that handles payment and address collection natively inside the chat. Every curl command in this post works against the live demo endpoint right now.
The demo store endpoint is public and rate-limited to 20 requests/minute per IP. No API key needed for discovery tools. For checkout tools, get a free 24-hour sandbox key: POST /api/v1/sandbox/key
The Setup: 30 Products, Zero Configuration
The demo store ships with 30 curated products across 8 categories: sneakers, jackets, accessories, pants, t-shirts, footwear, electronics, and smartphones. These aren't placeholder items — each product has realistic pricing, variant options (size/color), stock levels, ratings with review counts, and complete metadata including weight, material, and origin. Key products you'll see in this walkthrough: • Nike Air Max 90 — $130 (was $160), 4.7★ from 324 reviews, sizes US 8–10 • The North Face Nuptse Jacket — $320 (was $380), 4.8★ from 512 reviews, 700-fill goose down • Sony WH-1000XM5 — $349.99, noise-canceling headphones • Casio G-Shock DW5600E — $54.99, 200m water resistant The demo store has a trust score of 0.85 with STANDARD verification — high enough to pass all agent trust gates and appear prominently in search results.
Step 1: Search Products
The agent starts by searching the catalog. No authentication needed. ```bash curl https://www.agenticmcpstores.com/demo-store/mcp \ -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_products","arguments":{"query":"running shoes","max_results":5}},"id":1}' ``` The response returns matching products ranked by relevance and trust score. Each result includes: id, title, price, currency, rating, stock status, and image URL. The agent now has product IDs it can use in subsequent steps.
Step 2: Get Product Details
With a product ID from search, the agent fetches complete details including variants, specifications, and Schema.org JSON-LD. ```bash curl https://www.agenticmcpstores.com/demo-store/mcp \ -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_product_details","arguments":{"product_id":"prod-001"}},"id":2}' ``` The response includes everything the agent needs to make a recommendation: price vs compare-at price (for discount calculation), variant options with per-variant stock, material composition, weight, and a full JSON-LD block the agent can use for semantic reasoning.
Step 3: Create a Cart
Now the agent adds items to a cart. This requires a sandbox API key. ```bash # First, get a 24-hour sandbox key curl -X POST https://www.agenticmcpstores.com/api/v1/sandbox/key # Returns: {"key":"agnt_sandbox_...","expires_in":86400} # Create cart with the key curl https://www.agenticmcpstores.com/demo-store/mcp \ -X POST \ -H "Content-Type: application/json" \ -H "X-Agent-Api-Key: agnt_sandbox_..." \ -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"create_cart","arguments":{"items":[{"product_id":"prod-001","quantity":1,"variant_id":"v-snk-001a"}]}},"id":3}' ``` The response includes a `cart_id` (UUID), line items with pricing, and a `status: "NOT_READY_FOR_PAYMENT"` — the cart needs shipping and checkout to be complete. The `agent_session_id` is also returned, which can be used to resume this cart later.
Step 4: Get Shipping Rates (with Elicitation)
This is where things get interesting. When the agent calls `get_shipping_rates` without a shipping address, the MCP server triggers elicitation — a native MCP feature that collects user input inline. In Claude.ai, the user sees an inline form appear directly in the chat: - Street address - City - Country code (ISO-2: US, ES, DE...) - ZIP code - Province/State (optional) The user fills in the form, Claude passes the data back to the tool, and shipping rates are calculated. No redirects, no external pages — the entire interaction happens inside the conversation. The demo store returns two options: - Standard (5–7 days) — $9.99 - Express (2–3 days) — $24.99
Step 5: Select Shipping Option
Step 6: Apply a Discount Code
Step 7: Preview Checkout
Step 8: Complete Checkout
What the Agent Sees Behind the Scenes
Throughout this flow, several invisible systems are at work: • Trust scoring: The demo store's 0.85 trust score ensures it passes the hard eligibility filter (≥ 0.3) and ranks well in search results (30% weight on trust). • Protocol detection: Each request is analyzed by the protocol-detector middleware. The demo store supports ACP (Stripe), AP2 (Google), x402 (stablecoin), and UCP — the agent's payment method determines which protocol adapter handles settlement. • KYAI policy engine: Every checkout intent passes through 5 policy rules. The demo store's STANDARD verification and 0.85 trust score mean all rules return ALLOW — no friction or blocking. • Rate limiting: The demo endpoint caps at 20 requests/minute per IP. Sandbox keys get 50 checkout requests/hour. Production keys have higher limits based on tier. • Session cleanup: Cart sessions expire after 30 minutes of inactivity. Each request creates a fresh MCP server instance — no persistent connections.
Try It Yourself
The fastest way to experience this flow: 1. In Claude.ai: Add the MCP server URL `https://www.agenticmcpstores.com/demo-store/mcp` to your Claude Desktop config and ask Claude to 'search for running shoes on the demo store' 2. Via curl: Copy any of the commands above and run them in your terminal. Discovery tools work immediately with no setup. 3. In the playground: Visit agenticmcpstores.com/en/demo-store and use the interactive MCP playground to run tools visually with a session trace panel. 4. Via NLWeb: Try natural language search at `POST /demo-store/ask` with `{ "query": "cheap waterproof jacket", "mode": "list" }` for semantic vector search.
Frequently asked questions
Do I need an API key to search products in the demo store?
No. The discovery tools (search_products, get_product_details, browse_categories, get_merchant_profile) work without authentication on the demo endpoint. You only need a sandbox key for checkout tools (create_cart and beyond). Get one free: POST /api/v1/sandbox/key.
What happens if I call complete_checkout twice with the same idempotency key?
The second call returns the same result as the first without creating a duplicate order or charge. This is by design — idempotency keys ensure safe retries in case of network failures. Always pass an idempotency_key for complete_checkout.
How does address elicitation work outside of Claude.ai?
Elicitation is an MCP SDK feature (v1.28.0+). In Claude.ai, it renders as an inline form. In other MCP clients, the behavior depends on the client implementation. You can also skip elicitation by passing the shipping_address directly in the get_shipping_rates arguments.
Are the discount codes real?
In sandbox mode, yes — WELCOME10 (10% off), DEMO20 (20% off), and FREESHIP (free shipping) all work and correctly adjust the cart total. In production, merchants configure their own discount codes.
Can I test PayPal or x402 checkout in the demo store?
The demo store supports multiple payment protocols. Pass payment_method: 'ACP' for Stripe (test mode), 'MOCK' for simulated payment, or 'PAYPAL' for PayPal sandbox (requires buyer approval redirect). x402 stablecoin payments work in sandbox with simulated blockchain transactions.
Sources and references
- Model Context Protocol — Elicitation
Anthropic
- AgenticMCPStores Demo Store
AgenticMCPStores
- JSON-RPC 2.0 Specification
JSON-RPC Working Group
Related articles
developer-guide
Building Agentic Commerce #1: Multi-Protocol Checkout — MCP + x402 + ACP in One Flow
One agent, three protocols, one checkout. Here's how MCP, x402 stablecoin payments, and ACP work together to let AI agents buy products — with code examples you can run today.
developer-guide
Building Agentic Commerce #3: Trust Scores — How Agents Decide Who to Buy From
When an AI agent evaluates merchants, it doesn't read reviews or recognize logos. It reads trust scores — 12 machine-verifiable signals that determine search ranking, checkout eligibility, and payment friction. Here's how the system works.
integration-guide
Odoo + MCP in 15 Minutes: Connect Your ERP to AI Agents
Connect your Odoo 16, 17, or 18 instance to AI agents in under 15 minutes. One JSON-RPC connector, zero code changes to Odoo. Your products, stock levels, and pricelists become discoverable and purchasable by Claude, GPT, and other AI agents via MCP.