Facturama MCP by usefulapi

Read CFDI invoices, clients, products and SAT codes; create clients and products in Facturama.

Should I use this

Quality & Safety

A
Description quality
100%
Schema completeness
97%
Naming quality
78%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Findings (1)

  • LOWTool 'facturama_search_sat_product_codes' name length outside 3-30 rangein facturama_search_sat_product_codes

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~2,979Tokens (tool definitions)
~2.1 KBTypical response size
Significant attention impact (2.33% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "facturama": {
      "url": "https://facturama.usefulapi.io/mcp"
    }
  }
}

Remote endpoints

https://facturama.usefulapi.io/mcpstreamable-http

What it can do

Tool inventory

Tools (11)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢facturama_list_clients(search, start, length)

List the receivers (clients) in the Facturama client catalog, a page at a time, optionally filtered by a search text. Each client has Id, Rfc, Name, FiscalRegime, CfdiUse and TaxZipCode. Facturama API: GET /clients.

Input Schema

{
  "type": "object",
  "properties": {
    "search": {
      "description": "Text to search for (name, RFC, or key word).",
      "type": "string",
      "maxLength": 200
    },
    "start": {
      "description": "Position of the first record (0 = first). Default 0.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "length": {
      "description": "Records per page, 1 to 100. Default 25.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_get_client(client_id)

Get one client of the catalog by its Facturama id, with its fiscal data and address. Facturama API: GET /Client/{Id}.

Input Schema

{
  "type": "object",
  "properties": {
    "client_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The client Id (from facturama_list_clients)."
    }
  },
  "required": [
    "client_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_list_products(search, start, length)

List the products and services in the Facturama product catalog, a page at a time, optionally filtered by a search text. Each item has Id, Name, Description, Price, CodeProdServ, UnitCode and Taxes. Facturama API: GET /products.

Input Schema

{
  "type": "object",
  "properties": {
    "search": {
      "description": "Text to search for (name, RFC, or key word).",
      "type": "string",
      "maxLength": 200
    },
    "start": {
      "description": "Position of the first record (0 = first). Default 0.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "length": {
      "description": "Records per page, 1 to 100. Default 25.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_get_product(product_id)

Get one product or service of the catalog by its Facturama id. Facturama API: GET /Product/{Id}.

Input Schema

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The product Id (from facturama_list_products)."
    }
  },
  "required": [
    "product_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_search_sat_product_codes(keyword)

Search the SAT product and service catalog (ClaveProdServ) by a key word, for example 'software'. Use the returned code as CodeProdServ of a product. Facturama API: GET /catalogs/ProductsOrServices?keyword=.

Input Schema

{
  "type": "object",
  "properties": {
    "keyword": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100,
      "description": "Key word to search for, for example 'software'."
    }
  },
  "required": [
    "keyword"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_search_sat_units(keyword)

Search the SAT unit catalog (ClaveUnidad) by a key word, for example 'kilogramo' or 'servicio'. Use the returned code as UnitCode of a product. Facturama API: GET /catalogs/Units?keyword=.

Input Schema

{
  "type": "object",
  "properties": {
    "keyword": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100,
      "description": "Key word to search for, for example 'servicio'."
    }
  },
  "required": [
    "keyword"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_list_cfdis(page, status, folio, folio_start, folio_end, ...)

List the CFDIs (invoices) issued through the Facturama web API, one page of 10 at a time, with filters for status, folio range, issue date range, receiver name, series, and payment method. Only documents issued through the API appear. Facturama API: GET /cfdi?type=issued.

Input Schema

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number, starting at 0 (10 results per page). Default 0.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "description": "Status filter. Default all.",
      "type": "string",
      "enum": [
        "all",
        "active",
        "canceled"
      ]
    },
    "folio": {
      "description": "Exact folio. Do not combine with folio_start or folio_end.",
      "type": "string",
      "maxLength": 40
    },
    "folio_start": {
      "description": "First folio of a range.",
      "type": "string",
      "maxLength": 40
    },
    "folio_end": {
      "description": "Last folio of a range.",
      "type": "string",
      "maxLength": 40
    },
    "date_start": {
      "description": "Issue date-time from, yyyy-mm-ddThh:mm:ss.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
    },
    "date_end": {
      "description": "Issue date-time to, yyyy-mm-ddThh:mm:ss.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
    },
    "receiver_name": {
      "description": "Receiver name or part of it (taxEntityName).",
      "type": "string",
      "maxLength": 300
    },
    "series": {
      "description": "Invoice series.",
      "type": "string",
      "maxLength": 50
    },
    "order_number": {
      "description": "Order number.",
      "type": "string",
      "maxLength": 100
    },
    "payment_method": {
      "description": "Payment method: PUE (single payment) or PPD (deferred).",
      "type": "string",
      "enum": [
        "PUE",
        "PPD"
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_get_cfdi(cfdi_id, type)

Get the summary of one CFDI by its Facturama id, with its status, folio, receiver, totals and UUID. Type is issued, received or payroll. Facturama API: GET /cfdi/{Id}?type=.

Input Schema

{
  "type": "object",
  "properties": {
    "cfdi_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The CFDI Id (from facturama_list_cfdis)."
    },
    "type": {
      "description": "CFDI type. Default issued.",
      "type": "string",
      "enum": [
        "issued",
        "received",
        "payroll"
      ]
    }
  },
  "required": [
    "cfdi_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢facturama_download_cfdi(cfdi_id, format, type)

Download the XML or PDF file of one CFDI. XML is returned as readable text; PDF and HTML are returned as base64 content. Facturama API: GET /cfdi/{format}/{type}/{Id}.

Input Schema

{
  "type": "object",
  "properties": {
    "cfdi_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "The CFDI Id (from facturama_list_cfdis)."
    },
    "format": {
      "type": "string",
      "enum": [
        "pdf",
        "xml",
        "html"
      ],
      "description": "File format."
    },
    "type": {
      "description": "CFDI type. Default issued.",
      "type": "string",
      "enum": [
        "issued",
        "payroll"
      ]
    }
  },
  "required": [
    "cfdi_id",
    "format"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴facturama_create_client(rfc, name, fiscal_regime, email, cfdi_use, ...)

Create a receiver (client) in the Facturama client catalog. It does not issue any CFDI. Facturama API: POST /Client. Use facturama_list_clients first to avoid a duplicate RFC.

Input Schema

{
  "type": "object",
  "properties": {
    "rfc": {
      "type": "string",
      "pattern": "^[A-Z&Ñ]{3,4}\\d{6}[A-Z0-9]{3}$",
      "description": "RFC of the receiver. Use XAXX010101000 for the general public."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "description": "Name or company name of the receiver, as in the tax registry."
    },
    "fiscal_regime": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "description": "SAT fiscal regime key of the receiver, for example 601."
    },
    "email": {
      "type": "string",
      "maxLength": 200,
      "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,}$",
      "description": "Main e-mail address of the receiver."
    },
    "cfdi_use": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "description": "SAT CFDI use key, for example G01."
    },
    "tax_zip_code": {
      "type": "string",
      "pattern": "^\\d{5}$",
      "description": "Postal code of the receiver's tax address."
    },
    "email_2": {
      "description": "Second e-mail address of the receiver.",
      "type": "string",
      "maxLength": 200,
      "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,}$"
    },
    "street": {
      "description": "Street of the receiver's address.",
      "type": "string",
      "maxLength": 200
    },
    "exterior_number": {
      "description": "Exterior number of the address.",
      "type": "string",
      "maxLength": 50
    },
    "interior_number": {
      "description": "Interior number of the address.",
      "type": "string",
      "maxLength": 50
    },
    "neighborhood": {
      "description": "Neighborhood (colonia) of the address.",
      "type": "string",
      "maxLength": 200
    },
    "zip_code": {
      "description": "Postal code of the address.",
      "type": "string",
      "maxLength": 10
    },
    "locality": {
      "description": "Locality of the address.",
      "type": "string",
      "maxLength": 200
    },
    "municipality": {
      "description": "Municipality of the address.",
      "type": "string",
      "maxLength": 200
    },
    "state": {
      "description": "State of the address.",
      "type": "string",
      "maxLength": 200
    },
    "country": {
      "description": "Country of the address, for example Mex.",
      "type": "string",
      "maxLength": 100
    }
  },
  "required": [
    "rfc",
    "name",
    "fiscal_regime",
    "email",
    "cfdi_use",
    "tax_zip_code"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴facturama_create_product(name, description, price, product_code, unit_code, ...)

Create a product or service in the Facturama product catalog. It does not issue any CFDI. Facturama API: POST /Product. Use facturama_search_sat_product_codes and facturama_search_sat_units to find the SAT keys first.

Input Schema

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "description": "Name of the product or service."
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "Description printed on the invoice line."
    },
    "price": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000,
      "description": "Unit price, without tax."
    },
    "product_code": {
      "type": "string",
      "pattern": "^\\d{8}$",
      "description": "SAT product or service key (ClaveProdServ), for example 81111500."
    },
    "unit_code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "description": "SAT unit key (ClaveUnidad), for example E48 (service unit) or H87 (piece)."
    },
    "unit": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50,
      "description": "Unit name printed on the invoice, for example Servicio or Pieza."
    },
    "object_tax": {
      "type": "string",
      "pattern": "^\\d{2}$",
      "description": "SAT tax object key (ObjetoImp), for example 02 (taxable)."
    },
    "identification_number": {
      "description": "Your internal product number or serial.",
      "type": "string",
      "maxLength": 100
    },
    "taxes": {
      "description": "Taxes that apply to the product.",
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "description": "Tax name, for example IVA."
          },
          "rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Rate as a fraction, for example 0.16 for 16%."
          },
          "is_retention": {
            "description": "True for a withheld tax.",
            "type": "boolean"
          },
          "is_federal_tax": {
            "description": "True for a federal tax. Default true.",
            "type": "boolean"
          },
          "is_quota": {
            "description": "True for a fixed amount per unit (IEPS quota).",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "rate"
        ]
      }
    }
  },
  "required": [
    "name",
    "description",
    "price",
    "product_code",
    "unit_code",
    "unit",
    "object_tax"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded11 tools