Lago MCP Server for LangChainGive LangChain instant access to 12 tools to Apply Coupon, Batch Events, Create Billable Metric, and more
LangChain is the leading Python framework for composable LLM applications. Connect Lago through Vinkius and LangChain agents can call every tool natively. combine them with retrievers, memory, and output parsers for sophisticated AI pipelines.
Ask AI about this MCP Server for LangChain
The Lago MCP Server for LangChain 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 langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
async def main():
# Your Vinkius token. get it at cloud.vinkius.com
async with MultiServerMCPClient({
"lago": {
"transport": "streamable_http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
response = await agent.ainvoke({
"messages": [{
"role": "user",
"content": "Using Lago, show me what tools are available.",
}]
})
print(response["messages"][-1].content)
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.
LangChain's ecosystem of 500+ components combines seamlessly with Lago through native MCP adapters. Connect 12 tools via Vinkius and use ReAct agents, Plan-and-Execute strategies, or custom agent architectures. with LangSmith tracing giving full visibility into every tool call, latency, and token cost.
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 LangChain 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 LangChain
When LangChain 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 LangChain via MCP
Follow these steps to wire Lago into LangChain. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
pip install langchain langchain-mcp-adapters langgraph langchain-openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the agent
python agent.pyExplore tools
Why Use LangChain with the Lago MCP Server
LangChain provides unique advantages when paired with Lago through the Model Context Protocol.
The largest ecosystem of integrations, chains, and agents. combine Lago MCP tools with 500+ LangChain components
Agent architecture supports ReAct, Plan-and-Execute, and custom strategies with full MCP tool access at every step
LangSmith tracing gives you complete visibility into tool calls, latencies, and token usage for production debugging
Memory and conversation persistence let agents maintain context across Lago queries for multi-turn workflows
Lago + LangChain Use Cases
Practical scenarios where LangChain combined with the Lago MCP Server delivers measurable value.
RAG with live data: combine Lago tool results with vector store retrievals for answers grounded in both real-time and historical data
Autonomous research agents: LangChain agents query Lago, synthesize findings, and generate comprehensive research reports
Multi-tool orchestration: chain Lago tools with web scrapers, databases, and calculators in a single agent run
Production monitoring: use LangSmith to trace every Lago tool call, measure latency, and optimize your agent's performance
Example Prompts for Lago in LangChain
Ready-to-use prompts you can give your LangChain 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 LangChain
Common issues when connecting Lago to LangChain through Vinkius, and how to resolve them.
MultiServerMCPClient not found
pip install langchain-mcp-adaptersLago + LangChain FAQ
Common questions about integrating Lago MCP Server with LangChain.
How does LangChain connect to MCP servers?
langchain-mcp-adapters to create an MCP client. LangChain discovers all tools and wraps them as native LangChain tools compatible with any agent type.Which LangChain agent types work with MCP?
Can I trace MCP tool calls in LangSmith?
Explore More MCP Servers
View all →
RCSB PDB
2 toolsExplore 220K+ 3D molecular structures — search proteins, DNA, and RNA by name, experimental method, resolution, and bound ligands from the Protein Data Bank.

Erply ERP & POS
10 toolsEquip your AI agent to manage retail products, track sales invoices, and monitor inventory via the Erply API.

Lodgify
8 toolsManage vacation rental properties, bookings, availability, rates, quotes, and channel connections for your Lodgify account through natural conversation.

Mailsac
9 toolsManage disposable and private email addresses via the Mailsac REST API.
