
AI
How to Connect Claude to Your Billing Data with Lago's MCP Server
Anh-Tho Chuong•Aug 26•4 min read
Aug 26
/4 min read
Lago's MCP server lets Claude, or any MCP-compatible AI client, work with your live billing data in plain English. Ask "show me invoices overdue by 30 days" or "what's this customer's usage this month" and get an answer without opening a dashboard. It's built for reading and analyzing your data, and it can take one specific action: retrying a failed payment. It doesn't create invoices, edit customer records, or issue refunds.
Model Context Protocol is an open standard for connecting AI applications to external tools and data. Lago's MCP server, built in Rust, implements that standard for billing: it exposes your invoice, customer, and payment records to any MCP client, so you can ask questions instead of writing queries or clicking through screens.
Two things worth being precise about, since "AI agent" claims get overstated fast:
Mostly read, one narrow write action. Lago's MCP server can list and analyze invoices, customers, and usage, preview what an invoice would look like under hypothetical usage, and retry a failed payment. It doesn't create invoices, change plans, or edit customer records. That's a different, higher-stakes capability, and one Lago's MCP server doesn't currently offer.
Self-hostable. Because Lago is open-source, the MCP server runs on your own infrastructure like the rest of the stack. Your billing data doesn't have to pass through a third party to reach Claude.
Full configuration steps live in Lago's MCP server docs and the Lago Agent Toolkit repository. At a high level:
Run the MCP server via Docker (ghcr.io/getlago/mcp-server), and point Claude Desktop or another MCP-compatible client at it. Authenticate with your Lago API key, the same one you already use for the REST API. If you want natural-language analytics, MRR, top customers by usage, and similar, set the LAGO_AGENT_API_URL environment variable too, which routes those queries through Lago's analytics agent service. Restart your client, and Lago's tools show up alongside anything else you've connected.
Because it's built on the same API primitives as the rest of Lago, invoices, customers, events, there's nothing new to learn about your data model. The MCP server just gives Claude a natural-language way to work with it.
A few examples of what this looks like in practice:
"List all customers with invoices overdue by more than 30 days." "What's this customer's usage this billing period, and is it trending up or down from last month?" "Show me failed payments from the last week." "Preview an invoice for this customer with 500 additional API-call events," which simulates the invoice before it's generated. "Retry payment on invoice INV-123," the one action Claude can actually take on your behalf, not just look up. "What was our MRR last month, broken down by plan?" answered by Lago's analytics agent, not a raw data dump.
MCP for billing isn't unique to Lago, and this space is moving fast. Worth being clear-eyed about where each vendor sits today, since "MCP support" means different things depending on which specific server you're looking at.
Zoho goes furthest on write access: it can create invoices and update subscriptions directly, not just query them. Chargebee has moved past its original docs-only MCP and now runs a broader suite, a Data Lookup server for live read-only queries similar in scope to Lago's, plus separate servers for documentation and sandbox data. Lago sits at mostly-read with one specific write action, open-source, and self-hostable, without the multi-server suite Chargebee has built out.
What is an MCP server? An open standard that lets AI applications like Claude connect to external tools and data through a common interface, instead of every integration needing custom code.
Can Claude make changes to my billing data? Mostly no. Claude can look up and analyze invoices, customers, and payments, and preview what an invoice would look like. The one exception is retrying a failed payment, a real action, not just a lookup. It can't create invoices, change plans, or edit customer records.
Do I need to self-host Lago to use it? No. It works with self-hosted Lago and Lago Cloud alike. Self-hosting is an option for teams that want billing data to stay entirely on their own infrastructure, not a requirement.
Lago's MCP server lets Claude work with live invoice, customer, and payment data in plain English. It's mostly read, lookups, analytics, invoice previews, plus one specific write action, retrying a failed payment. Because Lago is open-source, it can run entirely on your own infrastructure. It's one of a growing number of billing MCP servers: Zoho supports broad write actions, Chargebee now runs a multi-server suite, and Lago pairs open-source, self-hostable access with a narrow, specific set of actions. Full setup instructions are in the docs and the GitHub repo.