Facturama MCP by usefulapi
Read CFDI invoices, clients, products and SAT codes; create clients and products in Facturama.
사용해야 할까요
품질 및 안전성
발견 사항 (1)
- LOWfacturama_search_sat_product_codes에서
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"facturama": {
"url": "https://facturama.usefulapi.io/mcp"
}
}
}원격 엔드포인트
https://facturama.usefulapi.io/mcpstreamable-http할 수 있는 일
도구 목록
도구 (11)
🟢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.
입력 스키마
{
"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}.
입력 스키마
{
"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.
입력 스키마
{
"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}.
입력 스키마
{
"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=.
입력 스키마
{
"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=.
입력 스키마
{
"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.
입력 스키마
{
"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=.
입력 스키마
{
"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}.
입력 스키마
{
"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.
입력 스키마
{
"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.
입력 스키마
{
"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"
}커뮤니티
증거