Facturapi

Finance and commerce

FacturAPI, Mexican CFDI e-invoicing.

Your AI app calls the Facturapi MCP server, which does the finance and commerce work and sends the result back to the chat.

About Facturapi

Facturapi is a community MCP server from codespar, filed in our directory under finance and commerce. FacturAPI, Mexican CFDI e-invoicing.

Facturapi runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-facturapi@0.2.2 and talks to it over standard input and output. It needs FACTURAPI_API_KEY set before Facturapi starts.

Facturapi is listed in the official MCP registry as io.github.codespar/mcp-facturapi, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-facturapi
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-facturapi

How to set up Facturapi

  1. Install Node.js on the machine that runs your AI app, because Facturapi starts with npx and downloads its package on first run.
  2. Create FACTURAPI_API_KEY for Facturapi in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Facturapi to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Facturapi tools to confirm the connection.
  5. Run one read-only task with Facturapi first, and keep your app asking before each tool call until the results look right.

Facturapi compared with similar servers

  • Flow Cl by codespar has fewer GitHub stars than Facturapi (278 against 278); both are community servers, and both run locally.
  • Evolution API by codespar has fewer GitHub stars than Facturapi (278 against 278); both are community servers, and both run locally.
  • Focus Nfe by codespar has fewer GitHub stars than Facturapi (278 against 278); both are community servers, and both run locally.

Before you connect Facturapi

  • Give Facturapi its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Facturapi tool call until you trust what it does with them.
  • Treat text that Facturapi fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Facturapi on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Facturapi

How marketing and sales teams put Facturapi to work, by company size. Pick the size closest to yours and start Facturapi on one use case.

Small business

  • A small business can ask Facturapi which products and customers drive margin, then plan promotions around them.
  • Owners can use Facturapi to check refunds, failed payments and churn reasons without opening three dashboards.
  • Facturapi runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Facturapi to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Facturapi to check spend against budget each week and move money to what's working.
  • Start Facturapi on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Facturapi read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Facturapi to answer revenue questions by channel and region with figures finance signs off on.
  • Facturapi is a community server, so have security review the code and pin a version before Facturapi touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Facturapi README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

MCP FacturAPI

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

Quick Start

# Set your API key
export FACTURAPI_API_KEY="sk_..."

# Run via stdio
npx tsx packages/mexico/facturapi/src/index.ts

# Run via HTTP
npx tsx packages/mexico/facturapi/src/index.ts --http

Environment Variables

Variable Required Description
FACTURAPI_API_KEY Yes API key from FacturAPI dashboard
MCP_HTTP No Set to "true" to enable HTTP transport
MCP_PORT No HTTP port (default: 3000)

Tools (20)

Tool Purpose
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), the customer can later self-invoice it from the receipt's folio
list_receipts List receipts with filters
list_webhooks List 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

Questions about Facturapi

What is the Facturapi MCP server?

FacturAPI, Mexican CFDI e-invoicing. Facturapi is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Facturapi MCP server?

Add Facturapi to your AI app's MCP config with the command npx -y @codespar/mcp-facturapi@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-facturapi -- npx -y @codespar/mcp-facturapi@0.2.2. To run Facturapi this way you need Node.js installed.

Does Facturapi need an API key?

Yes. Facturapi expects FACTURAPI_API_KEY to be set. Create the key for Facturapi in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Facturapi an official MCP server?

No. Facturapi is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Facturapi access to company data.

What license is Facturapi under?

Facturapi is released under the MIT license, according to its GitHub repository. The license covers the code of Facturapi; the service it connects to has its own terms.