npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

facturapi-mcp

v1.0.0

Published

MCP Server for FacturAPI - Mexican Electronic Invoicing (CFDI 4.0). Create, manage, and cancel invoices with AI assistants.

Readme

FacturAPI MCP Server

Connect AI assistants (Claude, Cursor, Windsurf) to Mexican electronic invoicing (CFDI 4.0) via FacturAPI.

Create, manage, and cancel invoices using natural language.

Instead of navigating dashboards and filling forms, just tell your AI:

"Genera una factura para Juan Perez, RFC PEPJ850101ABC, por $5,000 MXN por servicios de consultoría, pagada por transferencia electrónica"

The MCP server handles the rest — SAT-compliant CFDI creation, PDF/XML generation, email delivery, and cancellation.

Features

  • Create invoices — Full CFDI 4.0 with customer, items, taxes, and SAT catalog codes
  • Cancel invoices — SAT-compliant cancellation with proper motives
  • List and search — Find invoices by date, customer, status, or keyword
  • Download PDF/XML — Get the stamped CFDI files
  • Send by email — Deliver invoices directly to customers
  • Manage customers — Create, update, list, and search customers
  • Manage products — Register products/services with SAT codes
  • Payment receipts — Create Complemento de Pago for installment payments
  • SAT catalogs — Look up payment forms, CFDI uses, tax systems, and cancellation motives

15 Tools Available

| Tool | Description | |---|---| | create_invoice | Create a new CFDI electronic invoice | | list_invoices | List invoices with filters (date, status, customer) | | get_invoice | Get detailed info about a specific invoice | | cancel_invoice | Cancel an invoice with SAT-compliant motive | | download_invoice | Download invoice as PDF or XML | | send_invoice_email | Send invoice to customer by email | | create_customer | Register a new customer (RFC, name, address) | | list_customers | List and search customers | | update_customer | Update customer information | | create_product | Register a product/service with SAT codes | | list_products | List registered products | | create_payment_receipt | Create Complemento de Pago | | sat_catalogs | Look up SAT catalog codes | | get_organization | Get your business info |

Quick Start

1. Get your FacturAPI key

  1. Go to dashboard.facturapi.io
  2. Sign up (free sandbox account available)
  3. Copy your API key from Settings

2. Install

npm install facturapi-mcp

3. Configure with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "facturapi": {
      "command": "npx",
      "args": ["facturapi-mcp"],
      "env": {
        "FACTURAPI_API_KEY": "sk_test_your_key_here"
      }
    }
  }
}

4. Use it

Open Claude and start invoicing:

  • "Show me all my invoices from this month"
  • "Create an invoice for ABC Company, RFC ABC010101XYZ, for $10,000 MXN consulting services, paid by wire transfer"
  • "Cancel invoice [ID] because the operation was not carried out"
  • "Download the PDF of invoice [ID]"
  • "What payment form codes are available?"
  • "List my customers"

Configuration for Other AI Tools

Cursor

Add to your Cursor MCP settings:

{
  "facturapi": {
    "command": "npx",
    "args": ["facturapi-mcp"],
    "env": {
      "FACTURAPI_API_KEY": "sk_test_your_key_here"
    }
  }
}

Claude Code

export FACTURAPI_API_KEY=sk_test_your_key_here
claude mcp add facturapi npx facturapi-mcp

SAT Catalog Quick Reference

Common Payment Forms

| Code | Description | |---|---| | 01 | Efectivo (Cash) | | 03 | Transferencia electrónica (Wire transfer) | | 04 | Tarjeta de crédito (Credit card) | | 28 | Tarjeta de débito (Debit card) | | 99 | Por definir (To be defined) |

Common Tax Systems

| Code | Description | |---|---| | 601 | General de Ley Personas Morales | | 612 | Personas Físicas con Actividades Empresariales | | 626 | Régimen Simplificado de Confianza (RESICO) |

Common CFDI Uses

| Code | Description | |---|---| | G01 | Adquisición de mercancías | | G03 | Gastos en general | | S01 | Sin efectos fiscales |

Common Product Keys (Clave SAT)

| Code | Description | |---|---| | 80161500 | Servicios de consultoría de negocios | | 43232408 | Software as a Service (SaaS) | | 80111600 | Servicios de personal temporal | | 82111500 | Publicidad | | 81112100 | Servicios de diseño de software |

Development

# Clone
git clone <repo>
cd facturapi-mcp

# Install
npm install

# Development
FACTURAPI_API_KEY=sk_test_xxx npm run dev

# Build
npm run build

# Type check
npm run check

Environment Variables

| Variable | Required | Description | |---|---|---| | FACTURAPI_API_KEY | Yes | Your FacturAPI API key (starts with sk_test_ for sandbox or sk_live_ for production) |

Pricing

  • Free: 10 invoices/month, read-only queries
  • Pro ($19/mo): Unlimited invoices, bulk operations, customer management
  • Business ($39/mo): Multi-RFC support, automated recurring invoices, analytics

License

MIT

Links