keycae-mcp
keycae-mcp 🔌
MCP Server for KeyCAE.ar — Argentine electronic invoicing (facturación electrónica) with ARCA/AFIP.
Let AI agents emit invoices, manage credentials, and handle delegations directly.
⚡ Quick Start
npx keycae-mcpThat's it. Your AI agent now has 10 tools for Argentine invoicing.
⚠️ Requisito: Delegación en ARCA
ANTES de facturar, debés delegar la facturación electrónica al representante de KeyCAE en ARCA:
Ingresá a ARCA Clave Fiscal
Buscá el servicio "Facturación Electrónica" (ws://wsfe)
Delegá al CUIT representante: 20254459306 (Amilcar Waldemar Serra)
Aceptá la relación de representación
Sin esta delegación, no podés emitir facturas. El MCP server te permite verificar el estado con check_delegation y solicitarla con request_delegation.
🔧 Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"keycae": {
"command": "npx",
"args": ["-y", "keycae-mcp"],
"env": {
"KEYCAE_API_KEY": "sk_live_..."
}
}
}
}Cursor / Windsurf
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"keycae": {
"command": "npx",
"args": ["-y", "keycae-mcp"],
"env": {
"KEYCAE_API_KEY": "sk_live_..."
}
}
}
}🛠️ Available Tools
Tool | Description |
| Emit an Argentine electronic invoice (A, B, C, M, E) |
| Get details of a previously emitted invoice |
| List recent invoices |
| List digital certificates for the CUIT |
| Generate RSA keypair + CSR for ARCA |
| Check ARCA delegation status |
| Request ARCA delegation for invoicing |
| Look up taxpayer by CUIT |
| Check billing plan and usage |
| Health check |
💡 Example Usage
1. Check if ready to invoice
User: ¿Puedo facturar con el CUIT 20254459306?Agent calls check_delegation → confirms delegation is active, then list_credentials → confirms certificate is valid.
2. Request delegation (if not done)
User: Necesito delegar mi facturación a KeyCAEAgent calls request_delegation → starts the delegation process.
3. Emit a Factura B
User: Emití una factura B al CUIT 20333444555 por $15.000 ARS por "Servicios de consulting"Agent calls emit_invoice:
{
"cuit_emisor": "20254459306",
"punto_de_venta": 3,
"tipo_comprobante": "B",
"receptor": { "tipo_doc": "CUIT", "nro_doc": "20333444555" },
"conceptos": [{ "descripcion": "Servicios de consulting", "precio": 15000 }]
}📋 Invoice Types
Type | Description | When to use |
A | IVA discriminado | RI → RI |
B | IVA incluido | RI → Consumidor Final |
C | Exento | No genera IVA |
M | Monotributo | Monotributo emitter |
E | Exportación | International clients |
🔗 Links
🌐 keycae.ar — API & Dashboard
📖 docs.keycae.ar — Documentation
📄 llms.txt — AI Agent Reference
🔌 mcp.so — MCP Directory
🤖 glama.ai — Glama Directory
📦 Related Packages
keycae-ts— TypeScript SDKkeycae-cli— CLI tool
📄 License
MIT
Available Tools
12 toolscheck_delegationA
Check the ARCA/AFIP delegation status for the authenticated CUIT. Delegation is required before emitting invoices.
Inputs: no named parameters.
check_emission_capabilityA
Check what types of invoices a CUIT can emit. Returns compatible invoice types based on tax condition (Monotributo, RI, Exento).
Inputs: cuit (required).
create_credentialA
Generate a new RSA keypair and Certificate Signing Request (CSR) for ARCA/AFIP. The CSR must be submitted to AFIP to obtain a digital certificate.
Inputs: cuit (required), organization (required), common_name.
emit_invoiceB
Emit an Argentine electronic invoice (factura electrónica) via ARCA/AFIP. Returns CAE, PDF URL, and QR code.
Inputs: cuit_emisor (required), punto_de_venta (required), tipo_comprobante (required), receptor (required), +3 more.
get_billing_statusA
Check the current billing plan, monthly usage, and remaining invoice quota.
Inputs: no named parameters.
get_invoiceA
Get details of a previously emitted invoice by its ID.
Inputs: invoice_id (required).
keycae_healthA
Check if the KeyCAE API is healthy and reachable.
Inputs: no named parameters.
list_credentialsA
List all digital certificates (credentials) registered for the authenticated CUIT.
Inputs: no named parameters.
list_invoicesB
List recent invoices for the authenticated tenant.
Inputs: limit, offset.
list_puntos_de_ventaA
List available points of sale (puntos de venta) for the authenticated CUIT. Shows which ones are enabled for electronic invoicing.
Inputs: no named parameters.
lookup_taxpayerB
Look up an Argentine taxpayer (contribuyente) by CUIT in the AFIP registry. Returns name, tax condition, and active activities.
Inputs: cuit (required).
request_delegationA
Request ARCA/AFIP delegation for electronic invoicing. This authorizes KeyCAE (the representative) to emit invoices on your behalf. If Hermes auto-delegation is enabled, this is processed automatically.
Inputs: cuit (required), organization (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
All tools have clearly distinct purposes, covering delegation, credentials, invoices, points of sale, taxpayer lookup, and health check. No two tools overlap in functionality.
Most tools follow a consistent verb_noun pattern (e.g., check_delegation, emit_invoice). The only minor deviation is keycae_health, which uses a noun_noun format but is still clear.
12 tools is a well-scoped set for an electronic invoicing API. Each tool addresses a distinct aspect of the domain without being excessive or insufficient.
The set covers creation and retrieval but lacks critical operations like invoice cancellation, credential deletion, and delegation revocation. These missing lifecycle steps likely cause agent failures in common workflows.
Related MCP Connectors
Argentina AFIP/ARCA electronic invoices for AI agents - issue & query facturas, get CAE via WSFE.
Argentina CUIT/CUIL validation and AFIP fiscal QR generation. Pure, no-auth MCP tools.
Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.
Hosted Argentine commerce MCP: real AFIP invoicing, MercadoPago, logistics, catalog & WhatsApp.