Mcp Facturapi

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

FacturAPI — Mexican CFDI e-invoicing

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Local MCP server for FacturAPI, Mexico's CFDI e-invoicing platform, letting an assistant create, fetch, cancel and email invoices and manage customers and catal

What you can do
Create, retrieve, list and cancel CFDI invoices, and get PDF or XML download links for them, plus email invoices to customers or chosen recipients. Create, read, list, update and delete customers used for invoicing. Create, read, list, update and delete products used on invoices. Create and list sales receipts that customers can later self-invoice, and list configured webhooks.
When to use it
Useful when an assistant should handle Mexican CFDI invoicing end to end: issuing or cancelling invoices, sending them by email, and keeping customer and product records in sync with FacturAPI.
Requirements
Runs as a local process via npm package @codespar/mcp-facturapi over stdio (an HTTP mode is also documented). Requires a FacturAPI account and API key supplied in the FACTURAPI_API_KEY environment variable, plus network access to the FacturAPI service.
Before you install
The API key in FACTURAPI_API_KEY is a secret with billing and fiscal authority over the account. Tools create, update, delete and cancel records, and cancelling an invoice or emailing it to a customer has real legal and commercial consequences. The README also mentions an enterprise add-on for agent payment governance, which is separate from this server.

Installation

In SourceWeft

  1. Open Mcp Facturapi in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

MCP FacturAPI

MCP server for FacturAPI — Mexican CFDI e-invoicing platform (equivalent to Brazil's NFe).

Quick Start

bash
# Set your API keyexport FACTURAPI_API_KEY="sk_..."
# Run via stdionpx tsx packages/mexico/facturapi/src/index.ts
# Run via HTTPnpx tsx packages/mexico/facturapi/src/index.ts --http

Environment Variables

VariableRequiredDescription
FACTURAPI_API_KEYYesAPI key from FacturAPI dashboard
MCP_HTTPNoSet to "true" to enable HTTP transport
MCP_PORTNoHTTP port (default: 3000)

Tools (20)

ToolPurpose
create_invoiceCreate a CFDI invoice
get_invoiceGet invoice by ID
list_invoicesList invoices with filters
cancel_invoiceCancel an invoice
download_invoice_pdfDownload invoice as PDF (returns download URL)
download_invoice_xmlDownload invoice as XML (returns download URL)
send_invoice_emailSend invoice (PDF + XML) by email to the customer or to specific recipients
create_customerCreate a customer for invoicing
get_customerGet customer by ID
list_customersList customers with optional filters
update_customerUpdate an existing customer (partial update)
delete_customerDelete a customer
create_productCreate a product for invoicing
get_productGet product by ID
list_productsList products
update_productUpdate an existing product (partial update)
delete_productDelete a product
create_receiptCreate a receipt (recibo de venta) — the customer can later self-invoice it from the receipt's folio
list_receiptsList receipts with filters
list_webhooksList configured webhooks

Auth

Uses Bearer token authentication. Obtain your API key from the FacturAPI Dashboard.

API Reference


Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

Set these environment variables before launching the server:

  • FACTURAPI_API_KEY (required, secret) — API key for FacturAPI

Issue credentials at the provider's developer portal: https://docs.facturapi.io.

License

MIT

Source: packages/mexico/facturapi/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts