Skip to main content
FA

Facturapi

v0.2.1API Key

Facturación electrónica CFDI 4.0 mexicana: crear, timbrar y cancelar facturas con validación del SAT. Tu agente maneja el compliance fiscal mexicano.

20 herramientas1 env vars🇲🇽 Méxicoestable en npm

Qué puede hacer tu agente

Facturapi le da a tu agente 20 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • create_invoiceCreate a CFDI invoice
  • get_invoiceGet invoice by ID
  • list_invoicesList invoices with filters
Ejemplo de llamada
// 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-facturapi

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "facturapi": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-facturapi"
      ],
      "env": {
        "FACTURAPI_API_KEY": "<your_facturapi_api_key>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 20 herramientas de abajo — probá create_invoice primero.

Variables de entorno · 1

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

FACTURAPI_API_KEY
obligatoriosecret

API key for FacturAPI

Herramientas disponibles · 20

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

WRITEcreate_invoice
Create a CFDI invoice
READget_invoice
Get invoice by ID
READlist_invoices
List invoices with filters
DELETEcancel_invoice
Cancel an invoice
READdownload_invoice_pdf
Download invoice as PDF (returns download URL)
READdownload_invoice_xml
Download invoice as XML (returns download URL)
WRITEsend_invoice_email
Send invoice (PDF + XML) by email to the customer or to specific recipients
WRITEcreate_customer
Create a customer for invoicing

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

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

Preguntas frecuentes

Corré `npx -y @codespar/mcp-facturapi` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Facturapi — MCP server · 20 tools | CodeSpar