How to Use the Lago MCP in Claude Code
Pipe Lago billing operations into your shell scripts and CI/CD pipelines with Claude Code. Headless, fast, and built for automation.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Lago MCP to Claude Code
Create your Vinkius account to connect Lago to Claude Code and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Script Your Entire Customer Lifecycle
This MCP Server connects Lago to your terminal. Now you can script customer management. A simple shell script can pipe a new user's ID to `claude mcp call lago-mcp upsert_customer` and then immediately use `create_subscription` to assign their billing plan. It’s perfect for headless automation. Trigger a script from a webhook when a new user signs up, and Claude Code will provision their entire billing profile in Lago. No manual steps, no web UI, just pure command-line execution.
Manage Billing From Your CI/CD Pipeline
Define your entire product catalog as code. From your terminal or a GitHub Action, run `claude mcp call lago-mcp create_billable_metric ...` to add a new metered feature. Follow it with `create_plan` to make that feature part of a public pricing plan. By managing your Lago setup with scripts, you can version-control your entire billing configuration in Git. Run your plan creation scripts as part of your deployment process to guarantee that your application and billing logic are always in sync. This is programmatic control over your revenue stack.
Automate Event Ingestion and Reporting
Set up a simple cron job to handle usage reporting. Have a script that aggregates application logs, then pipe the data to `claude mcp call lago-mcp batch_events` to push everything to Lago in one go. This is exactly what a headless MCP tool is for. Reporting is just as easy. Run `claude mcp call lago-mcp list_invoices --json` and pipe the raw JSON output directly into `jq` for filtering or a file for your finance team. It's just data, ready for you to compose with other standard command-line tools.
Set up Lago MCP in Claude Code
Prerequisites
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Active Vinkius subscription with a valid endpoint token
- 1
Run the add command
Open your terminal and run the command shown on the right. Replace
[YOUR_TOKEN_HERE]with your endpoint token from cloud.vinkius.com. Use--scope userto make it available across all projects. - 2
Verify the connection
Start a Claude Code session and type
/mcpto list connected servers. You should seelago-mcpwith a green status indicator. - 3
Start using tools
Ask Claude Code something like "Check my latest Lago transactions." It will automatically discover and invoke the available Lago tools.
claude mcp add --transport http lago-mcp https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Lago MCP in Claude Code
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Lago MCP today
We host it, we monitor it, we maintain it. You just paste one token.