mcp-cha-cha
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cha-chaWhat can you recommend for a caffeine-free drink?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
侘茶點餐系統 MCP Server
以台南侘茶飲料店真實菜單為基礎的教學用 MCP Server,透過 stdio 傳輸與 LLM Client(如 Claude Desktop)溝通,完整涵蓋 MCP 三大核心概念:Tools、Resources、Prompts,並以 get_menu Tool 示範 MCP Apps 的互動式 UI 擴充。
特色
86 款飲品、11 大分類、8 種加料,資料庫首次啟動自動 seed
6 個 Tools、5 個 Resources、2 個 Prompts,一站式體驗 MCP 全功能
get_menu內建互動式菜單 UI(MCP Apps),在支援的 Host 中會直接渲染 iframeSQLite(WAL 模式)本機持久化,免額外部署資料庫
Related MCP server: Shopify MCP
技術棧
TypeScript(ESM,
NodeNextmodule resolution)@modelcontextprotocol/sdkv1.x — MCP Server SDK@modelcontextprotocol/ext-apps— MCP Apps 擴充(互動式 UI)better-sqlite3— SQLite 嵌入式資料庫zodv4 — Tool 參數 schema 驗證vite+vite-plugin-singlefile— UI 打包為單一 HTMLvitest+@vitest/coverage-v8— 測試與覆蓋率pnpm套件管理
環境需求
Node.js 22(見
.node-version)pnpm
快速開始
# 安裝依賴
pnpm install
# 開發模式(tsx 直接執行,會自動建立並 seed data/cha-cha.db)
pnpm run dev
# 打包(先打包 UI 再編譯 TypeScript)
pnpm run build
# 執行編譯後的版本
pnpm run start首次執行 pnpm run dev 或 pnpm run start 時,會自動在專案根目錄建立 data/cha-cha.db 並寫入完整菜單資料,無需手動初始化。
常用指令
指令 | 說明 |
| 安裝依賴 |
| 先打包 UI(Vite)再 |
| 僅打包 UI( |
|
|
| 執行編譯後的 |
|
|
| 執行單一測試檔 |
| 依測試名稱片段過濾 |
| 產生覆蓋率報告 |
接入 Client
Claude Desktop:見
docs/claude-desktop-guide.mdMCP Inspector(除錯用):見
docs/inspector-guide.md
# 快速用 Inspector 測試
pnpm build
npx @modelcontextprotocol/inspector node dist/index.js架構
進入點 src/index.ts 建立 McpServer 後,分別呼叫三個 register 函式注入功能:
src/
├── index.ts 進入點:建立 McpServer、註冊 Tools/Resources/Prompts、連接 stdio
├── db.ts SQLite 初始化、菜單 seed、共用查詢 helper
├── types.ts 共用型別(MenuItem、Topping、Order)與常數(甜度、冰量選項)
├── helpers.ts 菜單格式化函式
├── tools/ 6 個 Tool:查詢與操作
├── resources/ 5 個 Resource:Client 端可主動讀取的資料
└── prompts/ 2 個 Prompt:預定義提示模板資料庫檔案存放於 data/cha-cha.db(不納入版控)。
MCP Apps UI
get_menu Tool 使用 registerAppTool 加掛互動式菜單 UI,支援 MCP Apps 的 Host(如 Claude Desktop)會自動渲染 iframe。UI 原始碼在 ui/,透過 Vite 打包為 dist/ui/menu-app.html 單一檔案。
提供的功能
Tools
Tool | 說明 |
| 查詢菜單(分類、飲品、加料、甜度冰量選項),支援 MCP Apps 的 Host 會渲染互動式菜單 UI |
| 查詢訂單,可依 ID 精確查找,或依訂購人、領取狀態、日期篩選 |
| 建立訂單 |
| 標記訂單為已領取 |
| 取消尚未領取的訂單 |
| 依心情、咖啡因、預算、杯數推薦飲品 |
Resources
Resource | URI | 說明 |
|
| 所有菜單分類列表 |
|
| 指定分類的飲品清單(含價格與屬性) |
|
| 所有訂單列表 |
|
| 單筆訂單詳情 |
|
| 未領取訂單清單 |
Prompts
Prompt | 參數 | 說明 |
|
| 帶入完整菜單,推薦 3 杯飲品並說明理由 |
| 無 | 彙整目前所有訂單:每人明細、飲品統計、總金額、未領取提醒 |
業務規則
sugar_fixed = 1的飲品忽略使用者甜度參數,強制設為「固定甜度」單杯總價 = 飲品價格 + Σ(加料價格);加料有免費項目(小珍珠、波霸、混珠,price = 0)
顧客常用口語簡稱點餐(如「波霸奶綠」其實是「茉香奶綠」加「波霸」加料),呼叫
create_order前建議先用get_menu確認正確品名Tool 錯誤統一回傳
{ content: [{ type: 'text', text }], isError: true }
測試
測試檔案放在 tests/ 目錄,使用 vitest。Tool handler 邏輯抽為獨立可匯出函式(如 handleGetOrders),與 registerXxx 註冊函式分離,方便直接測試 handler 而不需啟動 MCP Server。
覆蓋率設定於 vitest.config.ts,目前 coverage.include 限定在 src/tools/get-orders.ts,新增其他模組測試時需同步調整。
pnpm test規格文件
spec/spec.md— 完整技術規格書(SSOT:資料庫 schema、MCP 功能設計、菜單資料)spec/change/— 變更請求(CR-001 ~ CR-004)及對應任務清單
授權
ISC
Available Tools
6 toolscancel_orderA
取消訂單(僅限尚未領取的訂單)
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | 訂單 ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It reveals the precondition about unpicked orders but does not state that cancellation is likely destructive/irreversible, what state the order enters, or any permission/authorization requirements. For a mutating tool, this is a notable gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single compact sentence with the key constraint placed in parentheses. It contains no filler and every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and the schema fully documents the only parameter, but with no annotations and no output schema the description does not explain the mutation's effects or possible error conditions. It is sufficient for tool selection, but leaves some behavioral context for the agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, order_id, is already fully documented in the schema with 100% coverage. The description adds no additional meaning about the parameter, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action '取消' (cancel) and the target '訂單' (order), and adds a scope constraint ('僅限尚未領取的訂單'). This distinguishes it well from sibling tools like create_order, pickup_order, and the read-only listing tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says the tool only applies to orders that have not yet been picked up, which is a clear usage condition. It does not name an alternative for already-picked-up orders, so it stops just short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_orderA
建立一筆侘茶飲料訂單。注意:顧客常用口語簡稱點餐(如「波霸奶綠」其實是「茉香奶綠」加「波霸」加料),請先用 get_menu 查詢菜單確認正確品名,再將飲品與加料分開填入。
| Name | Required | Description | Default |
|---|---|---|---|
| ice | No | 冰量 | 正常冰 |
| note | No | 備註 | |
| sugar | No | 甜度(甜度固定的飲品會自動忽略此參數) | 正常糖 |
| quantity | No | 數量 | |
| toppings | No | 加料名稱陣列,如 ["小珍珠", "椰果"] | |
| item_name | Yes | 飲品名稱(需與菜單完全一致)。若顧客使用口語簡稱,請先用 get_menu 查詢正確品名。例如「波霸奶綠」應拆為 item_name=「茉香奶綠」搭配 toppings=[「波霸」] | |
| person_name | Yes | 訂購人姓名 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It goes beyond a simple 'create order' statement by revealing that item_name must exactly match the menu, that colloquial terms are not automatically resolved, and that drink and topping components must be separated. It could mention side effects or error behavior, but the key operational caveats are clearly surfaced.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: the first clause states the purpose, and the second sentence delivers the most important usage warning. Every sentence earns its place, with no filler or repetition of schema details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a create operation with 7 parameters, 100% schema coverage, and no output schema, the description is nearly complete. It covers the critical domain-specific pitfall (colloquial abbreviations), the prerequisite get_menu call, and the expected field separation. It does not describe validation behavior or return values, but those are not essential for an agent to invoke the tool correctly in the given context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds meaningful value by giving a concrete example: '波霸奶綠' should be split into item_name='茉香奶綠' with toppings=['波霸']. This clarifies the relationship between item_name and toppings beyond the schema's individual descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: it establishes a Wucha beverage order. It also clearly distinguishes itself from sibling tools by focusing on order creation, while pickup_order, cancel_order, get_menu, and get_orders cover other actions. The domain-specific note about colloquial abbreviations reinforces its purpose without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear workflow guidance: when customers use spoken abbreviations, call get_menu first to confirm the exact item name, then fill in drink and toppings separately. It does not explicitly state when not to use this tool or compare it directly with pickup/cancel, but the context is strong enough for an agent to choose it appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_ordersA
查詢訂單。可依訂單 ID 精確查找單筆訂單,或依訂購人、領取狀態、日期等條件篩選。無參數時回傳全部訂單。
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | 依日期篩選,格式為 YYYY-MM-DD,例如 2026-03-19 | |
| order_id | No | 指定訂單 ID,查詢單筆訂單詳情(有值時忽略其他篩選參數) | |
| picked_up | No | 篩選領取狀態:true 已領取、false 未領取 | |
| person_name | No | 依訂購人姓名篩選 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden. The verb '查詢' indicates a read-only operation, and it explicitly discloses that no parameters returns all orders and that order_id overrides other filters. It does not mention auth, rate limits, or output format, but these are less critical for a simple query tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short, information-dense sentences. It front-loads the action and resource, then lists usage modes without any filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity, fully described parameters, and clear sibling differentiation, the description covers all invocation modes: exact ID, filters, and no-parameter listing. The absence of return-value details or pagination behavior is a minor gap but does not hinder correct selection or invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all four parameters are already documented in the input schema. The description only summarizes the filter options and does not add meaningful per-parameter semantics beyond the schema, yielding the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with the specific verb-resource pair '查詢訂單' (query orders) and clearly distinguishes exact-ID lookup from filtered listing. This is clearly distinct from the sibling mutation tools (create_order, pickup_order, cancel_order) and other resources (get_menu, recommend_drinks).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage contexts: exact order ID, filtering by purchaser/pickup status/date, and a no-parameter fallback that returns all orders. It does not explicitly state 'use X instead for mutations,' but the sibling tool names make those exclusions obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pickup_orderB
標記訂單為已領取
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | 訂單 ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of explaining behavior. It states the core state transition but does not disclose side effects, whether the operation is idempotent, what happens if the order is already picked up, or any authorization requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with no filler. The verb and the object are front-loaded, making the purpose immediately clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a state-changing tool with no annotations and no output schema, the description is too thin. It provides no information about required preconditions, error cases, or the response after a successful pickup, leaving important operational context to speculation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the only parameter, order_id, is documented as '訂單 ID'. The description adds no additional meaning beyond the schema, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description, '標記訂單為已領取' ('Mark order as picked up'), states a specific verb (mark) and resource (order) with a clear resulting state. It is naturally distinct from siblings like create_order, cancel_order, and get_orders.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance about when to use this tool versus create_order, cancel_order, or get_orders. Prerequisites such as the order needing to exist or be in a certain status are not mentioned, so the agent has to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
recommend_drinksA
根據偏好推薦侘茶飲品
| Name | Required | Description | Default |
|---|---|---|---|
| mood | No | 心情或偏好描述,如「想喝清爽的」、「不要咖啡因」 | |
| count | No | 推薦杯數 | |
| max_price | No | 預算上限(元) | |
| caffeine_free | No | 是否限定無咖啡因飲品 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It does convey the core behavior: recommendations are based on user preferences. Still, it does not mention whether this is a read-only tool, whether it respects all constraints, or what happens when no matching drinks exist, which are relevant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no filler or redundancy. Every word contributes to identifying the tool's purpose and preference-based behavior, making it appropriately concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only recommendation tool with fully documented optional parameters, the description is minimally sufficient for invocation. However, it lacks explicit guidance on when to prefer it over get_menu, does not describe the output format, and has no annotation support, so it is not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters like mood, count, max_price, and caffeine_free are already well documented with defaults and meaning. The description only adds the general 'based on preferences' idea and does not deepen parameter understanding, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: '根據偏好推薦侘茶飲品' clearly means 'recommend wabi-cha drinks based on preferences.' It is distinct from the sibling tools such as get_menu, create_order, or cancel_order, because it is explicitly about preference-driven recommendations rather than menu retrieval or order management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied: the tool is for recommending drinks when the user expresses a preference like '想喝清爽的' or '不要咖啡因'. However, the description does not explicitly state when not to use it or name alternatives like get_menu for browsing the full menu, so the routing decision is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v1.0.0- First observed
cancel_order - First observed
create_order - First observed
get_menu - First observed
get_orders - First observed
pickup_order - First observed
recommend_drinks
TDQS
Each tool targets a distinct action: menu browsing, recommendations, order creation, order query, pickup, and cancellation. There is no meaningful overlap; get_menu and recommend_drinks serve different selection purposes.
Most tool names follow a clear lower_snake_case verb_noun pattern (create_order, get_menu, cancel_order). pickup_order is a slight deviation since 'pickup' is used as a verb-like noun, but it remains readable and consistent in style.
Six tools is well-scoped for a focused beverage-ordering server. Each tool covers a necessary part of the workflow without redundancy.
The core ordering lifecycle is covered: menu lookup, recommendation, create, query, cancel, and pickup. A minor gap is the lack of an order update/modify tool for changing items before pickup.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Run your restaurant from an AI client: orders, menu, reports, refunds, payouts and staff.
Manage your NanoCart store from any AI agent: products, orders, coupons, subscribers, reports.
Hosted storefront backend for AI agents: products, cart, Stripe + PayPal, delivery, order tracking.
Manage products, orders, customers, inventory, and store configuration
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables menu browsing, recommendation requests, and shopping cart management through a Model Context Protocol interface. Users can interact with food order services to query items and handle order additions or removals via natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables natural language management of Shopify stores, including orders, customers, products, and inventory, with support for multiple stores and both static and OAuth authentication.MIT
- FlicenseNot gradedqualityBmaintenanceEnables coffee shop order management via MCP, including menu lookup, order creation, and status tracking.-
- FlicenseAqualityBmaintenanceAn MCP server for ordering tea from Licas Tea, allowing AI to find stores, view menus, build orders, and estimate prices in conversation. Currently read-only: no real orders or payments.4-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danny-sbr/mcp-cha-cha'
If you have feedback or need assistance with the MCP directory API, please join our Discord server