Sponsored by Deepsite.site

Hou Tea — Buy Chinese tea via x402 USDC

Created By
jackrain1974319 days ago
The first Model Context Protocol server that lets AI agents browse, recommend, compare, and BUY real physical products with USDC stablecoin via the x402 protocol. Wraps hou-tea.com (a Chinese tea store) with 8 agent-native tools: • hou_tea_browse — paginated catalog • hou_tea_recommend — personalized picks (occasion, budget, taste, gift-for) • hou_tea_explain — deep dive on one product (flavor, terroir, brewing) • hou_tea_compare — side-by-side comparison • hou_tea_filter_by_health — sleep/pregnancy/caffeine constraints • hou_tea_get_payment_requirements — emit x402 payment intent • hou_tea_check_order — poll order/payment status • hou_tea_agent_card — discovery metadata Payment is delegated to an x402-capable wallet MCP (e.g. @coinbase/payments-mcp). This server never holds keys or signs transactions — it only emits the payment requirements and verifies on-chain settlement. Works out of the box with Claude Desktop, Cursor, Cline, Continue, Zed.
Overview

@hou-tea/mcp-server

Agent-app MCP server for hou-tea.com — let your AI agent browse, recommend, and buy authentic Chinese tea with USDC via the x402 protocol.

Designed for Claude Desktop, Cursor, Cline, Continue, Zed, and any Model Context Protocol compatible AI agent.

v0.2.0-beta — server now ships as an agent app layer, not just a tool list: progressive tool discovery (core + extended), strict JSON Schemas, structured response/error envelopes (ok, data, error, next_action, meta.request_id), stable error codes, and explicit hand-off hints to wallet MCPs. See What changed in 0.2.0 below.


What it does

Exposes the hou-tea agent API as MCP tools so your AI assistant can shop on your behalf.

Default tools/list (core + meta) — always visible:

ToolWhat it does
hou_tea_browseList tea catalog with filters (category, price, season, difficulty)
hou_tea_recommendNatural-language recommendations: "warming tea for cold winter nights"
hou_tea_explainDeep dive on one product: brewing guide, story, health info
hou_tea_get_payment_requirementsInitiate x402 payment intent (returns recipient + amount; auto register_buyer_list_token / buyer_list_token for buyer order history)
hou_tea_check_orderPoll order status after payment
hou_tea_list_my_ordersList your x402 orders by buyer_list_token (Bearer; uses HOU_TEA_BUYER_LIST_TOKEN env)
hou_tea_discover_extendedReveal extended tools (compare / health-filter / agent-card) on demand

Extended (revealed after hou_tea_discover_extended):

ToolWhat it does
hou_tea_compareSide-by-side comparison of 2–4 candidates
hou_tea_filter_by_healthFilter by conditions: pregnant, insomnia, caffeine sensitive
hou_tea_agent_cardFetch full agent capability descriptor (diagnostics)

Payment is handled by an x402-capable wallet MCP (e.g. @coinbase/payments-mcp) — this server only emits payment intents, it never holds keys or signs transactions.


Install

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "hou-tea": {
      "command": "npx",
      "args": ["-y", "@hou-tea/mcp-server"]
    },
    "coinbase-payments": {
      "command": "npx",
      "args": ["-y", "@coinbase/payments-mcp"],
      "env": {
        "EVM_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Restart Claude Desktop. You should see "hou-tea" listed under tools.

Cursor

Add to ~/.cursor/mcp.json or <project>/.cursor/mcp.json:

{
  "mcpServers": {
    "hou-tea": {
      "command": "npx",
      "args": ["-y", "@hou-tea/mcp-server"]
    }
  }
}

Cline / Continue / Zed

Same npx -y @hou-tea/mcp-server invocation in their MCP config.


Try it

After install, ask your agent:

"Recommend a warming tea for winter nights, around $30."

The agent will call hou_tea_recommend, return real products with prices and brewing notes, then offer to buy.

"I'll take the first one."

The agent calls hou_tea_get_payment_requirements, gets back a 402 with the merchant's Base-chain USDC address and amount, plus a buy_request_body field (includes register_buyer_list_token or your saved buyer_list_token). The retry POST to /pay/api/v1/buy after paying must use that exact JSON body plus the X-Payment header — otherwise buyer grouping breaks. If you've also installed @coinbase/payments-mcp with a funded wallet, configure it to forward the same body. After the first successful purchase, copy buyer_list_token from the JSON response into MCP env HOU_TEA_BUYER_LIST_TOKEN so hou_tea_list_my_orders and future checkouts stay under one identity.


Configuration

All settings via environment variables (optional):

Env varDefaultPurpose
HOU_TEA_API_BASEhttps://hou-tea.comOverride API host (e.g. for staging).
HOU_TEA_PAY_BASEhttps://hou-tea.com/payOverride x402 middleware host.
HOU_TEA_STORE_IDfengshuiDefault store_id.
HOU_TEA_AGENT_KEY(none)Optional X-Agent-Key for higher rate limits / private skills. Contact support@hou-tea.com.
HOU_TEA_BUYER_LIST_TOKEN(none)After first successful /buy, paste the buyer_list_token from the response. Future hou_tea_get_payment_requirements calls send this as buyer_list_token; enables hou_tea_list_my_orders.
HOU_TEA_AUTO_REGISTER_BUYER_LIST_TOKENtrueSet to false to stop sending register_buyer_list_token / buyer_list_token on /buy (legacy behavior).

Most users need none of these — the public catalog and x402 buy endpoint are open. For buyer order history, set HOU_TEA_BUYER_LIST_TOKEN once you have it from a confirmed purchase.


Architecture

┌─────────────────┐         ┌────────────────────┐
│ Claude / Cursor │         │  hou-tea.com       │
│                 │  HTTPS  │  /api/agent/*      │
│ ┌─────────────┐ │ ──────► │  (catalog/         │
│ │ hou-tea MCP │ │ ◄────── │   recommend/etc.)  │
│ └─────────────┘ │         └────────────────────┘
│                 │
│ ┌─────────────┐ │  HTTPS  ┌────────────────────┐
│ │ payments MCP│ │ ──────► │ /pay/api/v1/buy    │
│ │ (Coinbase)  │ │ ◄ 402 ─ │ x402-middleware    │
│ └─────────────┘ │         │                    │
│       │         │  Base   │   verifies on-     │
│       └─────────┼──────►──┤   chain tx, marks  │
│   USDC transfer │  chain  │   order confirmed  │
└─────────────────┘         └────────────────────┘

Build from source

git clone https://github.com/hou-tea/hou-tea-mcp-server.git
cd hou-tea-mcp-server
npm install
npm run build
node dist/index.js          # speaks MCP over stdio

npm run test:unit           # offline unit tests (envelope + registry)
npm run test:smoke          # live HTTP smoke (hits hou-tea.com)
npm run test:mcp            # full MCP stdio smoke (build + spawn)

What changed in 0.2.0-beta

Anthropic's Skills + MCP guidance pushes MCP servers from "a flat list of tools" toward an agent app layer: progressive discovery, strict schemas, program-friendly responses, and explicit hand-off to other MCPs. This release brings that posture to @hou-tea/mcp-server:

  1. Progressive tool discovery. Default tools/list returns 6 core tools

    • hou_tea_discover_extended. Extended tools (hou_tea_compare, hou_tea_filter_by_health, hou_tea_agent_card) are revealed on demand. Calling an extended tool before discovery returns a structured error:
    { "ok": false,
      "error": { "code": "extended_not_revealed",
                 "retryable": true,
                 "hint": "Call hou_tea_discover_extended …" } }
    
  2. Structured envelope on every call.

    {
      "ok": true,
      "data": { /* tool payload */ },
      "next_action": [
        { "tool": "hou_tea_explain", "reason": "...", "args_hint": { "skill_id": "..." } }
      ],
      "meta": { "request_id": "req_…", "tool": "hou_tea_recommend",
                "took_ms": 412, "server_version": "0.2.0-beta.0" }
    }
    

    Errors share the same envelope with ok: false and a stable error.code (bad_request, unauthorized, not_found, conflict, timeout, rate_limited, server_error, network_error, missing_buyer_list_token, extended_not_revealed, unknown_tool, internal_error). Each error also carries retryable and a hint.

  3. Strict JSON Schema. Every inputSchema sets additionalProperties: false, with required, enum, pattern, minItems / maxItems etc. — so agent-side validators can rely on it.

  4. Hand-off hints to wallet MCP. hou_tea_get_payment_requirements returns the 402 buy_request_body plus a next_action block that points the agent to an x402 wallet MCP (e.g. @coinbase/payments-mcp) and then back to hou_tea_check_order.

  5. Traceability. Every response carries meta.request_id so you can include it in support tickets / logs.

This is a next-tagged beta; install with:

npm i @hou-tea/mcp-server@next
# or, in MCP config: "args": ["-y", "@hou-tea/mcp-server@next"]

The 0.1.x line keeps working — tool names are unchanged, only the result shape and the default tools/list size are different.


Why this exists

Chinese tea has 1500+ years of cultural depth and a global market larger than coffee. But until now, AI agents either (a) hallucinated product names from training data, or (b) failed to scrape JavaScript-rendered storefronts. This MCP gives agents a direct, authoritative, agent-native path to a real catalog with real prices and real on-chain settlement.

If you're building an AI shopping agent, a tea recommendation app, or just want your Claude to be able to actually buy you tea — this is for you.


License

MIT © hou-tea

Server Config

{
  "mcpServers": {
    "hou-tea": {
      "command": "npx",
      "args": [
        "-y",
        "@hou-tea/mcp-server"
      ],
      "env": {
        "HOU_TEA_AGENT_KEY": "optional-leave-empty-for-public-catalog"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.