Facturapi MCP by usefulapi
Read customers, invoices and receipts; create customers, products and draft invoices in Facturapi.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (1)
- LOWen facturapi_get_invoice_download_url
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"facturapi": {
"url": "https://facturapi.usefulapi.io/mcp"
}
}
}Puntos de conexión remotos
https://facturapi.usefulapi.io/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (15)
🟢facturapi_get_organization
Get the organization that owns this API key: legal name, tax id (RFC), tax regime, environment, and settings. Good first call to confirm which company the key controls. Facturapi API: GET /organizations/me.
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_list_customers(q, page, limit)
Search or list the organization's customers (receivers of invoices) with legal name, RFC, tax system and email. Facturapi API: GET /customers.
Esquema de entrada
{
"type": "object",
"properties": {
"q": {
"description": "Free-text search (name, RFC, folio, UUID, and so on).",
"type": "string"
},
"page": {
"description": "Page of results, starting at 1.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page, 1 to 100 (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_get_customer(customer_id)
Get one customer by id, including RFC, legal name, tax system, address and default invoice use. Facturapi API: GET /customers/{customer_id}.
Esquema de entrada
{
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"minLength": 1,
"description": "The customer id."
}
},
"required": [
"customer_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_list_products(q, sku, page, limit)
Search or list the organization's products and services (catalog items used on invoices) with description, product key, price, unit and taxes. Facturapi API: GET /products.
Esquema de entrada
{
"type": "object",
"properties": {
"q": {
"description": "Free-text search (name, RFC, folio, UUID, and so on).",
"type": "string"
},
"sku": {
"description": "Only products with this SKU.",
"type": "string"
},
"page": {
"description": "Page of results, starting at 1.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page, 1 to 100 (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_get_product(product_id)
Get one product by id, including its SAT product key, unit key, price and tax settings. Facturapi API: GET /products/{product_id}.
Esquema de entrada
{
"type": "object",
"properties": {
"product_id": {
"type": "string",
"minLength": 1,
"description": "The product id."
}
},
"required": [
"product_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_search_product_keys(q, page, limit)
Search the SAT product and service key catalog (clave prodserv), needed to create a product. Use the returned key as product_key. Facturapi API: GET /catalogs/products.
Esquema de entrada
{
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"description": "Words to search for, in Spanish or English (for example 'software' or 'servicios')."
},
"page": {
"description": "Page of results, starting at 1.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page, 1 to 100 (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"q"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_search_units(q, page, limit)
Search the SAT measurement unit catalog (clave unidad), needed for a product's unit_key. Facturapi API: GET /catalogs/units.
Esquema de entrada
{
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"description": "Words to search for, in Spanish or English (for example 'pieza' or 'hora')."
},
"page": {
"description": "Page of results, starting at 1.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page, 1 to 100 (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"q"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_list_invoices(q, customer, type, payment_status, payment_method, ...)
List or search CFDI invoices: folio, customer, total, payment status, SAT UUID and date. Filter by date range, customer, type, payment status or series. Facturapi API: GET /invoices.
Esquema de entrada
{
"type": "object",
"properties": {
"q": {
"description": "Free-text search (name, RFC, folio, UUID, and so on).",
"type": "string"
},
"customer": {
"description": "Only invoices of this customer id.",
"type": "string"
},
"type": {
"description": "CFDI type: I income, E expense, P payment, N payroll, T transfer.",
"type": "string",
"enum": [
"I",
"E",
"P",
"N",
"T"
]
},
"payment_status": {
"description": "Only paid or only unpaid invoices.",
"type": "string",
"enum": [
"paid",
"unpaid"
]
},
"payment_method": {
"description": "PUE paid at issue, PPD paid later.",
"type": "string",
"enum": [
"PUE",
"PPD"
]
},
"series": {
"description": "Only invoices of this series.",
"type": "string"
},
"uuid": {
"description": "Only the invoice with this SAT UUID.",
"type": "string"
},
"date_from": {
"description": "Only items on or after this date (yyyy-mm-dd or ISO date-time).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}"
},
"date_to": {
"description": "Only items on or before this date (yyyy-mm-dd or ISO date-time).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}"
},
"page": {
"description": "Page of results, starting at 1.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page, 1 to 100 (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_get_invoice(invoice_id)
Get one invoice by id: status, folio, SAT UUID, customer, items, totals, payment status and cancellation status. Facturapi API: GET /invoices/{invoice_id}.
Esquema de entrada
{
"type": "object",
"properties": {
"invoice_id": {
"type": "string",
"minLength": 1,
"description": "The invoice id."
}
},
"required": [
"invoice_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_get_invoice_download_url(invoice_id, format)
Get a temporary download URL for an invoice file: PDF, XML or ZIP (PDF and XML). Facturapi API: GET /invoices/{invoice_id}/download-url/{format}.
Esquema de entrada
{
"type": "object",
"properties": {
"invoice_id": {
"type": "string",
"minLength": 1,
"description": "The invoice id."
},
"format": {
"type": "string",
"enum": [
"pdf",
"xml",
"zip"
],
"description": "File format to download."
}
},
"required": [
"invoice_id",
"format"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_list_receipts(q, customer, payment_form, date_from, date_to, ...)
List or search e-receipts (non-fiscal sales receipts that a customer can later convert to an invoice). Filter by date range or customer. Facturapi API: GET /receipts.
Esquema de entrada
{
"type": "object",
"properties": {
"q": {
"description": "Free-text search (name, RFC, folio, UUID, and so on).",
"type": "string"
},
"customer": {
"description": "Only receipts of this customer id.",
"type": "string"
},
"payment_form": {
"description": "SAT payment form code, two digits (for example '03').",
"type": "string"
},
"date_from": {
"description": "Only items on or after this date (yyyy-mm-dd or ISO date-time).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}"
},
"date_to": {
"description": "Only items on or before this date (yyyy-mm-dd or ISO date-time).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}"
},
"page": {
"description": "Page of results, starting at 1.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page, 1 to 100 (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢facturapi_get_receipt(receipt_id)
Get one e-receipt by id, including its items, total, customer and whether it was invoiced. Facturapi API: GET /receipts/{receipt_id}.
Esquema de entrada
{
"type": "object",
"properties": {
"receipt_id": {
"type": "string",
"minLength": 1,
"description": "The e-receipt id."
}
},
"required": [
"receipt_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴facturapi_create_customer(legal_name, tax_id, tax_system, zip, email)
Create a customer (invoice receiver) with legal name, RFC, SAT tax system and postal code. Creates a record only; nothing is sent or stamped. Facturapi API: POST /customers.
Esquema de entrada
{
"type": "object",
"properties": {
"legal_name": {
"type": "string",
"minLength": 1,
"description": "Legal name, as registered with the SAT."
},
"tax_id": {
"description": "RFC (tax id), for example 'XAXX010101000' for the generic public.",
"type": "string"
},
"tax_system": {
"description": "SAT tax regime code, for example '601'.",
"type": "string"
},
"zip": {
"description": "Five-digit postal code of the customer's fiscal address.",
"type": "string"
},
"email": {
"description": "Email for the customer record.",
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
}
},
"required": [
"legal_name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴facturapi_create_product(description, product_key, price, tax_included, unit_key, ...)
Create a product or service for invoices, with its SAT product key, price and unit. Use facturapi_search_product_keys and facturapi_search_units first. Facturapi API: POST /products.
Esquema de entrada
{
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"description": "Product or service description, as it appears on the invoice."
},
"product_key": {
"type": "string",
"minLength": 1,
"description": "SAT product and service key (clave prodserv), for example '01010101'."
},
"price": {
"type": "number",
"minimum": 0,
"description": "Unit price."
},
"tax_included": {
"description": "true when the price already includes taxes (default true).",
"type": "boolean"
},
"unit_key": {
"description": "SAT unit key (clave unidad), for example 'H87' for piece (default H87).",
"type": "string"
},
"unit_name": {
"description": "Unit name shown on the invoice, for example 'Pieza'.",
"type": "string",
"maxLength": 20
},
"sku": {
"description": "Your own SKU for this product.",
"type": "string"
}
},
"required": [
"description",
"product_key",
"price"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴facturapi_create_draft_invoice(customer_id, items, payment_form, payment_method, use, ...)
Create a DRAFT CFDI invoice for an existing customer and existing products. A draft is not stamped and not sent to the SAT; review it in the Facturapi dashboard before stamping there. Facturapi API: POST /invoices with status 'draft'.
Esquema de entrada
{
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"minLength": 1,
"description": "Id of an existing customer (use facturapi_list_customers)."
},
"items": {
"minItems": 1,
"maxItems": 2000,
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"minLength": 1,
"description": "Id of an existing product (use facturapi_list_products)."
},
"quantity": {
"default": 1,
"description": "Quantity (default 1).",
"type": "number",
"exclusiveMinimum": 0
},
"discount": {
"description": "Discount amount for this line.",
"type": "number",
"minimum": 0
}
},
"required": [
"product_id"
]
},
"description": "Invoice lines, one per product (up to 2000 here; the API allows 5000)."
},
"payment_form": {
"description": "SAT payment form code, two digits (for example '03').",
"type": "string",
"minLength": 2,
"maxLength": 2
},
"payment_method": {
"description": "PUE paid at issue, PPD paid later.",
"type": "string",
"enum": [
"PUE",
"PPD"
]
},
"use": {
"description": "SAT CFDI use code, for example 'G03'.",
"type": "string"
},
"currency": {
"description": "Currency code, for example 'MXN' (default MXN).",
"type": "string"
},
"conditions": {
"description": "Payment terms text shown on the invoice.",
"type": "string",
"maxLength": 1000
},
"external_id": {
"description": "Your own reference for this invoice.",
"type": "string"
},
"idempotency_key": {
"description": "Key to avoid creating the same draft twice on a retry.",
"type": "string",
"maxLength": 100
}
},
"required": [
"customer_id",
"items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Comunidad
Evidencia