Lago MCP Server for LlamaIndexGive LlamaIndex instant access to 12 tools to Apply Coupon, Batch Events, Create Billable Metric, and more
LlamaIndex specializes in data-aware AI agents that connect LLMs to structured and unstructured sources. Add Lago as an MCP tool provider through Vinkius and your agents can query, analyze, and act on live data alongside your existing indexes.
Ask AI about this MCP Server for LlamaIndex
The Lago MCP Server for LlamaIndex is a standout in the Money Moves category — giving your AI agent 12 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import asyncio
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
async def main():
# Your Vinkius token. get it at cloud.vinkius.com
mcp_client = BasicMCPClient("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
mcp_tool_spec = McpToolSpec(client=mcp_client)
tools = await mcp_tool_spec.to_tool_list_async()
agent = FunctionAgent(
tools=tools,
llm=OpenAI(model="gpt-4o"),
system_prompt=(
"You are an assistant with access to Lago. "
"You have 12 tools available."
),
)
response = await agent.run(
"What tools are available in Lago?"
)
print(response)
asyncio.run(main())
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About Lago MCP Server
Connect Lago to your AI agent to automate your metering and billing infrastructure. Lago is the open-source alternative to Stripe Billing, designed for complex usage-based pricing models.
LlamaIndex agents combine Lago tool responses with indexed documents for comprehensive, grounded answers. Connect 12 tools through Vinkius and query live data alongside vector stores and SQL databases in a single turn. ideal for hybrid search, data enrichment, and analytical workflows.
What you can do
- Customer Management — Create and update customer profiles with
upsert_customerand retrieve details withget_customer. - Subscription Lifecycle — Assign plans to customers using
create_subscriptionand monitor them withget_subscription. - Billing Infrastructure — Define billing plans with
create_planand set upcreate_billable_metricto track consumption. - Usage Tracking — Send real-time usage data with
send_eventorbatch_eventsto trigger accurate billing. - Financial Operations — Manage wallets, apply coupons, and list invoices to keep your revenue operations running smoothly.
The Lago MCP Server exposes 12 tools through the Vinkius. Connect it to LlamaIndex in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 12 Lago tools available for LlamaIndex
When LlamaIndex connects to Lago through Vinkius, your AI agent gets direct access to every tool listed below — spanning usage-based-billing, metering, saas-metrics, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Apply coupon on Lago
Apply a coupon to a customer
Batch events on Lago
Send a batch of usage events
Create billable metric on Lago
Create a billable metric
Create coupon on Lago
Create a coupon
Create plan on Lago
Create a new billing plan
Create subscription on Lago
Assign a plan to a customer (create subscription)
Create wallet on Lago
Create a wallet for prepaid credits
Get customer on Lago
Retrieve a customer by external ID
Get subscription on Lago
Retrieve a subscription by external ID
List invoices on Lago
List all invoices
Send event on Lago
Send a usage event
Upsert customer on Lago
Requires an external_id. Create or update a customer in Lago
Connect Lago to LlamaIndex via MCP
Follow these steps to wire Lago into LlamaIndex. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
pip install llama-index-tools-mcp llama-index-llms-openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the agent
agent.py and run: python agent.pyExplore tools
Why Use LlamaIndex with the Lago MCP Server
LlamaIndex provides unique advantages when paired with Lago through the Model Context Protocol.
Data-first architecture: LlamaIndex agents combine Lago tool responses with indexed documents for comprehensive, grounded answers
Query pipeline framework lets you chain Lago tool calls with transformations, filters, and re-rankers in a typed pipeline
Multi-source reasoning: agents can query Lago, a vector store, and a SQL database in a single turn and synthesize results
Observability integrations show exactly what Lago tools were called, what data was returned, and how it influenced the final answer
Lago + LlamaIndex Use Cases
Practical scenarios where LlamaIndex combined with the Lago MCP Server delivers measurable value.
Hybrid search: combine Lago real-time data with embedded document indexes for answers that are both current and comprehensive
Data enrichment: query Lago to augment indexed data with live information before generating user-facing responses
Knowledge base agents: build agents that maintain and update knowledge bases by periodically querying Lago for fresh data
Analytical workflows: chain Lago queries with LlamaIndex's data connectors to build multi-source analytical reports
Example Prompts for Lago in LlamaIndex
Ready-to-use prompts you can give your LlamaIndex agent to start working with Lago immediately.
"Create a new customer in Lago with external ID 'user_123' and email 'dev@example.com'."
"Show me the subscription details for ID 'sub_98765'."
"List all invoices for my Lago account."
Troubleshooting Lago MCP Server with LlamaIndex
Common issues when connecting Lago to LlamaIndex through Vinkius, and how to resolve them.
BasicMCPClient not found
pip install llama-index-tools-mcpLago + LlamaIndex FAQ
Common questions about integrating Lago MCP Server with LlamaIndex.
How does LlamaIndex connect to MCP servers?
Can I combine MCP tools with vector stores?
Does LlamaIndex support async MCP calls?
Explore More MCP Servers
View all →
KeyPay
10 toolsManage payroll, employees, and pay runs via the Employment Hero Payroll (KeyPay) API.

ThoughtSpot
7 toolsSearch and analyze business data by interacting directly with your ThoughtSpot metadata and Liveboards via your AI agent.

Nabis
10 toolsCannabis wholesale and distribution — manage orders, inventory, and retailers via Nabis.

Weights & Biases
6 toolsTrack experiments, monitor ML runs, and manage artifacts on WandB — the developer platform for AI.
