Skip to main content
AF

AFIP

v0.2.0-alpha.2API Keyalpha

Faturamento eletrônico argentino via web services da AFIP. Seu agente emite faturas, notas de crédito e valida CUIT/CUIL.

20 ferramentas3 env vars🇦🇷 Argentinaalpha — validação pendente

O que seu agente faz

O AFIP dá ao seu agente 20 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • 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
Exemplo de chamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_invoice", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-afip@alpha

Quickstart

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "afip": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-afip@alpha"
      ],
      "env": {
        "AFIP_CERT_PATH": "<your_afip_cert_path>",
        "AFIP_KEY_PATH": "<your_afip_key_path>",
        "AFIP_CUIT": "<your_afip_cuit>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 20 ferramentas abaixo — teste create_invoice primeiro.

Variáveis de ambiente · 3

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

AFIP_CERT_PATH
obrigatório

Path to AFIP certificate (.crt)

AFIP_KEY_PATH
obrigatóriosecret

Path to AFIP private key (.key)

AFIP_CUIT
obrigatório

CUIT number

Ferramentas disponíveis · 20

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

WRITEcreate_invoice
Create an electronic invoice (Factura Electrónica) via AFIP
READget_invoice
Get invoice details by type, point of sale, and number
READget_last_invoice_number
Get last authorized invoice number for a point of sale and type
READget_cae_status
Check CAE authorization status for an invoice
READlist_invoice_types
List available invoice types (Factura A, B, C, etc.)
READlist_tax_types
List available tax types (IVA, percepciones, retenciones, etc.)
READget_server_status
Check AFIP web-service availability (WSFE status)
WRITEget_authorized_points_of_sale
List authorized puntos de venta for the CUIT

Frameworks compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Qualquer cliente MCPProtocolo

Perguntas frequentes

Rode `npx -y @codespar/mcp-afip` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
AFIP — MCP server · 20 tools | CodeSpar