Vietnam Invoice MCP
A remote MCP server that lets AI agents create, publish, and query Vietnamese e-invoices through MISA meInvoice.
README
🇻🇳 Vietnam Invoice MCP — MISA meInvoice (hóa đơn điện tử)
<!-- install-cta -->
Use it in 60 seconds
Paste this into your MCP client config (Claude Desktop, Cursor, Windsurf, or any MCP-capable agent):
{
"mcpServers": {
"vietnam-invoice": {
"type": "http",
"url": "https://inv-vn.wishpool.app/mcp"
}
}
}
Nothing to install. Credentials, when you need them, travel as HTTP headers on each request and are never stored — see the threat model.
Or run it yourself
Would you rather not send production credentials to a server you do not control? Deploy this identical code to your own account and point your agent at your own URL:
git clone https://github.com/junter1989k-ai/vietnam-invoice-mcp && cd vietnam-invoice-mcp && npx vercel --prod
MIT-licensed. Self-hosting removes us from the picture entirely, at no cost and with no loss of function.
A remote MCP server that lets any AI agent create, publish and query Vietnamese e-invoices (hóa đơn điện tử) through MISA meInvoice, a Tax-Department-connected e-invoicing provider. Electronic invoices have been mandatory nationwide since 1 July 2022 (connected to the General Department of Taxation / Tổng cục Thuế).
- Endpoint:
https://inv-vn.wishpool.app/mcp - Stateless · bring-your-own MISA token · stores nothing
- We only wrap the API calls — the digital signature stays merchant-side
What this server is (and is not)
Vietnamese e-invoices are signed with the merchant's own digital signature (chữ ký số) on a USB Token (or HSM), applied by the MISA local signing service. This server never signs and never holds a certificate/USB Token. It is a thin, stateless translation layer that:
create_invoice— builds the invoice, computes the VAT (thuế GTGT) in VND locally, and POSTs to MISA'screateinvoiceendpoint. MISA returns an unsigned invoice XML (invoice_data) + atransaction_id.- You sign
invoice_datamerchant-side with your USB Token (MISA local signing service) — this step never touches this server. publish_invoice— forwards the signed XML to MISA'sinvoicepublishingendpoint; MISA issues the officialinv_no/inv_code.query_invoice— read-only tax-authority + publish status.
This mirrors the "we only wrap the submission" honesty of the sister servers (Saudi ZATCA, Malaysia MyInvois): the cryptographic signing never leaves the merchant.
Connect
{
"mcpServers": {
"vietnam-invoice": {
"type": "http",
"url": "https://inv-vn.wishpool.app/mcp",
"headers": {
"x-meinvoice-token": "your-misa-meinvoice-token",
"x-meinvoice-taxcode": "your-company-tax-code",
"x-meinvoice-env": "prod"
}
}
}
}
| Header | Required | Notes |
|---|---|---|
x-meinvoice-token |
✅ | MISA meInvoice access token → forwarded as Authorization: Bearer |
x-meinvoice-taxcode |
✅ | Company tax code / MST → forwarded as the CompanyTaxCode header |
x-meinvoice-env |
optional | test (default, sandbox testapi.meinvoice.vn, no fiscal effect) · prod (api.meinvoice.vn, real fiscal effect) |
Owner policy guardrails (set by the human owner in the client config; the agent cannot relax them): x-agentpay-max-amount, x-agentpay-approval-above, x-agentpay-allowed-tools. The cap applies to the invoice grand total (TotalAmount, VND) computed at create time.
Tools
create_invoice (step 1)
Build + compute VAT, POST createinvoice. Input: seller{legalName,taxCode,address,…}, buyer{legalName|fullName,taxCode?,address,email?}, lines:[{name,unit?,quantity,unitPrice,taxRate?}], invSeries, optional refId/invDate/currencyCode/withCode. Output: transaction_id, ref_id, invoice_data (unsigned XML — sign it merchant-side), inv_no.
- VAT rates:
10standard ·8temporary reduced ·5essentials ·0exports. You choose the rate per line (tax classification is the merchant's decision). - Currency: VND (đồng) — a 0-decimal integer currency; every amount is a whole number.
publish_invoice (step 3)
Forward the merchant-signed XML, POST invoicepublishing. Input: transactionId, refId?, invoiceData (the signed XML), isSendEmail?, receiverEmail?, withCode?. Output: inv_no, inv_code, inv_series. Common errors surfaced verbatim: SignatureEmpty, InvalidSignature, InvoiceNumberNotContinuous, InvoiceDuplicated.
query_invoice (read-only)
POST invoicepublished/invoicestatus. Input: transactionIds:[…] (or single transactionId), withCode?. Output per invoice: publish_status, send_tax_status + label.
send_tax_status (không mã / no code): 0 not sent · 1 sent · 2 accepted · 3 rejected · 4 send error.
send_tax_status (có mã / with code): 0 awaiting code · 1 send error · 2 code issued · 3 code rejected.
Path convention
MISA v3 splits by invoice type: no-code (không mã) = /itg/…, with-code (có mã) = /code/itg/…. Set withCode per invoice (default false). Base: https://{testapi|api}.meinvoice.vn/api/v3.
Development
npm run dev # local server on http://localhost:3240
npm test # e2e: protocol + validation + VAT math + LIVE MISA InvalidTokenCode probe
The e2e suite makes a real call to testapi.meinvoice.vn with a fake token and asserts MISA's native InvalidTokenCode fingerprint — proof the integration line is wired correctly (we never sign, so a real published invoice needs a real merchant token + USB Token).
Honest gaps
- The prod host
api.meinvoice.vn/api/v3is taken from MISA's official developer intro (doc.meinvoice.vn/api/); only the test hosttestapi.meinvoice.vn/api/v3is live-verified here. - End-to-end publish cannot be verified without a real MISA token and a merchant USB Token to sign the XML — by design, signing is merchant-side. The create/publish/query request shapes follow MISA's
InvoicePublishingandGetStatusInvoicedocs.
Sister servers
Invoices: Malaysia MyInvois · Saudi ZATCA · Mexico CFDI · Poland KSeF · Chile DTE · Brazil NF-e · Peru CPE · India GST. Local payments in 81 countries: mcp.wishpool.app · Logistics: logi.wishpool.app.
MIT © 2026 WishPool
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。