malaysia-invoice

Let AI agents submit Malaysian e-invoices to MyInvois (LHDN).

Community: Submitted by a user or imported; check the owner before granting accessOnlineNo sign-inGlobalFreeRead-only

What it can do

  • Submit Invoice: Submit an ALREADY-SIGNED Malaysian e-invoice (UBL 2.1) to LHDN MyInvois — the POST /api/v1.0/documentsubmissions call. This server does NOT sign: you XAdES-sign the UBL document mercha
  • Query Submission: Get the validation status of a MyInvois submission — the GET /api/v1.0/documentsubmissions/{submissionUid} call. Use the submissionUid returned by submit_invoice to poll (MyInvois va
  • Cancel Invoice: Cancel a previously-issued, VALID MyInvois document — the PUT /api/v1.0/documents/state/{uuid}/state call (body status=cancelled). Only allowed within the 72-HOUR window from the momen

What data it sees

Do you need an account

No: the server works without sign-in

Let AI agents submit Malaysian e-invoices to MyInvois (LHDN). Stateless remote MCP server: bring your own ERP client credentials, it stores nothing. Draft UBL with SST math, submit pre-signed documents, query status, cancel within 72h. Signing stays merchant-side.

Server tool list (4)

Raw names from tools/list. Only developers need these.

submit_invoiceSubmit an ALREADY-SIGNED Malaysian e-invoice (UBL 2.1) to LHDN MyInvois — the POST /api/v1.0/documentsubmissions call. This server does NOT sign: you XAdES-sign the UBL document merchant-side, compute its SHA-256 hash, and pass { format, document(base64), documentHash, codeNumber }. MyInvois validates asynchronously, so a successful submit returns a submissionUid plus accepted_documents (each with the assigned uuid) and rejected_documents — it does NOT yet mean the invoice is Valid; call query_submission with the submissionUid to poll the validation outcome. Result: accepted=true when at least one document was accepted for processing (HTTP 202); rejected_documents lists any structurally-rejected documents with their error. Required credential headers (set once in your MCP client, per-request, never stored): x-myinvois-client-id + x-myinvois-client-secret (your ERP OAuth2 credentials from the MyTax "Register ERP" self-service). Optional header x-myinvois-mode: sandbox (default = preprod, no fiscal effect) | prod (production, real fiscal effect). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
query_submissionGet the validation status of a MyInvois submission — the GET /api/v1.0/documentsubmissions/{submissionUid} call. Use the submissionUid returned by submit_invoice to poll (MyInvois validates asynchronously; 3-5s polling is recommended). Result overall_status enum: "in progress" (still validating), "valid" (all documents valid), "partially valid" (some valid, some invalid), "invalid" (all invalid). document_summary lists each document with its own status (Submitted / Valid / Invalid / Cancelled), uuid and totals. Required credential headers (set once in your MCP client, per-request, never stored): x-myinvois-client-id + x-myinvois-client-secret (your ERP OAuth2 credentials from the MyTax "Register ERP" self-service). Optional header x-myinvois-mode: sandbox (default = preprod, no fiscal effect) | prod (production, real fiscal effect). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
cancel_invoiceCancel a previously-issued, VALID MyInvois document — the PUT /api/v1.0/documents/state/{uuid}/state call (body status=cancelled). Only allowed within the 72-HOUR window from the moment the document became valid; after that you must issue a credit/debit note instead. In: uuid (the document uuid from query_submission, NOT the submissionUid) + reason (why, max 300 chars). Result status "Cancelled" on success. Common errors: OperationPeriodOver (72h passed), IncorrectState (not cancellable), ActiveReferencingDocuments (referenced by another doc), Forbidden (you did not issue it). Required credential headers (set once in your MCP client, per-request, never stored): x-myinvois-client-id + x-myinvois-client-secret (your ERP OAuth2 credentials from the MyTax "Register ERP" self-service). Optional header x-myinvois-mode: sandbox (default = preprod, no fiscal effect) | prod (production, real fiscal effect). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
build_invoice_draftLocal helper (NO network, NO credentials, NO signing): assemble an UNSIGNED UBL 2.1 invoice skeleton from line items and Malaysian SST tax, and compute the monetary totals (excl-tax, tax, incl-tax, payable). Use it to prepare a document you then complete (supplier/buyer TIN, MSIC code, etc.), XAdES-sign, hash, and pass to submit_invoice. It does NOT submit and has NO fiscal effect. In: lines [{ description, quantity, unitPrice, taxRate? (percent, e.g. 0/6/8/10) }], codeNumber, currency? (default MYR), issueDate? (default today). Out: computed totals + ubl_json skeleton. NOTE: it applies the taxRate you give per line (SST classification is your decision); it does not pick the rate for you.