What is @betterdata/commerce-gateway?
@betterdata/commerce-gateway is a universal abstraction layer for building AI-powered shopping experiences across multiple LLM providers. Write your commerce logic once, and it works everywhere—Claude Desktop, ChatGPT, Grok, custom agents, and more.Universal Tool Format
Define commerce tools once. Automatically convert to MCP, OpenAI Functions, or Grok formats.
Pluggable Backends
Connect to any e-commerce platform—Shopify, Square, WooCommerce, or custom systems.
Production Ready
Built-in auth, rate limiting, session management, and observability. Deploy with confidence.
Open Source
MIT licensed. Extend, customize, and contribute. No vendor lock-in.
The Problem
Building conversational commerce is fragmented:Multiple LLM Formats
Claude uses MCP, OpenAI uses Function Calling, Grok has its own format. You need to implement your tools 3+ times.
Platform Lock-In
Hard-coded integrations to Shopify, Square, or WooCommerce mean rewriting everything to switch platforms.
Missing Production Features
Authentication, rate limiting, session management, and analytics aren’t included in base LLM SDKs.
The Solution
@betterdata/commerce-gateway solves all of this:How does it work?
How does it work?
The gateway provides:
- Universal Tool Registry: Define tools once with Zod schemas
- Format Adapters: Automatic conversion to MCP, OpenAI, Grok formats
- Backend Interfaces: Clean contracts for commerce platforms
- Session Management: Redis-backed sessions with cross-platform transfer
- Production Infrastructure: Auth, rate limiting, observability
What can I build?
What can I build?
- Claude Desktop MCP Servers: Native shopping in Claude
- ChatGPT Plugins: Custom actions for ChatGPT
- Grok/X Integrations: Tweet-optimized shopping on X/Twitter
- Custom AI Agents: Your own conversational commerce bots
- Multi-LLM Apps: One backend, multiple LLM frontends
Is it production-ready?
Is it production-ready?
Yes! Better Data uses this in production for our marketplace with:
- 100+ vendors connected via Shopify and Square
- 1M+ products searchable across multiple LLMs
- 99.9% uptime with built-in error handling and retries
- Sub-200ms latency for tool execution
Quick Example
Here’s a complete shopping assistant in < 50 lines:This example uses in-memory storage for simplicity. In production, connect to your real e-commerce platform.
Open Source vs Hosted
Open Source
Free Forever
Perfect for:
- Single-store owners
- Full source code
- Self-hosted
- Community support
- MIT license
Perfect for:
- Shopify stores
- Square merchants
- WooCommerce sites
- Custom platforms
Hosted Marketplace
From $99/month
Perfect for:
- Multi-vendor marketplace
- Product deduplication
- Competitive ranking
- Signal Tag auth
- Attribution analytics
- 99.9% SLA
Perfect for:
- Marketplaces
- Drop shippers
- Aggregators
- Platforms
Key Features
🎯 Universal Tool Format
Define tools once, use everywhere:🔌 Pluggable Backends
Connect to any commerce platform:🔐 Production Infrastructure
Everything you need for production:- Authentication: API keys, OAuth, JWT
- Rate Limiting: Per-key, per-IP, per-session
- Session Management: Redis-backed with cross-platform transfer
- Observability: Logs, metrics, traces
- Error Handling: Retries, circuit breakers, graceful degradation
- GDPR Compliance: Data export, deletion, consent management
📊 Built-in Analytics
Track everything:Architecture
Who Uses This?
Single Store Owners
Connect your Shopify or Square store to Claude Desktop in 10 minutes.
Marketplace Operators
Run multi-vendor marketplaces with competitive ranking and analytics.
AI Developers
Build custom conversational commerce agents with production infrastructure.