Peru Invoice

by junter1989k-ai

256 downloads
Not rated
GitHub Website

About

Remote MCP server: AI agents issue Peru CPE factura/boleta electronica via Nubefact (SUNAT). Stateless, BYO credentials.

Details

Author
junter1989k-ai
Downloads
256

- MCP server integration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Peru Invoice
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The README includes setup instructions such as node test/serve.js # local server on :3229.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "peru invoice": {
            "peru-invoice": {
                "type": "http",
                "url": "https://inv-pe.wishpool.app/mcp",
                "headers": {
                    "x-nubefact-ruta": "your_ruta_url",
                    "x-nubefact-token": "your_nubefact_key"
                }
            }
        }
    }
}

McpServers

{
    "peru-invoice": {
        "type": "http",
        "url": "https://inv-pe.wishpool.app/mcp",
        "headers": {
            "x-nubefact-ruta": "your_ruta_url",
            "x-nubefact-token": "your_nubefact_key"
        }
    }
}

Peru Invoice MCP 🇵🇪 — How can my AI agent issue a factura o boleta electrónica in Peru?

Remote MCP server that lets any AI agent issue Peru electronic CPE (comprobante de pago electrónico — factura for B2B, boleta for consumers), declared to SUNAT via Nubefact. Stateless, bring-your-own credentials, never stores anything.

Live endpoint: https://inv-pe.wishpool.app/mcp · Registry: app.wishpool/peru-invoice-mcp

Quick start

{
  "mcpServers": {
    "peru-invoice": {
      "type": "http",
      "url": "https://inv-pe.wishpool.app/mcp",
      "headers": {
        "x-nubefact-ruta": "https://api.nubefact.com/api/v1/<your-hash>",
        "x-nubefact-token": "<your-token>"
      }
    }
  }
}

A free DEMO account at nubefact.com gives you both a RUTA and a TOKEN (menu Api-Integración). The same credentials switch to production at the account level (numbering resets on go-live), so results report mode: "nubefact-account" honestly — verify demo vs production in your Nubefact dashboard.

Tools

| Tool | What it does |
|---|---|
| create_invoice | Issue a factura (buyer 11-digit RUC) or boleta (consumer DNI/none). You supply serie (F001/B001) and the next numero; item prices go in including IGV, and this layer computes valor_unitario, subtotal, IGV 18% and totals. Returns the SUNAT link + PDF/XML. |
| query_invoice | Status check by comprobante_type + serie + numero: ACCEPTED / PENDING / REJECTED, plus anulado and PDF/XML/CDR links. |
| cancel_invoice | Void (anular — comunicación de baja) a CPE at SUNAT with a motivo. Asynchronous: confirm later with query_invoice. |

> ⚠️ Numbering is merchant-managed. This server is stateless and does not track sequences — the caller supplies serie and the next numero. Reusing a numero is rejected by SUNAT; skipping one leaves a gap.

Owner policy guardrails ride optional headers (x-agentpay-max-amount, x-agentpay-approval-above, x-agentpay-allowed-tools) — set by the human owner in client config; the agent cannot relax them. The cap applies to the invoice total in PEN.

Develop

node test/serve.js   # local server on :3229
node test/e2e.js     # protocol + validation + IGV math + fake-cred live probes

Safety

Pure stateless translation layer. The SUNAT certification burden sits with Nubefact (OSE/PSE); credentials travel per-request in headers, nothing is stored. Privacy policy.

Sister servers

Local payments in 81 countries, one family: mcp.wishpool.app · Taiwan e-invoice 電子發票 included. Invoice family live: Mexico CFDI 4.0 (inv-mx.wishpool.app). More invoice countries coming: Brazil NF-e · Chile DTE · Colombia · India GST · Poland KSeF · Italy SdI.

MIT licensed.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.