mcp
v0.1.3MCP server for Pagai — issue invoices, create payment links and check payments from Claude, Cursor or any MCP client
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_invoice Emitir factura
Issue an invoice and send it to the customer. Call this when the user wants to charge someone a specific amount for specific line items — 'cóbrale $50.000 a Juan por el diseño web'. The customer is matched by email (or phone when there is no email) and created if new. Returns a public payment URL to give back: with only a phone nothing is emailed, so the link is how they pay. For a quick charge with no itemisation, prefer create_payment_link. Identical requests within 24h are deduplicated and return the first result; to charge the same thing twice on purpose, set a different external_refer…
| Parameter | Type | Description |
|---|---|---|
customer_name * | string | Who is being billed. |
due_date * | string | Payment deadline, YYYY-MM-DD. Ask the user if unclear rather than guessing — a wrong due date starts the dunning clock early. |
items * | array | Line items. Prices are net: 19% IVA is added on top unless tax_inclusive is true. |
currency | string | ISO code, CLP by default. |
customer_email | string | Matches an existing customer, so use the real address. Email or phone is required. |
customer_phone | string | Customer's phone, e.g. their WhatsApp number. Used when there is no email. |
customer_rut | string | Chilean tax ID, if known. |
document_kind | string | 'invoice' (factura, default), 'receipt' (boleta, for consumers) or 'quote' (cotización). |
external_reference | string | Your own order number, echoed back on webhooks so you can correlate. |
skip_dte | boolean | True to send it without a DTE (no SII tax document, not even when a quote gets paid): only when the user says so. |
tax_inclusive | boolean | True when the user's amounts already include IVA ('$50.000 IVA incluido'). Ask if unclear. |
create_payment_link Crear link de pago
Create a payment link for a one-off charge. Call this when the user wants to get paid quickly and doesn't need an itemised invoice — 'mándame un link de pago por $30.000'. Returns a URL the customer opens to pay. Use create_invoice instead when line items or a due date matter. Identical requests within 24h are deduplicated and return the first result; to charge the same thing twice on purpose, set a different external_reference.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Total to charge. |
customer_name * | string | |
description * | string | What the customer is paying for; shown on the page. |
cancel_url | string | Where to send them if they abandon. HTTPS. Omit unless the user gave one. |
currency | string | ISO code, CLP by default. |
customer_email | string | Matches an existing customer, so use the real address. Email or phone is required. |
customer_phone | string | Customer's phone, e.g. their WhatsApp number. Used when there is no email. |
expires_in_hours | integer | How long the link stays payable, 1-168 hours. Defaults to 24. When it expires you get a checkout.expired webhook. |
external_reference | string | Your own order id, echoed back on webhooks. |
success_url | string | Where to send the customer after paying. HTTPS. Omit unless the user gave one. |
list_invoices Listar facturas
List invoices, most recent first. Call this for questions about what is outstanding — 'qué tengo por cobrar', 'muéstrame las facturas vencidas'. Filter with status: use 'overdue' for late invoices and 'sent' for issued-but-not-yet-paid ones. Use customer to answer '¿me pagó Juan?'.
| Parameter | Type | Description |
|---|---|---|
customer | string | Part of the customer name, email or RUT, or their phone in any format. |
limit | integer | How many to return, default 20. |
status | string | Omit for all. |
get_invoice_status Estado de una factura
Check whether a specific invoice was paid, and when. Call this for '¿me pagó Juan?' or before chasing someone, so you don't send a reminder for an invoice that is already settled.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | string | UUID returned by create_invoice or list_invoices. |
mark_invoice_paid Marcar como pagada
Record a payment that happened outside Pagai, typically a bank transfer. Call this when the user says they already got paid — 'Juan me transfirió, márcala pagada'. This stops automated reminders. It does NOT move money; it only records that money arrived.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | string | |
notes | string | Free-text reference, e.g. the transfer number. |
payment_method | string | How it was paid, e.g. 'bank_transfer', 'cash'. |
send_reminder Enviar recordatorio
Email a payment reminder for an unpaid invoice. Call this when the user wants to chase a specific customer — 'recuérdale a Juan que me pague'. Check get_invoice_status first: reminding someone who already paid is worse than not reminding at all.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | string | |
custom_message | string | Optional note added to the reminder email. |
cancel_invoice Anular documento
Cancel an unpaid invoice so it can no longer be paid and reminders stop — 'anula la factura de Pedro, era un error'. Drafts are deleted. Paid invoices, or ones with an accepted SII document, cannot be cancelled: the error says why. Confirm with the user first; this cannot be undone.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | string | |
reason | string | Why it is being cancelled; kept in the audit log. |
find_clients Buscar clientes
Search the merchant's customers by name, email, phone or RUT — 'cuál es el correo de Pedro', or to get a client_id for update_client. Omit query to list them alphabetically.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Default 20. |
query | string | Part of the name, email, phone or RUT. |
update_client Editar cliente
Change a customer's details — 'el correo de Pedro ahora es pedro@nuevo.cl'. Only the fields you pass change. Get client_id from find_clients.
| Parameter | Type | Description |
|---|---|---|
client_id * | string | |
address | string | |
email | string | |
name | string | |
phone | string | |
rut | string |