Mcp Afip

io.github.codesparPublished by GitHub account codesparv0.2.0-alpha.3Updated Oct 24, 2026

AFIP — Argentine tax authority, electronic invoicing (Factura Electrónica)

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Local MCP server for AFIP, Argentina's tax authority, letting an assistant issue and manage electronic invoices (Factura Electrónica) with CAE authorization.

What you can do
Create, batch-create, retrieve and cancel electronic invoices, credit notes and debit notes, and check CAE authorization status and last invoice numbers per point of sale and type. Look up reference data: invoice types, tax types, concept types, document types, IVA aliquots, currencies and FX rates. Check AFIP web-service availability and list authorized points of sale for the CUIT. Look up taxpayers in the padrón and fetch registration certificates by CUIT.
When to use it
Useful when an assistant needs to work with Argentine electronic invoicing or taxpayer data: issuing invoices, notes or cancellations, or looking up fiscal reference data and taxpayer details. Test in the homologation environment before touching production.
Requirements
Runs locally via npm package @codespar/mcp-afip (Node.js), installed with the alpha dist-tag. Requires an AFIP-issued certificate and private key, supplied as file paths in AFIP_CERT_PATH and AFIP_KEY_PATH, plus the taxpayer's CUIT in AFIP_CUIT. AFIP_ENV selects production or homologation (default homologation); optional MCP_HTTP and MCP_PORT enable HTTP transport. Network access to AFIP SOAP services is needed.
Before you install
The server needs an AFIP certificate and private key file paths (AFIP_KEY_PATH is a secret) and the taxpayer CUIT; protect these credentials. Tools create, batch-create, cancel and void fiscal invoices and notes, which are legally significant write actions. The README marks this an alpha release whose endpoint paths have not been fully live-validated, so pin exact versions and test in homologation first.

Installation

In SourceWeft

  1. Open Mcp Afip in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-afip

MCP server for AFIP, the Argentine tax authority (Administracion Federal de Ingresos Publicos), for electronic invoicing (Factura Electronica) with CAE authorization

[npm] [License: MIT]

Alpha release — published under the alpha npm dist-tag. Endpoint paths follow public docs and BACEN/provider conventions but have not been fully live-validated. Pin exact versions during 0.x.x-alpha. Install with npm install @codespar/mcp-afip@alpha.

Quick Start

bash
# Set your credentialsexport AFIP_CERT_PATH="/path/to/cert.crt"export AFIP_KEY_PATH="/path/to/key.key"export AFIP_CUIT="20123456789"
# Run via stdionpx -y @codespar/mcp-afip@alpha
# Run via HTTPMCP_HTTP=true MCP_PORT=3000 npx -y @codespar/mcp-afip@alpha

Environment Variables

VariableRequiredDescription
AFIP_CERT_PATHYesPath to AFIP certificate (.crt)
AFIP_KEY_PATHYesPath to AFIP private key (.key)
AFIP_CUITYesCUIT number of the taxpayer
AFIP_ENVNo"production" or "homologation" (default: homologation)
MCP_HTTPNoSet to "true" to enable HTTP transport
MCP_PORTNoHTTP port (default: 3000)

Tools (20)

ToolPurpose
create_invoiceCreate an electronic invoice (Factura Electrónica) via AFIP
get_invoiceGet invoice details by type, point of sale, and number
get_last_invoice_numberGet last authorized invoice number for a point of sale and type
get_cae_statusCheck CAE authorization status for an invoice
list_invoice_typesList available invoice types (Factura A, B, C, etc.)
list_tax_typesList available tax types (IVA, percepciones, retenciones, etc.)
get_server_statusCheck AFIP web-service availability (WSFE status)
get_authorized_points_of_saleList authorized puntos de venta for the CUIT
create_invoice_batchCreate a batch of invoices in a single CAE request (FECAESolicitar, up to 250)
create_credit_noteIssue a credit note (Nota de Crédito A/B/C: types 3, 8, 13) referencing an original invoice
create_debit_noteIssue a debit note (Nota de Débito A/B/C: types 2, 7, 12) referencing an original invoice
cancel_invoiceCancel/void an authorized invoice (FECancel — limited to certain types/conditions)
get_invoice_total_x_requestMax number of records allowed per FECAESolicitar request (FECompTotXRequest)
list_concept_typesList available concept types (FEParamGetTiposConcepto: 1=Products, 2=Services, 3=Both)
list_doc_typesList document/identifier types (FEParamGetTiposDoc: 80=CUIT, 86=CUIL, 96=DNI, 99=Consumer Final)
list_iva_typesList IVA tax aliquots (FEParamGetTiposIva: 21%, 10.5%, 27%, 0%, etc.)
list_currency_typesList supported currencies (FEParamGetTiposMonedas)
get_currency_rateGet FX rate (cotización) for a currency vs ARS (FEParamGetCotizacion)
lookup_taxpayerPadrón lookup by CUIT (WS_SR_PADRON A4/A5/A13 — fiscal status, name, address)
get_registration_certificateGet constancia de inscripción (registration certificate) for a CUIT

Auth

Uses certificate-based WSAA authentication (SOAP). The MCP server wraps AFIP's SOAP services (WSFE) internally using a REST approach. You need a valid certificate issued by AFIP. For testing, use the homologation environment.

API Reference


Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

Set these environment variables before launching the server:

  • AFIP_CERT_PATH (required) — Path to AFIP certificate (.crt)
  • AFIP_KEY_PATH (required, secret) — Path to AFIP private key (.key)
  • AFIP_CUIT (required) — CUIT number

Issue credentials at the provider's developer portal: https://www.afip.gob.ar/ws.

License

MIT

Source: packages/argentina/afip/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.0-alpha.3LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts