A technical deep-dive into W3Ship’s 22-tool Model Context Protocol server for autonomous commerce
The Problem
Online shopping hasn’t fundamentally changed in 25 years. You browse, click “Add to Cart,” fill out forms, and checkout. Even “AI shopping” tools are glorified search engines — they help you find products, then dump you into a traditional checkout flow.
W3Ship takes a fundamentally different approach. Instead of building another storefront, W3Ship is an MCP server — a set of 22 tools that any AI agent (Claude, Gemini, GPT, or any MCP-compatible client) can use to handle the full commerce lifecycle: product discovery, cart management, P2P marketplace listings, on-chain payments, and real-time shipment tracking.
Paste a product URL into Claude Desktop, say “buy this,” and the agent handles everything. No app to install. No forms to fill. No traditional checkout.
Architecture Overview
W3Ship operates at two levels: as a standalone MCP server that any AI agent can connect to, and as a Next.js web application with a built-in chat interface.
AI Agents (Claude Desktop, Cursor, Gemini, custom bots) ↓ Model Context Protocol (MCP) over stdio W3Ship MCP Server (22 tools) ↓ HTTP / REST W3Ship API (Next.js /api routes) ↓ DynamoDB + Valkey (Redis) On-Chain Layer (Base + Unichain) ↓ USDC payments, W3SH swaps, Uniswap Identity Layer (Dah.mx / SLH-DSA) Quantum-resistant keys, address hashing, seller verification
The MCP Server
The MCP server (w3ship-mcp-server on npm) is the primary interface. Install it once, and every MCP-compatible AI agent gains commerce capabilities. No API keys. No signup. Your wallet address is your identity. The MCP server calls W3Ship’s REST API for persistent operations (DynamoDB) and Valkey for ephemeral state (shopping carts).
The Chat Interface
The web application at w3ship.com/chat provides a built-in shopping assistant powered by Gemini. It uses the same underlying tools as the MCP server but adds MetaMask wallet authentication, rich UI cards for products, and in-browser payment flows. Users can browse and chat without connecting a wallet — authentication is optional and non-blocking.
The 22 Tools
The tools fall into six categories, each designed for a specific aspect of commerce.
Shopping Cart (TMF663 Compliant)
Six tools handle cart lifecycle. Carts are stored in Valkey (Redis-compatible) for fast read/write. The cart ID is the user’s public key — no separate account needed. The tools include creating carts, adding items (with price, quantity, and images), removing items, viewing cart contents, deleting carts, and converting carts to orders. When the AI calls add_item without a cart ID, the system automatically injects it from the configured public key.
Orders and Shipment Tracking (TMF622/TMF621)
Order creation is where the intelligence lives. The create_order tool detects whether the cart contains P2P listing items (prefixed with LST-) or standard demo products, and behaves differently for each.
For P2P listing items, the tool fetches the listing from DynamoDB, auto-fills the seller’s wallet address into the order’s merchantWallet field, sets payment status to “awaiting_payment,” marks the listing as “sold,” and returns payment instructions — including the exact USDC amount, the seller’s wallet address, and the Base chain ID. No fake shipment is created; the seller adds real tracking later.
Cryptographic Identity
The identity model is foundational. Your public key is your cart ID, your session ID, your address lookup key, and your order filter — simultaneously. No passwords. No OAuth. A single ECDSA or SLH-DSA signature proves identity.
The shipping address is stored in DynamoDB via Amplify, keyed by a SHA-256 hash of the public key. The raw key is never stored alongside the physical address. SLH-DSA (Sphincs+) is the quantum-resistant option — the NIST-approved post-quantum standard. If a quantum computer breaks ECDSA tomorrow, SLH-DSA identities remain secure.
P2P Marketplace
Four tools enable peer-to-peer selling without merchant onboarding. Anyone with a verified identity (registered via Dah.mx or the W3Ship registration flow) can create listings. Seller verification checks the DataCapture table in DynamoDB — if the seller’s public key hash exists, they’re verified. If not, the listing is rejected with instructions to register.
Listings are stored persistently in DynamoDB with fields for title, description, price, currency, category, condition, quantity, shipping regions, and expiration. Buyers browse by category or keyword, view full details, and purchase through the standard cart-to-order flow.
Payment and Fulfillment
Two tools complete the payment loop. After a buyer sends USDC to the seller’s wallet on Base chain, they submit the transaction hash via confirm_payment. The system verifies the transaction on-chain by fetching the receipt from the Base RPC, checking that it succeeded, parsing the ERC-20 Transfer event to verify the recipient matches the order’s merchant wallet, and updating the order status to “paid.”
The seller then uses add_tracking to provide a real carrier name (FedEx, UPS, USPS, DHL) and tracking number.
Promotional Items
One tool handles promotional giveaways — a growth mechanism where items are listed at $0 and buyers pay shipping only. The claim flow enforces three layers of anti-abuse: seller must be identity-verified, buyer must have a registered identity with a physical address on file, and each physical address can only claim each promotion once. When the promo quantity limit is reached, the listing automatically transitions to “claimed_out” status.
Token Swaps (Uniswap Integration)
Two tools integrate with Uniswap for token operations on Base chain. The swap quote tool returns real-time pricing for any ERC-20 pair using the Uniswap Trading API, with built-in token addresses for common assets (ETH, USDC, USDT, DAI, WETH).
Data Architecture
W3Ship uses two data stores, each chosen for its access pattern. Valkey (Redis-compatible) handles ephemeral, high-frequency data — shopping carts. Carts are temporary by nature, and Valkey provides sub-millisecond reads for the AI agent’s rapid tool-calling loops. DynamoDB (via AWS Amplify) handles persistent data — orders, shipments, listings, promo claims, and identity records. Seven models with secondary indexes enable efficient queries by category, seller, status, and listing-to-address relationships.
What Makes This Different
It’s an MCP server, not an app. Any AI agent with MCP support becomes a shopping assistant. Claude Desktop, Cursor, custom bots — they all get the same 22 tools.
Identity is trustless. No accounts, no passwords. A wallet signature proves who you are. SLH-DSA makes it quantum-resistant.
Anyone can sell. No merchant onboarding, no approval process. Verify your identity, list an item, get paid directly in USDC on Base chain.
Payments settle on-chain. No payment processor. No chargebacks. Buyer sends crypto, system verifies on-chain, seller ships.
Promos drive growth. Brands list free items, users claim with verified addresses, one per address. Built-in viral loop that forces identity registration.
Standards-based. TMF663, TMF622, TMF621 — the same standards used by telecom and logistics companies worldwide. This isn’t a toy API; it’s production infrastructure.
Try It
As an MCP user: Add w3ship-mcp-server to your Claude Desktop or Cursor config. Ask: “Search the W3Ship marketplace for electronics.”
As a web user: Visit w3ship.com/chat, connect your MetaMask wallet, and paste any product URL.
As a seller: Say: “List my PS5 for 350 USDC, electronics, like new condition.”
W3Ship is built by Dah.gg as open infrastructure for sovereign commerce. The MCP server is one interface into a larger ecosystem that includes quantum-resistant identity (Dah.mx), stablecoin settlement (DAHLOR), on-chain token distribution via Uniswap CCA, and physical retail integration. Learn more at w3ship.com.
