kiotviet-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KIOTVIET_MCP_DEMO | No | Set to '1' to run with the built-in demo shop (no credentials needed) | |
| KIOTVIET_RETAILER | No | KiotViet retailer code (required for real shop access) | |
| KIOTVIET_BRANCH_ID | No | Optional branch ID, used for purchase orders | |
| KIOTVIET_CLIENT_ID | No | KiotViet client ID (required for real shop access) | |
| KIOTVIET_MCP_TOKEN | No | Bearer token for HTTP mode (required when using --http) | |
| KIOTVIET_CLIENT_SECRET | No | KiotViet client secret (required for real shop access) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_low_stockA | Products at or below their KiotViet minimum stock (minQuantity), most urgent first by days of cover. |
| get_stock_levelA | On-hand quantity and days of cover for a product by name, product code or barcode. Asks which one if several match. |
| get_sales_summaryA | Revenue and units for today, yesterday, the last 7 days or the last 28 days, compared with the previous equal period (same weekday last week for single days). |
| get_top_moversB | Top or bottom products by units sold over the last N days. |
| suggest_reorderA | What to reorder now: items at/below minimum. Quantity = (lead time 2 + 7 days) x 14-day average daily sales - on hand. Read-only. |
| create_purchase_order_draftA | Drafts a KiotViet purchase order from the current suggestions (or the given product codes) and returns a confirmation_token valid for 5 minutes. Nothing is sent to KiotViet until confirm_purchase_order is called after the user says yes. |
| confirm_purchase_orderA | Sends the drafted purchase order to KiotViet (POST /purchaseorders). Requires the confirmation_token from create_purchase_order_draft; expires after 5 minutes. Call only after the user explicitly confirms. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| shop-profile |
TDQS
Scored across 7 tools
Most tools are clearly distinct, but get_low_stock and suggest_reorder both surface items at or below minimum stock, which could cause some confusion. The descriptions clarify that one is a status report while the other provides specific reorder quantities, so the boundary is workable.
All tool names follow a consistent verb_noun pattern: get_*, suggest_reorder, create_purchase_order_draft, confirm_purchase_order. The naming clearly communicates the action and object, with no mixed conventions or vague verbs.
Seven tools is well-scoped for a KiotViet inventory and purchasing assistant. Each tool covers a meaningful step in the workflow from stock and sales visibility to reorder suggestions and purchase order confirmation.
The tool set covers the core inventory, sales, and purchase-order workflow end to end, including the important two-phase draft/confirm purchase order flow. Minor gaps exist, such as no ability to list or cancel existing purchase orders or adjust stock, but these do not break the primary use case.