Inspiration 💡
Modern e-commerce was designed exclusively for human eyes. Today, when autonomous AI agents (such as in ChatGPT or WebMCP-enabled browsers) browse shopping platforms, they are forced to scrape messy HTML trees, guess CSS selectors, and blindly click buttons. This results in high latency, hallucinated purchases, and total failure when dealing with multi-item budget and specification constraints.
When OpenAI announced The WebMCP Challenge, we saw the future of the agentic open web: what if websites could expose typed, structured tools directly to AI agents? We built AgentCommerce WebMCP to bridge this gap, creating a seamless marketplace where humans and AI agents collaborate on product discovery, budget optimization, and checkout execution.
What It Does 🚀
AgentCommerce is an agent-native e-commerce and procurement platform that implements the emerging WebMCP standard (document.modelContext.registerTool). Rather than leaving agents to guess through the UI, the web app registers 8 production-ready structured tools:
search_products(query, category, max_price): Keyword and category-filtered catalog search.filter_by_specifications(min_rating, in_stock_only, category): Precision filtering by rating and live inventory.add_to_collaborative_cart(product_id, quantity, agent_reasoning): Adds items to a shared cart with explicit human-readable rationale notes.optimize_budget_bundle(target_budget): Evaluates tradeoffs to strictly respect user spending limits.calculate_shipping_and_carbon(zip_code, eco_mode): Computes ground shipping logistics and carbon offsets.apply_negotiated_coupon(discount_code): Applies agent-negotiated discount vouchers (e.g.WEBMCP20).request_human_approval(action_type, total_amount, rationale): Safety gateway requiring human sign-off before significant transactions.execute_agent_checkout(delivery_instructions): Finalizes order placement with authorized credentials.
Key Features:
- Collaborative Human-Agent Cart: Distinct visual badges for items added by the human vs suggested by the AI agent with rationale notes.
- Live WebMCP Telemetry Terminal: Real-time visual inspector displaying registered schemas, incoming JSON-RPC calls, arguments, and latency.
- Autonomous Agent Simulator: In-browser mission runner allowing judges to trigger autonomous multi-step WebMCP workflows with 1 click without needing special browser flags.
How We Built It 🛠️
- Protocol: Official WebMCP Specification (
document.modelContext.registerTool) with a universal polyfill ensuring compatibility in both ChatGPT's in-app browser and standard Chrome. - Frontend & UI: React 19, TypeScript, and Vite 6 styled with Tailwind CSS 3.4 using an obsidian glassmorphic theme with neon emerald accents.
- Interactivity: Real-time JSON-RPC logging, interactive product catalog, slide-over cart drawer, and Canvas-Confetti celebration triggers.
Challenges We Faced 🧗
The main challenge was establishing a bidirectional reactive state between the WebMCP tool execution layer and React's component state. When an external agent calls document.modelContext.executeTool('add_to_collaborative_cart', ...), the React cart state needs to update immediately with visual provenance. We solved this by implementing an event-driven dispatcher and logger that bridges WebMCP tool executions with React hooks seamlessly.
What We Learned 🎓
We learned that WebMCP is a game-changer for the web. Moving from DOM scraping to structured tool registration reduces token consumption by over 80%, eliminates selector hallucinations, and creates a collaborative paradigm where humans and agents operate on shared application state with total transparency.
What's Next for AgentCommerce 🔮
- Multi-agent merchant negotiation where buyer agents and seller agents haggle over bulk pricing.
- Cross-site WebMCP procurement chains connecting inventory across multiple supplier platforms.
- Integration with ERC-4337 smart contract account abstraction for cryptographic micro-transactions.
Built With
- github
- openai
- react
- typescript
- vite
- webmcp

Log in or sign up for Devpost to join the conversation.