# Peru Invoice MCP > A remote MCP server that lets any AI agent issue Peru electronic CPE (comprobante de pago electrónico — factura electrónica for B2B, boleta de venta for consumers), declared to SUNAT via Nubefact — create, query and void (anular) comprobantes. Stateless, bring-your-own credentials, never stores anything. - MCP endpoint (Streamable HTTP): https://inv-pe.wishpool.app/mcp - Credentials headers (both required): x-nubefact-ruta (your unique full RUTA URL, e.g. https://api.nubefact.com/api/v1/) and x-nubefact-token (your Nubefact account TOKEN). A free DEMO account at www.nubefact.com gives both; the same credentials switch to production at the account level (numbering resets on go-live), so results report mode "nubefact-account" honestly. - Flow: create_invoice (factura or boleta; issued and declared to SUNAT) -> share pdf_url/xml_url with the buyer -> cancel_invoice voids at SUNAT if needed. query_invoice checks status any time. - Amounts in PEN (soles). Give item prices INCLUDING IGV; this server computes valor_unitario, subtotal, IGV (18%), total_gravada, total_igv and total. NUMBERING IS MERCHANT-MANAGED: the caller supplies serie (F001/B001) and the next sequential numero (this stateless server does not track it). ## Tools - create_invoice: Issue a factura (buyer 11-digit RUC) or boleta (consumer DNI/none) — comprobante_type + serie + numero + customer + items (prices with IGV) in, SUNAT link + PDF/XML out. - query_invoice: Check a CPE by comprobante_type + serie + numero — status ACCEPTED / PENDING / REJECTED, anulado flag, PDF/XML/CDR links. - cancel_invoice: Void a CPE at SUNAT (anulación / comunicación de baja) with a motivo; asynchronous, confirm later with query_invoice. - Owner policy guardrails: x-agentpay-max-amount (hard cap on invoice total in PEN), x-agentpay-approval-above (returns an unsigned draft for human review), x-agentpay-allowed-tools (tool allow-list) — set by the human owner in the MCP client config; the agent cannot relax them. ## Safety Stateless translation layer. The SUNAT/OSE certification burden sits with Nubefact; the merchant's certificate and API credentials stay in the merchant's own Nubefact account. This server never stores credentials, invoices, or customer data. Privacy policy: https://inv-pe.wishpool.app/privacy ## Sister servers Same stateless BYO pattern, local payments in 81 countries — full list: https://mcp.wishpool.app/llms.txt (Taiwan e-invoice 電子發票 lives in https://mcp.wishpool.app/mcp). Invoice family live: Mexico CFDI 4.0 (https://inv-mx.wishpool.app/mcp). More invoice countries coming: Brazil NF-e, Chile DTE, Colombia, India GST e-invoicing, Poland KSeF, Italy SdI.