l6e-mcp
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@l6e-mcpstart a new budget session with $5 for this feature"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
l6e-mcp
l6e makes your AI coding agent cost-efficient.
Set a budget per task. Your agent checkpoints before expensive operations, gets halt signals when it's spending too much, and stops when it's done — not when it runs out of money. Import your billing data and l6e learns your actual cost patterns, so estimates get tighter over time.
No proxy. No SDK changes. Just an MCP server that works with Cursor, Claude Code, and Windsurf.
Dogfooding: docs.l6e.ai is built and maintained using l6e itself.
Quick start
1. Install
pip install l6e-mcp
# or, zero-install:
uvx l6e-mcp2. Add to your MCP config
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"l6e": {
"command": "uvx",
"args": ["l6e-mcp"]
}
}
}See docs.l6e.ai/setup for Claude Code and Windsurf configs.
3. Add the enforcement rule
Copy the l6e budget enforcement rule to .cursor/rules/ so your agent knows how to use the budget tools.
That's it — start a session, set a budget, and your agent is cost-aware.
4. (Optional) Connect to the dashboard
Create a free account at app.l6e.ai for session history, spend tracking, and billing import for calibration:
{
"mcpServers": {
"l6e": {
"command": "uvx",
"args": ["l6e-mcp"],
"env": {
"L6E_API_KEY": "sk-l6e-...",
"L6E_CLOUD_SYNC": "1"
}
}
}
}Related MCP server: agent-cost-mcp
How it works
l6e sits as an MCP server between your IDE and your agent. At each checkpoint, the agent calls l6e_authorize_call — l6e checks the remaining budget and returns allow or halt.
allow — proceed; check
budget_pressureto decide how aggressively to economizehalt — budget exhausted, stop the session
Session state is persisted locally in SQLite (~/.l6e/sessions.db). No LLM calls are proxied — l6e only sees the metadata your agent passes at each checkpoint (token estimates, model, stage label). It never sees your prompts, completions, or source code.
Calibration
Out of the box, l6e uses raw token estimates from LiteLLM pricing. These are directionally accurate but can diverge significantly from what your provider actually bills, depending on your model and usage patterns.
Import your billing CSV from Cursor or your LLM provider at app.l6e.ai and l6e computes a personal calibration factor for each model you use. The more sessions you run, the tighter the estimates get.
For manual calibration without cloud sync, add a [calibration] section to ~/.l6e/config.toml:
[calibration]
claude-4-opus = 72.0
claude-4-sonnet = 45.0
claude-3.5-haiku = 12.0Free vs Pro
Free | Pro ($15/mo) | |
Budget enforcement | ✓ | ✓ |
Local session storage | ✓ | ✓ |
Cloud sync + dashboard | ✓ (90-day history) | ✓ (unlimited) |
Billing import | ✓ (5/month) | ✓ (unlimited) |
Per-model calibration | ✓ | ✓ |
Community baseline factors | ✓ | ✓ |
MCP tools
Tool | Purpose |
| Open a new budget session. Returns |
| Gate before sub-agents and stage transitions. Returns |
| Attach exact token counts to a call (optional, improves accuracy). |
| Close the session and flush the run log. |
Full tool reference at docs.l6e.ai/tools.
Environment variables
Variable | Default | Purpose |
| (unset) | API key for cloud sync |
|
| Set to |
|
| Override the cloud sync endpoint |
|
| Run log path — set to an absolute path |
|
| Local SQLite database path |
|
| Config file path |
Known limitations
Estimate-first by default. Exact accounting requires
l6e_record_usagecalls with actual token counts after each LLM call. Without them, budgets are based on the agent's pre-call estimates.Local persistence by default. Sessions persist in a local SQLite database. Cloud sync is available with a free account at app.l6e.ai — set
L6E_API_KEYandL6E_CLOUD_SYNC=1to enable.
Links
docs.l6e.ai — setup guides, tool reference, calibration walkthrough
app.l6e.ai — dashboard, run history, billing import
l6e core library — embed budget enforcement in Python agent pipelines
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Budget & cost control for AI agents — per-agent spend caps + rate limits before each call.
Meter, cap, and block AI agent spend before the provider is charged.
Enforce AI budgets before the model call and track cost per customer across 10 providers.
Give your AI agent a spending limit: approval controls and single-use virtual cards.
Related MCP Servers
- AlicenseAqualityAmaintenanceRuntime budget authority for autonomous agents - a set of tools to check, reserve, spend, and release budget before and after every costly, risky operation. The agent asks "can I afford this?" before acting, and reports what it actually used afterward.937 npmApache 2.0
- AlicenseAqualityDmaintenanceTracks AI agent token usage and spending in real time, with budget alerts, per-task cost breakdown, and a visual dashboard.61MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to track LLM costs, enforce budgets, compare models, and estimate expenses through simple tool calls.-
- AlicenseNot gradedqualityDmaintenanceEstimates, compares, and controls LLM API costs before agents spend tokens, with tools for cost estimation, model comparison, and budget checking.38 npmMIT