Facturapi MCP by usefulapi

Read customers, invoices and receipts; create customers, products and draft invoices in Facturapi.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
93%
命名品質
79%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

發現項目(1)

  • LOWTool 'facturapi_get_invoice_download_url' name length outside 3-30 range在 facturapi_get_invoice_download_url 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~3,202Token(工具定義)
~1.6 KB典型回應大小
顯著的注意力影響(128k 上下文的 2.50%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

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

遠端端點

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

它能做什麼

工具清單

工具(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.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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}.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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}.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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}.

輸入結構描述

{
  "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}.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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}.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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'.

輸入結構描述

{
  "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"
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本15 個工具