Skip to main content
Glama
@salbot/kiotviet-mcp-server

@salbot/kiotviet-mcp-server

by SalBot-Labs

@salbot/kiotviet-mcp-server

MCP server độc lập cho KiotViet Retail và FnB, gồm 71 công cụ Retail hoặc 17 công cụ FnB. Kết nối qua stdio với MCP SDK chính thức. Yêu cầu Node.js 22+.

Cài và build bằng pnpm install && pnpm build; cấu hình MCP host chạy node với đường dẫn tuyệt đối tới dist/cli.js. Truyền thông tin kết nối qua env của host.

  • Bật Public API trong thiết lập gian hàng KiotViet để lấy Client ID và Client Secret. Xem hướng dẫn Retail hoặc FnB.

  • Đặt KIOTVIET_RETAILER là tên gian hàng trước .kiotviet.vn, KIOTVIET_EDITION là retail hoặc fnb, cùng KIOTVIET_CLIENT_ID và KIOTVIET_CLIENT_SECRET. Server tự lấy và gia hạn token.

  • Nếu đã có bearer token, dùng KIOTVIET_ACCESS_TOKEN thay cho cặp Client ID/Secret; khi token hết hạn cần cập nhật và khởi động lại. Mỗi kết nối dùng một gian hàng.

Phát triển bởi Toan Doan — toandev.95@gmail.com.

Available Tools

71 tools
kiotviet_create_customerA

Create one customer in the connected store. Resolve referenced IDs and read current data first. This changes live business data; after an ambiguous failure, reconcile before creating again.

Inputs: data (required).

kiotviet_create_invoiceB

Create one invoice in the connected store. Resolve referenced IDs and read current data first. This changes live business data; after an ambiguous failure, reconcile before creating again.

Inputs: data (required).

kiotviet_create_invoice_paymentA

Record money actually received against an existing invoice. Read its outstanding debt and bank account before posting. This is a financial write, not a payment request to the customer.

Inputs: data (required).

kiotviet_create_orderB

Create one order in the connected store. Resolve referenced IDs and read current data first. This changes live business data; after an ambiguous failure, reconcile before creating again.

Inputs: data (required).

kiotviet_create_productA

Create one product in the connected store. Resolve referenced IDs and read current data first. This changes live business data; after an ambiguous failure, reconcile before creating again.

Inputs: data (required).

kiotviet_create_purchase_orderA

Create one purchase order in the connected store. Resolve referenced IDs and read current data first. This changes live business data; after an ambiguous failure, reconcile before creating again.

Inputs: data (required).

kiotviet_create_transferA

Create one transfer in the connected store. Resolve referenced IDs and read current data first. This changes live business data; after an ambiguous failure, reconcile before creating again.

Inputs: data (required).

kiotviet_delete_categoryA
Destructive

Delete this category by ID. Read and verify the exact record and the user's deletion intent before calling. Business constraints may reject deletion.

Inputs: id (required).

kiotviet_delete_customerA
Destructive

Delete this customer by ID. Read and verify the exact record and the user's deletion intent before calling. Business constraints may reject deletion.

Inputs: id (required).

kiotviet_delete_invoiceB
Destructive

Delete an invoice. Explicitly choose whether to cancel its attached payments; this changes sales and accounting records.

Inputs: id (required), isVoidPayment (required).

kiotviet_delete_orderB
Destructive

Delete a sales order. IsVoidPayment explicitly controls whether attached payments are cancelled.

Inputs: id (required), IsVoidPayment (required).

kiotviet_delete_productA
Destructive

Delete this product by ID. Read and verify the exact record and the user's deletion intent before calling. Business constraints may reject deletion.

Inputs: id (required).

kiotviet_delete_purchase_orderC
Destructive

Delete a goods receipt/purchase document. Explicitly choose whether to cancel attached payments.

Inputs: id (required), IsVoidPayment (required).

kiotviet_delete_transferA
Destructive

Delete this transfer by ID. Read and verify the exact record and the user's deletion intent before calling. Business constraints may reject deletion.

Inputs: id (required).

kiotviet_generate_payment_qrA

Generate payment QR for an exact amount and receiving account. Each call can create a new QR even with the same orderCode. Generating a QR does not prove payment; use get_qr_status afterward.

Inputs: data (required).

kiotviet_get_categoryB
Read-onlyIdempotent

Read one product category by categoryId.

Inputs: id (required).

kiotviet_get_customerB
Read-onlyIdempotent

Read one customer and their returned debt, contact and group information.

Inputs: id (required).

kiotviet_get_customer_by_codeA
Read-onlyIdempotent

Read one customer by exact customer code.

Inputs: code (required).

kiotviet_get_invoiceB
Read-onlyIdempotent

Read one sales invoice with product lines and payment details.

Inputs: id (required).

kiotviet_get_invoice_by_codeA
Read-onlyIdempotent

Read one sales invoice by exact invoice code.

Inputs: code (required).

kiotviet_get_orderB
Read-onlyIdempotent

Read one sales order including lines, payments and delivery.

Inputs: id (required).

kiotviet_get_order_by_codeB
Read-onlyIdempotent

Read one sales order by exact order code.

Inputs: code (required).

kiotviet_get_pricebookC
Read-onlyIdempotent

Read product prices in one price book, with pagination.

Inputs: id (required), pageSize, productIds, currentItem, +1 more.

kiotviet_get_productB
Read-onlyIdempotent

Read one product by its KiotViet ID, including returned variants, units and inventory.

Inputs: id (required).

kiotviet_get_product_by_codeA
Read-onlyIdempotent

Read a product by its exact business code, not its name or ID.

Inputs: code (required).

kiotviet_get_purchase_orderC
Read-onlyIdempotent

Read a goods receipt/purchase document by ID.

Inputs: id (required).

kiotviet_get_qr_statusA
Read-onlyIdempotent

Read received payment notifications for one QR. This is not a direct bank query; report PENDING/PARTIAL/PAID as returned.

Inputs: qrId (required).

kiotviet_get_returnB
Read-onlyIdempotent

Read one customer return document by ID.

Inputs: id (required).

kiotviet_get_return_by_codeA
Read-onlyIdempotent

Read one customer return document by exact code.

Inputs: code (required).

kiotviet_get_settingsA
Read-onlyIdempotent

Read store settings, including applicable sales and tax configuration. This does not modify settings.

Inputs: no named parameters.

kiotviet_get_storeA
Read-onlyIdempotent

Read the connected store and API edition without exposing credentials.

Inputs: no named parameters. Returns: edition, retailer

kiotviet_get_supplierB
Read-onlyIdempotent

Read a supplier by ID, including returned debt information.

Inputs: id (required).

kiotviet_get_supplier_by_codeB
Read-onlyIdempotent

Read a supplier by exact supplier code.

Inputs: code (required).

kiotviet_get_supplier_orderC
Read-onlyIdempotent

Read one supplier purchase reservation.

Inputs: id (required).

kiotviet_get_transferB
Read-onlyIdempotent

Read one inter-branch transfer and its product quantities.

Inputs: id (required).

kiotviet_get_webhookA
Read-onlyIdempotent

Read one webhook registration; does not register a receiver.

Inputs: id (required).

kiotviet_list_bank_accountsA
Read-onlyIdempotent

Read bank accounts available to the store; use their IDs for Card/Transfer payments.

Inputs: branchId, pageSize, currentItem.

kiotviet_list_branchesB
Read-onlyIdempotent

Read available branches and IDs before filtering stock or creating transactions. This tool does not create or change branches.

Inputs: orderBy, pageSize, currentItem, orderDirection, +2 more.

kiotviet_list_cashflowC
Read-onlyIdempotent

Read receipts/payments by date, branch and partner. Cash movement is not equivalent to sales revenue.

Inputs: code, method, status, endDate, +8 more.

kiotviet_list_categoriesC
Read-onlyIdempotent

Read product categories, optionally as a hierarchy.

Inputs: orderBy, pageSize, currentItem, orderDirection, +2 more.

kiotviet_list_customer_groupsB
Read-onlyIdempotent

Read customer groups before assigning groupIds.

Inputs: orderBy, pageSize, currentItem, orderDirection, +1 more.

kiotviet_list_customersB
Read-onlyIdempotent

Find customers by name, exact code or phone; optionally include totals and customer groups.

Inputs: code, name, groupId, orderBy, +8 more.

kiotviet_list_inventoryC
Read-onlyIdempotent

Read stock across branches. Distinguish onHand, reserved and available; do not infer availability from product price.

Inputs: pageSize, branchIds, currentItem, lastModifiedFrom.

kiotviet_list_invoicesA
Read-onlyIdempotent

Read sales invoices by transaction date, branch/customer/status. For revenue, paginate the whole period and account for cancelled invoices, returns and discounts; totalPayment is money received, not revenue.

Inputs: status, toDate, orderBy, orderId, +13 more.

kiotviet_list_locationsC
Read-onlyIdempotent

Read configured geographic locations for addresses.

Inputs: pageSize, parentId, currentItem.

kiotviet_list_ordersB
Read-onlyIdempotent

Read sales reservations/orders, not completed sales revenue. Use returned statusValue and read details before changing an order.

Inputs: status, toDate, orderBy, pageSize, +9 more.

kiotviet_list_pricebooksB
Read-onlyIdempotent

Read price books and applicability to branches, users and customer groups.

Inputs: orderBy, pageSize, currentItem, orderDirection, +4 more.

kiotviet_list_product_attributesA
Read-onlyIdempotent

Read product attribute names and values used by variants.

Inputs: no named parameters.

kiotviet_list_productsA
Read-onlyIdempotent

Find products by name/code/category, with optional inventory, serials and batch expiry. Returns one page; currentItem is a record offset.

Inputs: code, name, orderBy, isActive, +12 more.

kiotviet_list_purchase_ordersC
Read-onlyIdempotent

Read goods receipt/purchase documents, distinct from supplier purchase reservations.

Inputs: status, orderBy, pageSize, branchIds, +8 more.

kiotviet_list_qr_accountsB
Read-onlyIdempotent

Read payment QR receiving accounts and KFin registration. Choose an applicable account/branch before generating QR.

Inputs: branchId, isRegisterQrNoti.

kiotviet_list_returnsB
Read-onlyIdempotent

Read customer return documents. Include these when calculating net sales; do not treat a return as a new sale.

Inputs: status, toDate, orderBy, pageSize, +10 more.

kiotviet_list_sales_channelsC
Read-onlyIdempotent

Read sales channels used by transactions.

Inputs: pageSize, currentItem.

kiotviet_list_supplier_ordersC
Read-onlyIdempotent

Read purchase reservations placed with suppliers, distinct from purchaseorders goods receipts.

Inputs: status, orderBy, pageSize, branchIds, +4 more.

kiotviet_list_suppliersC
Read-onlyIdempotent

Find suppliers by code or name. Public API tools here only read supplier records.

Inputs: code, name, orderBy, pageSize, +4 more.

kiotviet_list_surchargesC
Read-onlyIdempotent

Read configured surcharges before applying them to a sale.

Inputs: orderBy, branchId, pageSize, currentItem, +2 more.

kiotviet_list_taxesA
Read-onlyIdempotent

Read currently supported taxes. Select taxes matching this store's tax method instead of guessing IDs.

Inputs: no named parameters.

kiotviet_list_trademarksC
Read-onlyIdempotent

Read product brands/trademarks.

Inputs: orderBy, pageSize, currentItem, orderDirection, +1 more.

kiotviet_list_transfersC
Read-onlyIdempotent

Read inter-branch transfers and their received/transferred states.

Inputs: status, pageSize, currentItem, toBranchIds, +5 more.

kiotviet_list_usersB
Read-onlyIdempotent

Read store users and IDs for soldById and related transaction fields; does not grant user permissions.

Inputs: orderBy, pageSize, currentItem, orderDirection, +1 more.

kiotviet_list_voucher_campaignsC
Read-onlyIdempotent

Read voucher issuance campaigns before selecting a voucher.

Inputs: id, pageSize, currentItem.

kiotviet_list_vouchersB
Read-onlyIdempotent

Read vouchers in an issuance campaign or by code; distinguish voucher value from actual redeemed payments.

Inputs: code, pageSize, campaignId, currentItem.

kiotviet_list_webhooksA
Read-onlyIdempotent

Inspect existing webhook registrations. This plugin does not host a webhook receiver.

Inputs: pageSize, currentItem.

kiotviet_update_categoryB
Destructive

Rename or move a product category. Read it first; parentId=null makes it a root category.

Inputs: id (required), data (required).

kiotviet_update_customerA
Destructive

Update an existing customer. Read its current record first; provide only intended changes. Line arrays can replace existing lines, so preserve required lines. Advanced documented API fields may be included in data.

Inputs: id (required), data (required).

kiotviet_update_einvoice_infoB
Destructive

Update external e-invoice publication metadata on existing KiotViet invoices. This does not issue an e-invoice or publish it to the tax authority.

Inputs: data (required).

kiotviet_update_invoiceA
Destructive

Update an existing invoice. Read its current record first; provide only intended changes. Line arrays can replace existing lines, so preserve required lines. Advanced documented API fields may be included in data.

Inputs: id (required), data (required).

kiotviet_update_orderA
Destructive

Update an existing order. Read its current record first; provide only intended changes. Line arrays can replace existing lines, so preserve required lines. Advanced documented API fields may be included in data.

Inputs: id (required), data (required).

kiotviet_update_productA
Destructive

Update an existing product. Read its current record first; provide only intended changes. Line arrays can replace existing lines, so preserve required lines. Advanced documented API fields may be included in data.

Inputs: id (required), data (required).

kiotviet_update_purchase_orderA
Destructive

Update an existing purchase order. Read its current record first; provide only intended changes. Line arrays can replace existing lines, so preserve required lines. Advanced documented API fields may be included in data.

Inputs: id (required), data (required).

kiotviet_update_transferA
Destructive

Update an existing transfer. Read its current record first; provide only intended changes. Line arrays can replace existing lines, so preserve required lines. Advanced documented API fields may be included in data.

Inputs: id (required), data (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 71 tools

    Disambiguation4/5

    Most tools map cleanly to a distinct resource+action, and descriptions explicitly disambiguate the tricky pairs (list_orders vs list_invoices vs list_supplier_orders vs list_purchase_orders, get_* vs get_*_by_code). A few clusters remain easy to confuse at a glance — the many get_X/get_X_by_code variants and get_store vs get_settings — but the descriptions resolve them.

    Naming Consistency5/5

    Every tool follows the same kiotviet_ prefix plus a consistent snake_case verb_noun pattern (list_/get_/create_/update_/delete_/generate_). No mixed casing or divergent verb styles across the 71 tools.

    Tool Count2/5

    71 tools is far beyond the 25+ threshold and makes the surface heavy for an agent to navigate, even though the retail/POS domain is genuinely broad. The breadth justifies many tools, but the count still feels oversized and would benefit from consolidation (e.g. unified get-by-id-or-code).

    Completeness3/5

    Core sales lifecycle is well covered (products, customers, orders, invoices, payments, transfers, purchase orders with create/update/delete), but several resources are read-only or partial: no create_supplier, no create_category (only update/delete), no create_webhook, no create_return, no create_voucher/pricebook/branch/user. These gaps will force agents to abandon some workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage KiotViet retail and F\&B operations including products, orders, customers, invoices, and inventory through the Public API. Features 36 integrated tools with automatic token refresh, middleware chain support, and configurable presets for different access levels.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI tools to uniformly discover, inspect, and call tools, prompts, and resources from multiple upstream MCP servers through a small set of fixed MCP tools, over stdio or HTTP.
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Lets any MCP-capable client connect to the public Codemagic REST API to list apps and teams, inspect build history, and optionally trigger or cancel builds and manage team settings. Runs locally over stdio with the user's own API token and configurable read-only, build, or administrative permission modes.
      1
      17 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Turns any API with an OpenAPI 3.0/3.1/3.2 spec into callable MCP tools: it generates a tool per supported operation, validates arguments, and forwards authenticated requests, served over stdio or local HTTP or embedded as a library. No hand-written tool per endpoint is required.
      MIT