Skip to main content
Glama
ARCA Invoice MCP

ARCA Invoice MCP

by MatiasMinoni

ARCA Invoice MCP

Local MCP server for preparing and issuing ARCA Factura C invoices through the official RCEL protocol.

Authentication uses direct HTTP by default, including the JSF login, JWT bridge, portal service grant, RCEL SSO, and taxpayer selection. Browser fallback is disabled: if direct authentication fails, the MCP returns the error without opening Chrome. A browser can only be enabled explicitly with ARCA_AUTH_FALLBACK=headless or ARCA_AUTH_FALLBACK=visible. The invoice flow itself always uses direct HTTP requests reconstructed from an observed HAR.

The server deliberately separates preview from issuance:

  1. arca_prepare_invoice sends the four RCEL form requests, records a HAR, and returns a structured preview plus a one-time approval token.

  2. A human reviews the returned summary.

  3. arca_issue_invoice requires the exact token, re-reads the preview, emits once, downloads the official PDF, and flushes a full HAR.

arca_list_invoices queries issued Factura C records by date range directly from RCEL. Prepared or discarded previews never appear in that list because ARCA has not assigned them a number or CAE.

Security

  • Keep CUIL and PASS only in .env; the file is ignored by Git.

  • HAR, browser state, and PDFs are ignored by Git.

  • HAR files can contain session cookies and taxpayer/customer information. They are written with owner-only permissions and must be treated as credentials.

  • The client refuses to send ARCA data to hosts outside the official AFIP/ARCA domains.

  • Authentication requests are intentionally excluded from HAR so the password is never recorded. RCEL cookies are redacted in the generated HAR.

  • If issuance returns an uncertain result, do not retry. Check Consultas in RCEL first.

  • Use this project only with an ARCA account and taxpayer you are authorized to operate.

See SECURITY.md before sharing logs or reporting a vulnerability.

Related MCP server: keycae-mcp

Requirements

  • Node.js 20 or newer.

  • pdftotext from Poppler when invoices will be issued through the MCP.

  • Google Chrome only if an explicit authentication fallback is enabled.

Why Poppler is needed

Poppler is not an ARCA requirement and is not needed to authenticate, list invoices or prepare a preview. After arca_issue_invoice sends the irreversible issuance request and downloads the official PDF, the MCP runs pdftotext to extract and verify the invoice number, CAE and CAE expiration date.

Install Poppler before using the issuance tool:

# macOS
brew install poppler

# Debian / Ubuntu
sudo apt-get install poppler-utils

If pdftotext is unavailable at that point, ARCA may already have issued the invoice even though local verification fails. Do not retry the issuance request: check the invoice through arca_list_invoices or RCEL Consultas first.

Run

npm ci
cp .env.example .env
# Complete CUIL and PASS in .env without committing it.
npm start

Use either npm ci or npm install; npm ci is recommended when using the committed lockfile.

The server uses Google Chrome on macOS by default. Override it with ARCA_CHROME_PATH. Set ARCA_HEADLESS=1 only after validating that ARCA accepts the environment.

Example Codex MCP configuration:

[mcp_servers.arca_invoice]
command = "node"
args = ["/absolute/path/to/arca-invoice-mcp/src/index.mjs"]
cwd = "/absolute/path/to/arca-invoice-mcp"

Validate locally

These checks do not authenticate with ARCA or issue invoices:

npm run check
npm test
npm audit --omit=dev

Operational warning

arca_issue_invoice performs an irreversible external action. Always present the preview to a human, receive explicit approval for that exact preview, and call the issue tool only once. Never commit or share .env, .state, PDFs, HAR files, cookies, approval tokens, taxpayer data, or customer data.

Available Tools

5 tools
arca_discard_prepared_invoiceDiscard prepared invoiceB

Close the current preview without issuing an invoice.

Inputs: no named parameters.

arca_invoice_statusARCA invoice session statusA

Read whether the local ARCA session has a prepared invoice. Does not mutate ARCA.

Inputs: no named parameters.

arca_issue_invoiceIssue prepared ARCA invoiceA

Irreversibly issue the currently prepared invoice. Call only after showing the preview and receiving explicit user approval. Never retry automatically after an uncertain response.

Inputs: approvalToken (required).

arca_list_invoicesList issued ARCA invoicesA

Read issued Factura C records from official ARCA RCEL for a date range. This tool is read-only and does not include unissued previews.

Inputs: dateTo (required), dateFrom (required), pointOfSale, receiverCuit.

arca_prepare_invoicePrepare ARCA invoiceA

Prepare a Factura C through direct HTTP calls to official ARCA RCEL. Authentication is direct HTTP by default, with browser fallback only when explicitly configured. This tool never issues the invoice. Show the preview and obtain explicit approval before calling arca_issue_invoice.

Inputs: amount (required), dueDate (required), periodTo (required), periodFrom (required), +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool covers a distinct action: prepare, issue, list, discard, and status. These lifecycle stages are clearly separated, so an agent can unambiguously select the correct tool for a given need.

    Naming Consistency4/5

    Four of the five tools follow the arca_verb_noun pattern (arca_prepare_invoice, arca_issue_invoice, arca_list_invoices, arca_discard_prepared_invoice). However, arca_invoice_status breaks this pattern by using a noun-like 'status' instead of a verb, causing a minor inconsistency.

    Tool Count5/5

    With 5 tools, the server is well-scoped for its invoice lifecycle purpose. Each tool earns its place without redundancy or bloat, fitting the ideal 3-15 range.

    Completeness4/5

    The lifecycle of prepare, issue, discard, list, and local status covers the core workflow. However, after an uncertain issue response, there is no direct tool to verify the invoice status on the ARCA side (list_invoices requires knowing the date range and may not be real-time), leaving a minor gap in uncertainty resolution.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Model Context Protocol (MCP) server for Spanish Electronic Invoicing. Provides tools to generate, validate, and submit invoices across VERI\*FACTU, Facturae/FACe, SII, TicketBAI, and Crea y Crece B2B.
      20
      169 PyPI
      3
      Apache 2.0
    • A
      license
      A
      quality
      F
      maintenance
      Argentine electronic invoicing (facturación electrónica) MCP Server for ARCA/AFIP. Emit invoices, manage credentials, check delegations, and look up taxpayers. 10 tools.
      12
      378 npm
      MIT