Lago MCP by usefulapi
Read Lago customers, subscriptions, invoices, usage and revenue analytics; write events.
Should I use this
Quality & Safety
Findings (2)
- LOWin lago_get_customer_current_usage
- LOWin lago_list_customer_subscriptions
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
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": {
"lago": {
"url": "https://lago.usefulapi.io/mcp"
}
}
}Remote endpoints
https://lago.usefulapi.io/mcpstreamable-httpWhat it can do
Tool inventory
Tools (24)
🟢lago_list_customers(page, per_page)
List customers in Lago, paginated. Lago API: GET /customers.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_customer(external_customer_id)
Retrieve a single customer by external id. Lago API: GET /customers/{external_customer_id}.
Input Schema
{
"type": "object",
"properties": {
"external_customer_id": {
"type": "string",
"description": "The customer external unique identifier (from your application)."
}
},
"required": [
"external_customer_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_customer_current_usage(external_customer_id, external_subscription_id, apply_taxes)
Retrieve a customer's usage-based billing data for the current period. Lago API: GET /customers/{external_customer_id}/current_usage.
Input Schema
{
"type": "object",
"properties": {
"external_customer_id": {
"type": "string",
"description": "The customer external unique identifier."
},
"external_subscription_id": {
"type": "string",
"description": "The subscription's external unique identifier (required)."
},
"apply_taxes": {
"description": "Whether taxes should be applied. Defaults to true.",
"type": "boolean"
}
},
"required": [
"external_customer_id",
"external_subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_customer_past_usage(external_customer_id, external_subscription_id, periods_count, billable_metric_code)
Retrieve a customer's usage-based billing data for past periods. Lago API: GET /customers/{external_customer_id}/past_usage.
Input Schema
{
"type": "object",
"properties": {
"external_customer_id": {
"type": "string",
"description": "The customer external unique identifier."
},
"external_subscription_id": {
"type": "string",
"description": "The subscription's external unique identifier (required)."
},
"periods_count": {
"description": "Number of past billing periods to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"billable_metric_code": {
"description": "Filter usage to a specific billable metric code.",
"type": "string"
}
},
"required": [
"external_customer_id",
"external_subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_customer_subscriptions(external_customer_id)
List a customer's subscriptions. Lago API: GET /customers/{external_customer_id}/subscriptions.
Input Schema
{
"type": "object",
"properties": {
"external_customer_id": {
"type": "string",
"description": "The customer external unique identifier."
}
},
"required": [
"external_customer_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_customer_portal_url(external_customer_id)
Get a customer's billing portal URL. Lago API: GET /customers/{external_customer_id}/portal_url.
Input Schema
{
"type": "object",
"properties": {
"external_customer_id": {
"type": "string",
"description": "The customer external unique identifier."
}
},
"required": [
"external_customer_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_subscriptions(page, per_page, external_customer_id, plan_code, status)
List subscriptions, optionally filtered by customer, plan, or status. Lago API: GET /subscriptions.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"external_customer_id": {
"description": "Filter by customer external id.",
"type": "string"
},
"plan_code": {
"description": "Filter by plan code.",
"type": "string"
},
"status": {
"description": "Filter by a single status: active | pending | canceled | terminated. Default active.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_subscription(external_id)
Retrieve a single subscription by external id. Lago API: GET /subscriptions/{external_id}.
Input Schema
{
"type": "object",
"properties": {
"external_id": {
"type": "string",
"description": "The subscription's external unique identifier."
}
},
"required": [
"external_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_plans(page, per_page)
List billing plans, paginated. Lago API: GET /plans.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_plan(code)
Retrieve a single plan by code. Lago API: GET /plans/{code}.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The plan's unique code."
}
},
"required": [
"code"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_invoices(page, per_page, external_customer_id, status, payment_status, ...)
List invoices, optionally filtered by customer, status, payment status, or issuing date. Lago API: GET /invoices.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"external_customer_id": {
"description": "Filter by customer external id.",
"type": "string"
},
"status": {
"description": "Filter by a single status: draft | finalized | failed | pending | voided.",
"type": "string"
},
"payment_status": {
"description": "Filter by a single payment status: pending | failed | succeeded.",
"type": "string"
},
"issuing_date_from": {
"description": "Filter invoices issued on/after this date (yyyy-mm-dd).",
"type": "string"
},
"issuing_date_to": {
"description": "Filter invoices issued on/before this date (yyyy-mm-dd).",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_invoice(lago_id)
Retrieve a single invoice by its Lago id. Lago API: GET /invoices/{lago_id}.
Input Schema
{
"type": "object",
"properties": {
"lago_id": {
"type": "string",
"description": "The invoice's Lago id (UUID)."
}
},
"required": [
"lago_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_billable_metrics(page, per_page)
List billable metrics, paginated. Lago API: GET /billable_metrics.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_billable_metric(code)
Retrieve a single billable metric by code. Lago API: GET /billable_metrics/{code}.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The billable metric's unique code."
}
},
"required": [
"code"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_coupons(page, per_page)
List coupons, paginated. Lago API: GET /coupons.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_add_ons(page, per_page)
List add-ons, paginated. Lago API: GET /add_ons.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_wallets(external_customer_id, page, per_page)
List a customer's prepaid credit wallets. Lago API: GET /customers/{external_customer_id}/wallets.
Input Schema
{
"type": "object",
"properties": {
"external_customer_id": {
"type": "string",
"description": "The customer external unique identifier."
},
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"external_customer_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_credit_notes(page, per_page, external_customer_id)
List credit notes, optionally filtered by customer. Lago API: GET /credit_notes.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"external_customer_id": {
"description": "Filter by customer external id.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_get_credit_note(lago_id)
Retrieve a single credit note by its Lago id. Lago API: GET /credit_notes/{lago_id}.
Input Schema
{
"type": "object",
"properties": {
"lago_id": {
"type": "string",
"description": "The credit note's Lago id (UUID)."
}
},
"required": [
"lago_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_list_fees(page, per_page, external_customer_id, external_subscription_id, fee_type)
List fees, optionally filtered by customer, subscription, or fee type. Lago API: GET /fees.
Input Schema
{
"type": "object",
"properties": {
"page": {
"description": "Page number for pagination.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Number of records per page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"external_customer_id": {
"description": "Filter by customer external id.",
"type": "string"
},
"external_subscription_id": {
"description": "Filter by subscription external id.",
"type": "string"
},
"fee_type": {
"description": "Filter by fee type: charge | add_on | subscription | credit | commitment.",
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_analytics_gross_revenue(currency, external_customer_id, months)
Monthly gross revenue (finalized invoice payments + advance fees, net of tax/discounts). Lago API: GET /analytics/gross_revenue.
Input Schema
{
"type": "object",
"properties": {
"currency": {
"description": "Currency filter (ISO 4217, e.g. USD).",
"type": "string"
},
"external_customer_id": {
"description": "Filter revenue at the customer level.",
"type": "string"
},
"months": {
"description": "Number of months to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lago_analytics_mrr(currency, months)
Monthly recurring revenue (MRR) from subscription fees. Lago API: GET /analytics/mrr.
Input Schema
{
"type": "object",
"properties": {
"currency": {
"description": "Currency filter (ISO 4217, e.g. USD).",
"type": "string"
},
"months": {
"description": "Number of months to return.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴lago_create_customer(external_id, name, email, currency, timezone, ...)
Creates a customer in Lago (additive). Lago API: POST /customers with body { "customer": { ... } }.
Input Schema
{
"type": "object",
"properties": {
"external_id": {
"type": "string",
"description": "The customer external unique identifier (required, provided by your application)."
},
"name": {
"description": "Full name of the customer.",
"type": "string"
},
"email": {
"description": "Email of the customer.",
"type": "string"
},
"currency": {
"description": "Customer currency (ISO 4217).",
"type": "string"
},
"timezone": {
"description": "Customer timezone, e.g. America/New_York.",
"type": "string"
},
"country": {
"description": "Billing country code (ISO 3166 alpha-2).",
"type": "string"
},
"legal_name": {
"description": "Legal company name.",
"type": "string"
},
"legal_number": {
"description": "Legal company number.",
"type": "string"
},
"tax_identification_number": {
"description": "Tax identification number.",
"type": "string"
},
"phone": {
"description": "Phone number.",
"type": "string"
},
"url": {
"description": "Customer URL.",
"type": "string"
},
"metadata": {
"description": "Structured metadata to attach to the customer (Lago expects an array of {key, value, display_in_invoice?} objects).",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Metadata key."
},
"value": {
"type": "string",
"description": "Metadata value."
},
"display_in_invoice": {
"description": "Show this pair on the customer's invoices.",
"type": "boolean"
}
},
"required": [
"key",
"value"
]
}
}
},
"required": [
"external_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴lago_create_event(transaction_id, code, external_subscription_id, timestamp, properties, ...)
Records a usage/metering event in Lago. This WILL be counted toward the customer's usage and affects billing. Idempotent via transaction_id. Lago API: POST /events with body { "event": { ... } }.
Input Schema
{
"type": "object",
"properties": {
"transaction_id": {
"type": "string",
"description": "Unique identifier for the event — the idempotency key (required)."
},
"code": {
"type": "string",
"description": "The billable metric code this event targets (required)."
},
"external_subscription_id": {
"type": "string",
"description": "The subscription external id to link the event to (required)."
},
"timestamp": {
"description": "Unix timestamp in seconds (or ISO); defaults to event reception time.",
"type": [
"string",
"number"
]
},
"properties": {
"description": "Additional event properties used to compute the fee (required for sum/max/unique aggregations).",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"string",
"number"
]
}
},
"precise_total_amount_cents": {
"description": "Precise total amount in cents, used by the dynamic pricing model.",
"type": "string"
}
},
"required": [
"transaction_id",
"code",
"external_subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Community
Evidence