# Facturama (SAT) MCP

> Facturama (SAT) connects your AI client directly to Mexico's official tax backend, automating CFDI invoicing and compliance checks. Use this MCP to generate legally valid digital receipts, verify product codes against government catalogs, manage clients, and pull historical invoice data—all through natural conversation.

## Overview
- **Category:** government-public-data
- **Price:** Free
- **Tags:** tax-compliance, invoicing, cfdi, mexico-tax, ledger-management, electronic-receipts

## Description

Dealing with Mexican tax paperwork shouldn't require a specialized accounting degree. This MCP connects your AI client to the official Facturama/SAT Mexico system, giving you direct access to all digital fiscal receipt (CFDI 4.0) processes. You can tell your agent exactly what needs to happen: generate a formal invoice for a specific client with accurate RFC details; check if an old PDF bill is still valid in the system; or even pull the complete catalog of government-registered products.

It handles all the complex, bureaucratic steps involved in Mexican commerce. Instead of manually logging into multiple tax portals and dealing with confusing UIs, you simply ask your agent to perform the action. For instance, you can request a list of all recently issued invoices or verify a client's complete fiscal profile before drafting anything. Because this connection is hosted on Vinkius, you get centralized access to this specialized financial logic alongside thousands of other tools. It means your AI agent acts less like an assistant and more like a dedicated virtual tax specialist.

## Tools

### create_client
Registers a new business-to-business invoice recipient in the system.

### delete_client
Removes a client's record from the tax receiver context.

### get_tax_status
Reads the current official SAT compliance tax status for an entity.

### list_catalog
Scans and retrieves standard government-mandated product codes (SAT).

### list_taxes
Reads the internal tax schema profiles used for calculating liabilities.

### send_invoice_email
Automatically pushes a generated invoice to a specified local email address.

### cancel_invoice
Cancels an already issued CFDI or tax invoice within the system.

### create_invoice
Generates and issues a formal, legally binding digital tax invoice (CFDI).

### get_client
Retrieves the full fiscal profile details for one specific client.

### get_invoice_file
Extracts a visual, graphic representation of an invoice as a Base64 file.

### get_product
Fetches detailed tax specifics for a targeted product code from the SAT database.

### list_clients
Lists all registered B2B clients along with their official Mexican tax identification numbers (RFC).

### list_invoices
Retrieves a list of all issued CFDI invoices and their statuses.

### list_products
Lists various tax-mapped registered products available for invoicing.

## Prompt Examples

**Prompt:** 
```
Check for recently emitted Valid CFDI invoices.
```

**Response:** 
```
Running deep listing... I found 3 officially signed XML Invoices. Folio 001 issued 3 days ago for 'TechCorp Latam' carrying valid SAT standing, and Folio 002 for 'Local Business'. Both marked successfully Issued.
```

**Prompt:** 
```
Check the detailed fiscal specifications for our currently registered client ID: C0098.
```

**Response:** 
```
Sourced. Client ID 'C0098' belongs to 'Agencia Global S.A.' bearing the authentic SAT RFC tag 'AGE120092B08'. Their primary designated CFDI usage rule is set to 'G03 (Comercial Expenses)'. Ready to write an invoice against it?
```

**Prompt:** 
```
Prepare and issue a new invoice. Sell Product ID p-3200 to Receiver ID c-099 using '01' as payment mode.
```

**Response:** 
```
Done natively! I sent the exact construct containing proper payloads into Facturama endpoint. Result is positive: Generated CFDI with UUID `9E032A9A-1D8...`. It has been stamped officially by the SAT.
```

## Capabilities

### Issue Digital Tax Invoices
Generate legally compliant CFDI invoices for Mexican clients, attaching correct fiscal data.

### Manage Client Records
Create new B2B client accounts or retrieve a specific client's official tax profile and details.

### Verify Tax Statuses
Check the current compliance status of an entity against internal SAT records.

### Retrieve Product/Tax Data
Access official government catalogs for product specifics and tax rate schemas.

### Track Invoices & Files
List all issued invoices or extract the graphical representation of an invoice file.

## Use Cases

### Client Onboarding & Validation
A new client signs a contract. Instead of emailing them a compliance checklist, the agent uses `list_clients` to see if they already exist in the system. If not, it runs `create_client`, getting their verified tax profile ready for invoicing.

### End-of-Day Reconciliation
The e-commerce team needs to know which sales were paid but haven't been invoiced yet. They ask the agent to check recent transactions, triggering `list_invoices` and then using `get_invoice_file` for physical records.

### Tax Code Audit
An accounting lead suspects a product code is wrong on old invoices. They ask the agent to cross-reference it, triggering `list_products` and then using `get_product` to ensure the specific tax details are accurate.

### Correcting Errors
The team realizes they issued an invoice to a client who changed their name. They use `cancel_invoice` first, followed by `update_client` (conceptually), and then reissue the corrected document using `create_invoice`.

## Benefits

- Generate proper invoices instantly. Instead of manually filling out forms, use the `create_invoice` tool to issue a formal digital tax invoice with all necessary SAT compliance fields.
- Verify client data before invoicing. Use `list_clients` or `get_client` to check if a recipient has the correct RFC and fiscal profile, preventing failed transactions.
- Handle complex product coding simply. The `list_catalog` tool lets your agent scan standard government codes so you never use an invalid SAT product ID again.
- Maintain a complete audit trail. Use `list_invoices` to pull a list of all issued CFDIs and check their current status without logging into the portal.
- Fix mistakes fast. If an invoice needs correcting, your agent can execute `cancel_invoice`, ensuring your records stay clean and compliant.

## How It Works

The bottom line is you tell your AI client what financial task needs doing, and it executes the necessary calls to Mexico's official tax system on your behalf.

1. Append this tax-heavy integration logic to your environment.
2. Add your traditional basic authentication API configuration into the credentials setup.
3. Your agent is ready. You process accounting loops using pure natural chat commands.

## Frequently Asked Questions

**How do I check if a client is valid using Facturama (SAT) MCP?**
You can use the `get_tax_status` tool to read an entity's current compliance status against SAT. This confirms if they are legally allowed to transact and receive invoices.

**Can I create a new invoice with Facturama (SAT) MCP?**
Yes, use the `create_invoice` tool. You provide the product ID, client details, and payment mode, and the agent handles the formal digital tax invoice generation.

**What is the best way to retrieve a list of past invoices with Facturama (SAT) MCP?**
Simply run `list_invoices`. This tool provides a comprehensive list of all issued CFDIs, letting you track everything from old bills to recent transactions.

**Does Facturama (SAT) MCP handle product codes?**
Yes. Use `list_catalog` or `get_product` to scan and retrieve detailed, government-validated SAT codes for any item you plan to invoice.

**Can I cancel an invoice using Facturama (SAT) MCP?**
Yes. The `cancel_invoice` tool allows you to formally cancel a previously issued CFDI, which is vital for correcting billing errors in compliance.