Read KiotViet products, customers, invoices, orders and stock; create customers and orders. For Vietnamese shops and retailers that sell and manage stock with KiotViet. Hosted by usefulapi — connect from Claude, ChatGPT, Cursor, or any MCP client.
Team and Enterprise: an Owner adds the connector for the organization first.
Run this command, then run /mcp in Claude Code to log in:
Add to Cursor or add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"kiotviet": {
"url": "https://kiotviet.usefulapi.io/mcp"
}
}
}Add to VS Code or add this to .vscode/mcp.json:
{
"servers": {
"kiotviet": {
"type": "http",
"url": "https://kiotviet.usefulapi.io/mcp"
}
}
}No Add custom MCP server option? It depends on your account or workspace settings: see OpenAI's guide.
Run these commands. The second one opens the login page:
Other MCP clients (Windsurf, Cline, Zed and more): add the URL as a remote MCP server (Streamable HTTP). The client then opens the login page in your browser. Do not add an Authorization header: see Before you connect.
The AI shows stock on hand and reserved quantities per product and branch, so you can see what is running low where.
kiotviet_list_stock kiotviet_list_branches kiotviet_list_products
The AI lists sales invoices for a date range with totals and payment status, and opens one invoice with its lines and payments.
kiotviet_list_invoices kiotviet_get_invoice
The AI finds a customer by code, name or phone, shows debt and totals, and lists the latest orders of that customer.
kiotviet_list_customers kiotviet_get_customer kiotviet_list_orders
The AI creates a sales order with lines of existing products in a branch, after you confirm the products, quantities and prices.
Changes data · kiotviet_create_order kiotviet_get_product_by_code
The AI checks by phone number whether the customer exists, and creates a new customer record when it does not.
Changes data · kiotviet_create_customer kiotviet_list_customers
The AI lists goods receipts and supplier orders for a period, with suppliers, totals and lines, so you can see what you bought.
kiotviet_list_purchase_orders kiotviet_list_supplier_orders kiotviet_list_suppliers
The login page asks for your KiotViet Client ID, KiotViet secret (Mã bảo mật) and Shop name (tên gian hàng).
In KiotViet, a shop administrator opens Thiết lập → Cửa hàng → Kết nối API (Settings, Store, API connection), verifies the contract phone number, generates the secret (Mã bảo mật), accepts the terms and ticks access to customer, invoice and order data. Copy the Client ID and secret from there. The shop name is the store name (tên gian hàng) you log in with, for example minhanhshop. They are used only to call the KiotViet API on your behalf; they are never shown to anyone.
Add only the URL. Do not add an Authorization header or an API key to the client config. The server signs you in with OAuth: the login page asks for your KiotViet Client ID, KiotViet secret (Mã bảo mật) and Shop name (tên gian hàng). If the config has such a header, remove it: some clients then send that header instead of the login token, and every call fails with 401.
Turn on the KiotViet connector, then ask in plain words. The AI picks the tools.
| Tool | Type | What it does |
|---|---|---|
kiotviet_list_products | read | List products List products (code, barcode, name, category, base price, units, attributes). Optionally include stock per branch (include_inventory) and price-book prices. Filter by name, category, branch, active flag or last change. GET /products. |
kiotviet_get_product | read | Get product One product by id: code, barcode, name, category, base price, units, attributes, images, stock per branch and price books. GET /products/{id}. |
kiotviet_get_product_by_code | read | Get product by code One product by its product code (SKU). GET /products/code/{code}. |
kiotviet_list_categories | read | List categories List product categories (id, name, parent, whether it has children). Set hierarchical to get the category tree. GET /categories. |
kiotviet_get_category | read | Get category One product category by id (name, parent, children). GET /categories/{id}. |
kiotviet_list_customers | read | List customers List customers (code, name, phone, email, address, debt, total invoiced, reward points, groups). Contains personal data of the shop's customers. Filter by code, name, phone, group or last change. GET /customers. |
kiotviet_get_customer | read | Get customer One customer by id: contact data, debt, total invoiced, reward points, groups. GET /customers/{id}. |
kiotviet_get_customer_by_code | read | Get customer by code One customer by customer code. GET /customers/code/{code}. |
kiotviet_create_customer | write | Create customer WRITE: create a new customer in the shop (name required; code is generated by KiotViet if omitted). Always check with the user first, and look the customer up by phone before creating a duplicate. POST /customers. |
kiotviet_list_invoices | read | List invoices List sales invoices (code, date, branch, customer, total, amount paid, status, lines). Filter by branch, customer, status, order, purchase-date range or last change. GET /invoices. |
kiotviet_get_invoice | read | Get invoice One invoice by id with its lines, payments and delivery. GET /invoices/{id}. |
kiotviet_get_invoice_by_code | read | Get invoice by code One invoice by invoice code (for example HD000123). GET /invoices/code/{code}. |
kiotviet_list_orders | read | List sales orders List sales orders (code, date, branch, customer, total, status, lines, delivery). Filter by branch, customer, status, creation date (from) or last change (from/to). GET /orders. |
kiotviet_get_order | read | Get sales order One sales order by id with its lines, payments and delivery. GET /orders/{id}. |
kiotviet_get_order_by_code | read | Get sales order by code One sales order by order code (for example DH000123). GET /orders/code/{code}. |
kiotviet_create_order | write | Create sales order WRITE: create a sales order (an order, not an invoice: no invoice is made and no payment is recorded) with lines of existing products in a branch, for an existing customer or none. Always confirm the products, quantities and prices with the user first. POST /orders. |
kiotviet_list_branches | read | List branches List the shop's branches (id, name, code, phone, address). Use the ids to filter other tools. GET /branches. |
kiotviet_list_stock | read | List stock on hand Stock on hand and reserved quantity per product and branch. Filter by branch or last change. GET /productOnHands. |
kiotviet_list_suppliers | read | List suppliers List suppliers (code, name, phone, email, address, debt, total invoiced). Filter by code, name, phone or last change. GET /suppliers. |
kiotviet_get_supplier | read | Get supplier One supplier by id. GET /suppliers/{id}. |
kiotviet_list_purchase_orders | read | List goods receipts List goods receipts from suppliers (nhap hang: code, date, branch, supplier, total, lines). Filter by branch, status or purchase-date range. GET /purchaseorders. |
kiotviet_get_purchase_order | read | Get goods receipt One goods receipt (nhap hang) by id with its lines. GET /purchaseorders/{id}. |
kiotviet_list_supplier_orders | read | List supplier orders List orders placed with suppliers (dat hang nhap: code, date, branch, supplier, status, lines, amount paid). Filter by branch, status, supplier or product text. GET /ordersuppliers. |
kiotviet_list_returns | read | List returns List customer returns (code, date, branch, customer, invoice, return total, lines). GET /returns. |
kiotviet_get_return | read | Get return One customer return by id with its lines. GET /returns/{id}. |
kiotviet_list_cashflow | read | List cash flow List cash-book entries (receipts and payments: code, branch, method, partner, amount, date, status). Filter by branch, direction or date range. GET /cashflow. |
kiotviet_list_users | read | List users List the shop's staff users (id, username, name, phone, email). GET /users. |
kiotviet_list_price_books | read | List price books List price books (bang gia: name, active flag, validity dates, branches, customer groups). GET /pricebooks. |
kiotviet_get_price_book | read | Get price book prices The product prices of one price book (product id, code, price), paged. GET /pricebooks/{id}. |
kiotviet_usage_status | Usage status (free-tier meter) Report the caller's current usage: the plan, calls used this month, the limit of the plan (the free monthly cap or the Pro fair use limit), remaining, and whether the limit is reached. Read-only; does not count against the meter. | |
kiotviet_request_feature | Request a missing feature Tell usefulapi that the user needs something the KiotViet tools cannot do yet (a missing tool, field or filter). Call it only when the user asks for something none of the tools can do, and tell the user that you send the request. Do not call it for errors or for normal requests. Do not include personal data, credentials or customer records. Stored with the product name and the client type (for example Claude or Cursor), without the user's account. At most 5 requests per day. Does not count against the meter. | |
kiotviet_upgrade | Upgrade to Pro (unlimited*) Get Pro: unlimited tool calls (fair use limit: 10,000 a month) on KiotViet (the free tier caps monthly usage). Plans: "monthly" — $9/month; "yearly" — $90/year (2 months free). Cancel any time: Pro then runs to the end of the paid period, so it also suits a one-time job. *A fair use limit applies. For heavy use (near Pro's limit): "plus" or "plus_yearly" — Pro+, $39/month or $390/year, unlimited tool calls (fair use limit: 100,000 a month); an existing Pro subscription changes to Pro+ in place (needs confirm: true; the price difference for the rest of the period is charged at once). Otherwise returns a short link to open in your browser (it opens Stripe Checkout); after payment the account upgrades automatically. Does not count against the meter. | |
kiotviet_cancel_subscription | Cancel the Pro subscription Cancel the caller's KiotViet Pro subscription at the end of the paid period (no refund for the current period; Pro continues until then, then the free tier applies). Requires confirm: true. Run kiotviet_upgrade later to undo the cancel before the period ends. Does not count against the meter. |
| Plan | Price | Limit |
|---|---|---|
| Free | $0 | 50 tool calls / month |
| Proper store account | $9/mo · $90/yr | Unlimited* |
*Pro fair use limit: 10,000 tool calls a month on this server. For more, write to [email protected].
Pro covers this KiotViet server only. Subscribe with kiotviet_upgrade (it returns a Stripe Checkout link). Cancel any time with kiotviet_cancel_subscription: Pro continues to the end of the paid period, with no refund for the current period, and running kiotviet_upgrade before then undoes the cancel. Or write to [email protected].
Check stock by branch. Review the day's sales. Look up a customer and their orders. Take a sales order. Add a new customer. Review supplier purchases. See what you can do for the details.
No. usefulapi is an independent service. It is not affiliated with or endorsed by KiotViet. The server calls the KiotViet API with your own KiotViet access, so it sees only the data that your account can see.
Yes. In Claude, add this server's URL as a custom connector. In ChatGPT, add it as a custom MCP server in Plugins. Then log in once. Cursor, VS Code, Claude Code and Codex work too. See the setup steps.
The login page asks for your KiotViet Client ID, KiotViet secret (Mã bảo mật) and Shop name (tên gian hàng). See Before you connect for where to find them.
No. Add only the URL. Do not add an Authorization header or an API key to the client config. The server signs you in with OAuth: the login page asks for your KiotViet Client ID, KiotViet secret (Mã bảo mật) and Shop name (tên gian hàng). If the config has such a header, remove it: some clients then send that header instead of the login token, and every call fails with 401.
The login stores them encrypted in the authorization grant of your connection. The server uses them to call the KiotViet API for you and to derive a private account id for usage metering. usefulapi does not show them on any page or in any reply. To stop all access, remove the connector and change or delete these credentials in KiotViet.
Yes, if you approve it. 2 of the 29 KiotViet tools can create or change data. The other 27 are marked read-only. Most MCP clients ask you to approve a tool call before it runs.
The Free plan gives 50 tool calls / month. Pro costs $9/mo or $90/yr, with unlimited tool calls (fair use limit: 10,000 tool calls a month), for this KiotViet server only. Cancel any time: Pro then runs to the end of the paid period. Run kiotviet_usage_status to see how many calls you used.
Ask the AI to run kiotviet_upgrade: it returns a Stripe Checkout link. To cancel, run kiotviet_cancel_subscription. Pro continues to the end of the paid period.
Tell the AI what you wanted to do. It can send the request with kiotviet_request_feature. We store the text with the server name, the type of AI client and the tool you tried, not with your account, and read every request when we plan new tools. You can send up to 5 requests per day.
Any client that supports remote MCP servers (Streamable HTTP) with OAuth login: Claude (web and desktop), Claude Code, ChatGPT, Codex, Cursor, VS Code, Windsurf and others.
This is a Model Context Protocol endpoint — meant to be connected from an AI client, not opened in a browser. An invalid_token response at the URL is the auth gate working as designed; clients authenticate automatically.