Skip to main content
Glama
licha-order-mcp
by lichadecha

licha-order-mcp

Li Cha's Tea · Qimai Ordering MCP Server. Lets AI find stores, browse menus, and build orders with pricing in conversation; when ordering is enabled it can also place real orders for customers, with payment always completed by the customer themselves in the Li Cha mini program.

Default install = read-only: without the switch, it behaves exactly like phase one — no orders are created, no money is touched, and no business data is read.

How users use it

Say to your AI:

I want Li Cha's Tea, pull it from GitHub: lichadecha/licha-order-mcp

Once installed, just ask "what milk teas do you have" or "which store is closest to me". Currently only dine-in (in-store / takeout) is supported.

First time drinking and don't know what to pick? Just ask "any recommendations". If you want the AI to figure out which store is closest, you can also give it an AMap MCP (optional).

Related MCP server: @striderlabs/mcp-starbucks

Installation instructions for AI agents (follow when a user asks you to pull this repo)

  1. Merge the following into your MCP config (mcpServers):

"licha-order-mcp": {
  "command": "npx",
  "args": ["-y", "github:lichadecha/licha-order-mcp#v0.5.1"]
}
  1. Install the SKILL.md from the repo root into your skills/instructions directory (when the client supports skills).

  2. Restart or reload MCP as required by your client.

  3. Tell the user it's installed, and start serving per the rules in SKILL.md (first sentence states: dine-in only, in-store/takeout).

Requires Node ≥ 18; auto-builds on first run (prepare → tsc). If npx isn't found, use the absolute path under the Node installation directory.

The four tools (read-only by default)

Tool

Purpose

find_store

Find stores by name/mall/city, returns storeId, business status, business hours

get_menu

View menu: no keyword returns categories, with keyword returns product list

get_item_detail

Order card: specs, preparation (temperature/sugar), add-ons, whether sold out

preview_order

Build an order and estimate total price (local accumulation; actual amount per store register/order)

Setting the environment variable LICHA_ENABLE_ORDERING=1 additionally registers 5 ordering tools (bind_member / prepare_order / place_order / get_order_status / my_orders); security constraints are in the "Security boundary" section below.

Installation (WorkBuddy / any MCP client)

mcpServers config:

{
  "mcpServers": {
    "licha-order-mcp": {
      "command": "npx",
      "args": ["-y", "github:lichadecha/licha-order-mcp#v0.5.1"]
    }
  }
}

The install command is pinned to a version tag (#v0.5.1) and does not track the latest commit; when upgrading, use the tag given in the new README.

Requires Node ≥ 18; auto-builds on first install (prepare hook runs tsc).

Credential prerequisites (authorized machines only)

This service reads Qimai Open Platform credentials from the local machine; credentials never enter this repo, config, or logs:

  • macOS keychain: the openKey of the qmai-cli entry (auto-unsealed)

  • ~/.config/qmai/config.yaml: openId / grantCode of the active profile

Environment variable overrides are also supported: QMAI_OPEN_KEY / QMAI_OPEN_ID / QMAI_GRANT_CODE. When credentials are missing, tool calls report "incomplete credentials"; the service itself starts normally.

Security boundary

  • No write tools are registered by default (only with LICHA_ENABLE_ORDERING=1); when disabled, tools/list shows only the 4 read-only tools and the write path is physically unreachable.

  • When enabled, the write whitelist is hardcoded to exactly 1 entry (create order); anything outside the whitelist is physically cut off.

  • Ordering requires two-phase confirmation: the AI reads the pending order to the customer → customer confirms → then it is submitted; order parameters are assembled and registered server-side, and the AI only holds a 5-minute one-time token and cannot alter the order contents.

  • Hard guardrails: single order ≤¥100, per-customer ≤5 orders/day, global ≤10 orders/day; never pays on behalf of the customer — payment is always completed by the customer in the Li Cha mini program.

  • Three separate audit logs (read/write/access), with only the last digits of identifying values retained.

  • Outputs only project public fields (store name/address/business status/product price); business fields such as store manager contact info and costs are never output.

Re-verification

npm install
npm run smoke:mcp
npm run smoke

The smoke series also includes smoke:store / smoke:menu / smoke:detail / smoke:order. Smoke tests hit real read-only interfaces (base tier ¥0.1 per 100 calls, within the 100k calls/month free quota; a single re-verification uses no more than 30 calls).

License

The code portions (src/, scripts/, test/, config files) are licensed under Apache-2.0; the text portions (SKILL.md, README, and other documentation) are licensed under CC BY-ND 4.0. The "Li Cha's Tea" name and logo belong to the brand owner and are not covered by any license. See LICENSE for details.

Available Tools

4 tools
find_store找店A

按店名、商场名或城市找李茶的茶门店,返回 storeId(看菜单/点单都要用)、营业状态;唯一命中时附营业时间。点单第一步先找店。

Inputs: query (required).

get_item_detail点单卡片B

看商品点单详情:规格(SKU)、做法(温度/糖度等)、加料、是否估清。goodsId 从 get_menu 结果里取。

Inputs: goodsId (required), storeId (required).

get_menu逛菜单A

看某店菜单:不传 keyword 返回全部分类;传 keyword(商品名或分类名)返回商品列表(goodsId、价格、标签)。

Inputs: storeId (required), keyword.

preview_order算总价A

组单算预估总价(本地累加;实际金额以门店收银台/订单为准)。同组做法(如温度)只能选一个,估清商品会拦截。

Inputs: items (required), storeId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: finding stores, getting menu, item details, and order preview. No overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (find_store, get_menu, get_item_detail, preview_order).

    Tool Count5/5

    4 tools is well-scoped for a tea ordering server, covering the core workflow without unnecessary complexity.

    Completeness5/5

    The tools cover the full user journey from finding a store to previewing an order with item details, leaving no dead ends for its stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI assistants to order food from TGO Yemek by browsing restaurants, managing carts, and completing checkouts. It allows users to handle address selection and order tracking directly through natural language interactions.
      9 npm
      12
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      MCP server for 一沐日 beverage ordering, enabling users to query menus, place, list, update, delete, and analyze duplicate drink orders through natural language.
      10
      -