Argentina Invoice

by junter1989k-ai

285 downloads
Not rated
GitHub Website

About

Argentina Invoice MCP 🇦🇷 — How can my AI agent issue a factura electrónica (CAE) in Argentina?

Details

Author
junter1989k-ai
Downloads
285

- 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 Argentina 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 :3242.

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "argentina invoice": {
            "argentina-invoice": {
                "type": "http",
                "url": "https://inv-ar.wishpool.app/mcp",
                "headers": {
                    "x-afipsdk-token": "your_afipsdk_bearer",
                    "x-afip-mode": "dev"
                }
            }
        }
    }
}

McpServers

{
    "argentina-invoice": {
        "type": "http",
        "url": "https://inv-ar.wishpool.app/mcp",
        "headers": {
            "x-afipsdk-token": "your_afipsdk_bearer",
            "x-afip-mode": "dev"
        }
    }
}

Argentina Invoice MCP 🇦🇷 — How can my AI agent issue a factura electrónica (CAE) in Argentina?

Remote MCP server that lets any AI agent issue Argentina AFIP/ARCA electronic invoices (factura electrónica) — authorizing the invoice via WSFE to get the CAE (Código de Autorización Electrónico) plus its expiry — through the Afip SDK. Stateless, bring-your-own credentials, never stores anything.

Live endpoint: https://inv-ar.wishpool.app/mcp · Registry: app.wishpool/argentina-invoice-mcp

Quick start

{
  "mcpServers": {
    "argentina-invoice": {
      "type": "http",
      "url": "https://inv-ar.wishpool.app/mcp",
      "headers": {
        "x-afipsdk-token": "your-afip-sdk-access-token",
        "x-afip-mode": "dev"
      }
    }
  }
}

Sign up free at app.afipsdk.com for an access_token (1000 requests/month). In dev mode no AFIP certificate is needed — the test CUIT 20409378472 works out of the box. Switch x-afip-mode to prod and pass your AFIP X.509 certificate + key per-request (afip_cert / afip_key) to authorize real invoices.

Headers

| Header | Purpose |
|---|---|
| x-afipsdk-token | Required. Your Afip SDK access_token (Bearer). Sign up at app.afipsdk.com. |
| x-afip-mode | dev (default, AFIP homologación — no certificate) or prod. |
| x-afip-cuit | Issuer CUIT, 11 digits. Defaults to the test CUIT 20409378472 in dev. |

Certificates (prod) — never stored, never logged

In prod mode, pass your own AFIP X.509 certificate and private key as per-request tool params afip_cert and afip_key (PEM strings). They are forwarded to the Afip SDK for that single request only and are never stored, logged, or persisted — sensitive material exists only for the request lifecycle. This mirrors the Afip SDK's own per-request certificate design.

Tools

| Tool | What it does |
|---|---|
| create_invoice | Authorize a factura electrónica at AFIP/ARCA (WSFE FECAESolicitar) and get the cae (+ cae_expiry, invoice_number). You send flat fields (invoice_type, point_of_sale, customer doc, line items with net_price + iva_rate); the server computes the WSFE amounts — per-line net, IVA grouped into the AlicIva array, ImpNeto / ImpIVA / ImpTotal. The next invoice number is fetched automatically unless you pass invoice_number. |
| query_invoice | Status check by number (WSFE FECompConsultar): cae, cae_expiry, total, Resultado (A = authorized). |
| get_last_invoice_number | Last authorized number (WSFE FECompUltimoAutorizado) for a point of sale + type — next_number is this + 1. |

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 amount cap/threshold applies to the invoice total (ARS).

IVA / factura types (computed for you)

- Factura A (CbteTipo 1) and Factura B (CbteTipo 6) discriminate IVA: line items are grouped by alícuota (0, 10.5, 21, 27%) into the AlicIva array; ImpNeto, ImpIVA and ImpTotal are computed and reconciled.
- Factura C (CbteTipo 11, monotributo) does not discriminate IVA: ImpTotal = ImpNeto, ImpIVA = 0, no AlicIva.

Example: one line net_price 100 × 1 @ 21% on a Factura B → ImpNeto 100, ImpIVA 21, ImpTotal 121 (AlicIva Id 5). The same line at 10.5%ImpIVA 10.5; at 27%ImpIVA 27.

There is no WSFE cancel operation in Argentina — to reverse an invoice, issue a nota de crédito (credit note) for the same amount.

Develop

node test/serve.js   # local server on :3242
node test/e2e.js     # protocol + IVA math unit check (A/B/C) + validation + policy + fake-token live probe

Safety

Pure stateless translation layer. The AFIP/ARCA WSAA + WSFE certification burden sits with the Afip SDK; the access_token and (in prod) the AFIP certificate + key travel per-request in headers/params, nothing is stored. Privacy policy.

Sister servers

Mexico CFDI 4.0 e-invoices are live: inv-mx.wishpool.app. India GST e-invoices: inv-in.wishpool.app. Local payments in 81 countries, one family: mcp.wishpool.app · Taiwan e-invoice 電子發票 included. More invoice countries coming: Brazil NF-e · Chile DTE · Peru CPE · Poland KSeF · Romania e-Factura · 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.