W3Ship Commerce MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
> **Let AI shop for you — with no passwords, no logins, just cryptographic identity.**
W3Ship is the first MCP (Model Context Protocol) server for **AI-powered commerce**. It gives AI agents like Claude, Cursor, and VS Code Copilot the ability to create shopping carts, place orders, track shipments, book sessions, **swap tokens via Uniswap**, **sell items P2P**, and **distribute promotional items with in-store pickup** — all using cryptographic identity (SLH-DSA / ECDSA) instead of passwords.
Built on TMF Open API standards (TMF663, TMF622, TMF621) for interoperability.
---
⚡ Quick Start
Install via npx (recommended)
No installation required — just configure your AI client:
**Claude Desktop** (claude_desktop_config.json):
**Cursor** (.cursor/mcp.json):
**VS Code** (.vscode/mcp.json):
Prerequisites
- **Node.js** 18+
- **Redis / Valkey** instance (for cart, order, and shipment storage)
- Local: docker run -p 6379:6379 redis:latest
- Or any Redis-compatible service (AWS ElastiCache, Upstash, etc.)
---
🛠️ Tools (22 total)
🛒 Shopping Cart (TMF663)
| Tool | Description |
|:---|:---|
| create_cart | Create a shopping cart. Uses W3SHIP_PUBLIC_KEY automatically if configured |
| get_cart | Retrieve a cart by its public key ID |
| add_item | Add an item (product offering + quantity) to a cart |
| delete_cart | Delete a shopping cart |
📦 Orders (TMF622)
| Tool | Description |
|:---|:---|
| create_order | Convert a cart into a confirmed order and initiate fulfillment |
| get_order | Retrieve order details by order ID |
🚚 Shipment Tracking (TMF621)
| Tool | Description |
|:---|:---|
| track_shipment | Track delivery status with simulated real-time updates |
📅 Session Booking
| Tool | Description |
|:---|:---|
| get_available_slots | Get available session time slots by location and date (VR, fitness, dining, salon, etc.) |
| hold_slot | Reserve a session slot (held for 10 minutes pending payment) |
| list_bookings | List confirmed bookings, optionally filtered by location/date |
🔐 Identity Lookup
| Tool | Description |
|:---|:---|
| ship_address | Retrieve a physical shipping address using a public key + timed signature |
> Identity lookups are forwarded to the centralized W3Ship API (w3ship.com/api/identity). Signature verification and database access happen server-side — no AWS credentials needed on your end.
🧪 Setup & Demo
| Tool | Description |
|:---|:---|
| generate_demo_key | Generate a demo ECDSA key pair for testing — try the commerce flow without a wallet |
| get_identity | Show the currently configured identity or instructions on how to set one up |
🔄 Uniswap Swap (NEW in v1.3.0)
| Tool | Description |
|:---|:---|
| get_swap_quote | Get a swap quote from Uniswap — returns output amount, gas estimate, price impact, and routing path. Supports V2, V3, V4, and UniswapX. Default chain: Base (8453). |
| check_token_approval | Check if a token is approved for swapping on Uniswap. Returns approval transaction data if needed. |
> Requires UNISWAP_API_KEY — get yours free at developers.uniswap.org. Built-in token addresses for Base chain: ETH, USDC, USDT, DAI, WETH. Pass any ERC-20 contract address for other tokens.
🏪 P2P Marketplace (NEW in v1.4.0)
| Tool | Description |
|:---|:---|
| create_listing | Sell anything — no merchant onboarding needed. Set title, price, currency, and your wallet address for payment. Listings expire after 30 days by default. |
| search_listings | Browse active listings by category (electronics, gifts, clothing, etc.) or keyword search. |