# MCP Facturapi

> MCP Facturapi is an open-source MCP server for accounting and tax. MCP server giving AI clients access to FacturAPI for Mexican CFDI e-invoicing. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted
- **Repository:** https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/mexico/facturapi
- **MCP Registry name:** io.github.codespar/mcp-facturapi
- **Categories:** [accounting and tax](https://ai-powered.com/categories/accounting-and-tax)
- **Listing updated:** 2026-11-18

## About

The README describes this server as a bridge between AI clients and FacturAPI, a Mexican platform for issuing CFDI electronic invoices, which it compares to Brazil's NFe system. Once connected, a client can create, fetch, list and cancel invoices, pull PDF and XML download links, and email invoices to customers.

Beyond invoices, the server exposes tools for managing customers and products used in invoicing, plus receipts (recibo de venta) that a customer can later convert into an invoice using the receipt's folio. A list-webhooks tool is also included. The server runs over stdio via an npm package, and the README also mentions an HTTP mode toggled by an environment variable.

The README points mainly at developers and finance teams in Mexico who want an agent to handle invoicing tasks. It requires a FacturAPI API key, which is read from an environment variable and stored as a secret.

## Features

- **Invoice lifecycle tools:** Create, retrieve, list and cancel CFDI invoices through dedicated MCP tools.
- **PDF and XML downloads:** Returns download URLs for invoice PDF and XML files.
- **Email delivery:** Sends invoices with PDF and XML attachments to the customer or chosen recipients.
- **Customer and product records:** Create, read, update and delete customers and products used for invoicing.
- **Receipt to invoice flow:** Creates sales receipts that customers can later self-invoice using the folio.
- **Stdio and HTTP transport:** Runs over stdio by default, with an optional HTTP mode set by environment variable.

## Good for

- Letting an AI assistant issue CFDI invoices after a sale is recorded
- Looking up or cancelling past invoices from a chat interface
- Emailing invoice PDFs and XML files to customers automatically
- Keeping customer and product catalogs in sync for invoicing
- Generating sales receipts that customers can convert into invoices themselves

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-facturapi --env FACTURAPI_API_KEY='<FACTURAPI_API_KEY>' -- npx -y @codespar/mcp-facturapi
```

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-facturapi": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-facturapi"
      ],
      "env": {
        "FACTURAPI_API_KEY": "<FACTURAPI_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `create_invoice`: Create a CFDI invoice
- `get_invoice`: Get invoice by ID
- `list_invoices`: List invoices with filters
- `cancel_invoice`: Cancel an invoice
- `download_invoice_pdf`: Download invoice as PDF (returns download URL)
- `download_invoice_xml`: Download invoice as XML (returns download URL)
- `send_invoice_email`: Send invoice (PDF + XML) by email to the customer or to specific recipients
- `create_customer`: Create a customer for invoicing
- `get_customer`: Get customer by ID
- `list_customers`: List customers with optional filters
- `update_customer`: Update an existing customer (partial update)
- `delete_customer`: Delete a customer
- `create_product`: Create a product for invoicing
- `get_product`: Get product by ID
- `list_products`: List products
- `update_product`: Update an existing product (partial update)
- `delete_product`: Delete a product
- `create_receipt`: Create a receipt (recibo de venta)
- `list_receipts`: List receipts with filters
- `list_webhooks`: List configured webhooks

## FAQ

### What credential does the server need?

It requires a FacturAPI API key, provided through the FACTURAPI_API_KEY environment variable and marked as secret.

### Which transports are supported?

The registry entry lists stdio. The README also describes an optional HTTP mode enabled with MCP_HTTP and configured with MCP_PORT.

### What license does it use?

The README states the MIT license.

### How many tools does it expose?

The README lists 20 tools covering invoices, customers, products, receipts and webhooks.

### Is MCP Facturapi free?

Yes. MCP Facturapi is open source, so you can use and self-host it for free.

### How do I add MCP Facturapi to Claude Code?

Run this command in your terminal: claude mcp add mcp-facturapi --env FACTURAPI_API_KEY='<FACTURAPI_API_KEY>' -- npx -y @codespar/mcp-facturapi

### What are the best alternatives to MCP Facturapi?

The closest alternatives to MCP Facturapi are Facture App MCP by usefulapi, Facturis Online MCP by usefulapi, Cuéntica MCP by usefulapi, Fiscalo MCP by usefulapi and WeFact MCP by usefulapi.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Facture App MCP by usefulapi](https://ai-powered.com/mcp/facture-app-mcp-by-usefulapi): Facture App MCP by usefulapi is a freemium MCP server for finance and payments.
- [Facturis Online MCP by usefulapi](https://ai-powered.com/mcp/facturis-online-mcp-by-usefulapi): Facturis Online MCP by usefulapi is a freemium MCP server for accounting and tax.
- [Cuéntica MCP by usefulapi](https://ai-powered.com/mcp/cuentica-mcp-by-usefulapi): Cuéntica MCP by usefulapi is a freemium MCP server for accounting and tax.
- [Fiscalo MCP by usefulapi](https://ai-powered.com/mcp/fiscalo-mcp-by-usefulapi): Fiscalo MCP by usefulapi is a freemium MCP server for accounting and tax.
- [WeFact MCP by usefulapi](https://ai-powered.com/mcp/wefact-mcp-by-usefulapi): WeFact MCP by usefulapi is a freemium MCP server for accounting and tax.
- [Fakturowo MCP by usefulapi](https://ai-powered.com/mcp/fakturowo-mcp-by-usefulapi): Fakturowo MCP by usefulapi is a freemium MCP server for accounting and tax.
- [Invoices Online MCP by usefulapi](https://ai-powered.com/mcp/invoices-online-mcp-by-usefulapi): Invoices Online MCP by usefulapi is a freemium MCP server for accounting and tax.
- [Invoice Office MCP by usefulapi](https://ai-powered.com/mcp/invoice-office-mcp-by-usefulapi): Invoice Office MCP by usefulapi is a freemium MCP server for accounting and tax.

---
Source: https://ai-powered.com/mcp/mcp-facturapi
