blesta-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BLESTA_URL | Yes | Install URL, e.g. https://billing.example.com or https://billing.example.com/api/ (both accepted) | |
| BLESTA_API_KEY | Yes | API key | |
| BLESTA_API_USER | Yes | API user name | |
| BLESTA_STAFF_ID | No | Staff member ID recorded on notes, suspensions and payments when a tool call gives none. Optional. | |
| BLESTA_READ_ONLY | No | 1 blocks every non-GET call (safe default for support agents). Optional. | |
| BLESTA_ALLOW_HTTP | No | 1 permits plain http:// URLs (local testing only). Optional. | |
| BLESTA_CLIENT_URI | No | Client-area path used in payment links, default client/. Optional. | |
| BLESTA_COMPANY_ID | No | Company for catalog calls; default is the first company Blesta reports. Optional. | |
| BLESTA_PUBLIC_URL | No | Base URL used in customer-facing links when it differs from BLESTA_URL. Optional. | |
| BLESTA_SYSTEM_KEY | No | Blesta.system_key from config/blesta.php. Needed by the payment-link tools on IonCube installs. Optional; alternative to BLESTA_SYSTEM_KEY_FILE. | |
| BLESTA_TIMEOUT_MS | No | HTTP timeout, default 30000. Optional. | |
| BLESTA_ALLOW_PAYMENTS | No | 1 enables process_payment (charges stored payment accounts). Optional. | |
| BLESTA_SYSTEM_KEY_FILE | No | Path to a file containing only the system key (preferred over the env var). Optional; alternative to BLESTA_SYSTEM_KEY. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_clientsA | Find customers matching a free-text query (email, first/last name, company, client ID code such as '1234'). Wraps Clients.search. Returns a page of client records including the primary contact's name, email and status. Use get_client with the returned |
| get_clientA | Retrieve one customer by numeric client ID: identity, primary contact details (name, email, address, phone numbers), status (active/inactive/fraud), client group and, optionally, effective settings (currency, language, autodebit, ...). Wraps Clients.get. |
| get_client_contactsB | All contacts under a client (primary, billing, other) with name, email, address and phone/fax numbers. Wraps Contacts.getAll and Contacts.getNumbers. |
| get_client_notesA | Staff notes on a client account, newest first, plus pinned (sticky) notes. Read these before acting on an account. Wraps Clients.getNoteList, Clients.getNoteListCount and Clients.getAllStickyNotes. |
| get_client_balanceA | Amount the client owes in a currency (sum of open invoices) plus invoice counts by status (open, past_due, closed, ...). Wraps Invoices.amountDue and Invoices.getStatusCount. Use get_client with include_settings to learn the client's default currency. |
| add_client_noteA | Record a staff note on a client account (e.g. summary of a support interaction). Wraps Clients.addNote. staff_id defaults to BLESTA_STAFF_ID. |
| update_client_statusA | Set a client's status to active, inactive or fraud. Wraps Clients.edit(client_id, {status}). Inactive/fraud clients cannot log in; fraud also blocks orders. |
| search_invoicesA | Find invoices two ways. (1) |
| get_invoiceA | Read one invoice by numeric invoice ID: displayed number (id_code), client_id, status, date_billed, date_due, date_closed, currency, subtotal, total, paid, due (total minus paid), taxes and line_items with descriptions, quantities and amounts. Wraps Invoices.get. Use search_invoices first if you only know the displayed invoice number. |
| create_invoiceA | Create a new invoice for a client with one or more line items. Wraps Invoices.add. Dates default to now (billed) and now+7 days (due). Set |
| send_invoiceA | Queue (re)delivery of an invoice to the client by email or another configured method. Wraps Invoices.addDelivery. Blesta's cron performs the actual send within a few minutes; the tool also returns the delivery log so you can see prior sends. |
| update_invoiceA | Edit invoice header fields: status (active/draft/proforma/void), due date, billed date, notes. Wraps Invoices.edit. Use |
| get_client_servicesA | List a customer's services (hosting accounts, domains, add-ons) with status, package/pricing, renewal date and price. Wraps Services.getList (paged, default status 'active') and, when |
| search_servicesA | Find services across all clients by domain, hostname, username, package name or service number. Wraps Services.search (with |
| get_service_actionsA | Which operations Blesta allows on a service in its current state (e.g. suspend, unsuspend, cancel, uncancel, change_renew_date, ...). Wraps Services.get + Services.getActions(current_status). |
| suspend_serviceB | Suspend a service (and, when |
| unsuspend_serviceA | Reactivate a suspended service (and on the module when |
| cancel_serviceA | Cancel a service now, at end of the current term, or on a given date. Wraps Services.cancel. |
| get_invoice_paymentsA | List payments (transactions) applied to an invoice: applied amount and date, transaction status (approved/declined/void/error/pending/returned), payment type, gateway, reference and transaction number. Wraps Transactions.getApplied(invoice_id). Set |
| create_invoice_payment_linkA | Produce a customer-facing URL that lets the invoice be paid without logging in. Uses Invoices.createPayHash(client_id, invoice_id) then Encryption.systemEncrypt to build the |
| verify_invoice_payment_linkA | Check that a payment link/hash is valid for a given client and invoice, and report whether payment is still due. Accepts either the raw 16-character |
| get_client_transactionsA | Payment history for a client (or all clients): amount, currency, type (cc/ach/other), status, gateway, reference and which invoices each payment was applied to. Wraps Transactions.getList / getListCount. Filters: payment_type, reference_id, date and amount ranges, applied_status (fully_applied, partially_applied, not_applied). |
| get_transactionA | One payment in full plus the invoices it was applied to. Wraps Transactions.get and Transactions.getApplied(transaction_id). |
| get_payment_accountsA | Cards and bank accounts a client has on file (masked: last4, type, expiry, holder name, gateway reference). Never returns full numbers. Wraps Accounts.getAllCcByClient and Accounts.getAllAchByClient. Useful for autodebit failures and expired cards. |
| record_manual_paymentA | Record an offline payment (bank transfer, cash, check) and apply it to invoices. Wraps Transactions.add then Transactions.apply. Does not charge anything; it only records money already received. Omit |
| apply_transactionA | Apply an existing transaction's unapplied balance (client credit) to one or more invoices in the same currency. Wraps Transactions.apply. |
| process_paymentA | Charge a client's stored card or bank account through the payment gateway and apply the result to invoices. Wraps Payments.processPayment with account_id only; raw card data is never accepted. Sends the client a receipt unless disabled. Moves real money. DISABLED: set BLESTA_ALLOW_PAYMENTS=1 to enable. |
| list_packagesA | Product catalog: packages and package groups. Wraps Packages.getAll (compact view) and Packages.getAllGroups. Packages.getAll does not return prices; set |
| get_packageB | One package in full: pricing per term, description, module, configurable option groups, groups. Wraps Packages.get. |
| list_quotationsA | Quotes (estimates) for a client or across all clients, by status. Wraps Quotations.getList / getListCount. Statuses: draft, pending, approved, invoiced, expired, dead, lost, all. |
| get_quotationA | One quote with its line items and any invoices generated from it. Wraps Quotations.get, getLineItems, getInvoices. |
| lookup_couponA | Validate a promo code: existence, status, start/end dates, usage limits, discount amounts per currency, eligible packages. Wraps Coupons.getByCode; with |
| blesta_callA | Escape hatch: call any public model method of the Blesta API as {model}/{method}. Parameters are passed BY NAME and must match the PHP method's argument names (see https://source-docs.blesta.com/classes/{Model}.html). Nested arrays/objects are supported (e.g. params: {"vars": {"client_id": 1, "lines": [{"description": "x", "amount": "5.00"}]}}). Plugin models use "plugin.model" (e.g. "support_manager.support_manager_tickets"). If |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 33 tools
Each tool targets a distinct resource+action combination, even in dense areas like payments (record_manual_payment vs apply_transaction vs process_payment are clearly separated by funding source and behavior). The only generic tool, blesta_call, is explicitly an escape hatch rather than a competing operation.
Tool names overwhelmingly follow a snake_case verb_noun pattern (get_client, create_invoice, suspend_service). Minor deviations like lookup_coupon instead of get_coupon and list_quotations alongside get_quotation are predictable but not perfectly uniform.
33 tools is heavy, but the breadth of Blesta's domain (clients, invoices, services, payments, packages, quotes, coupons) justifies most of them. The count sits above the typical heavy range and some getters could potentially be consolidated, yet no tool feels truly redundant.
Core client, invoice, service, and payment operations are well covered, including search, retrieve, and common state changes. Notable gaps exist (no create_client, no package/quote creation, no direct line-item editing), though blesta_call provides a workaround for advanced operations.