
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@inferlane/mcp
Advanced tools
Local-first compute fuel gauge for Claude Code + 50 MCP tools for model selection, spend tracking, budget firewall, credibility, routing, and the compute exchange. Auto-ingests real usage from Claude Code transcripts — no API key needed. Works with Claude
The cost intelligence layer for AI agents. 41 MCP tools for model selection, spend tracking, routing, scheduling, and credibility scoring.
npx -y @inferlane/mcp
Or add to your MCP config:
{
"mcpServers": {
"inferlane": {
"command": "npx",
"args": ["-y", "@inferlane/mcp"]
}
}
}
Set INFERLANE_MODE to control how many tools register (and how much context they cost):
| Mode | Tools | Context | What you get |
|---|---|---|---|
| (unset) full | all | ~27K tokens | Everything below |
core | 8 | ~6K tokens | Cost intelligence essentials: pick_model, log_request, session_cost, assess_routing, rate_recommendation, get_cost_comparison, suggest_savings, get_model_pricing |
firewall | 10 | ~7K tokens | The spend-firewall profile: fuel_gauge, platform_budget, platform_spend, check_dispatch, log_request, session_cost, pick_model, get_model_pricing, ping, register_webhook |
Firewall mode is built for agent fleets: check_dispatch pre-flights every model call against the local budget (INFERLANE_BUDGET_TOTAL) first and the platform budget (INFERLANE_API_KEY) second, returning a structured ALLOW/DENY JSON decision with the estimated cost, remaining budgets, and a cheaper-model suggestion on deny. With no budget configured it answers ALLOW with an advisory note — it never fakes a denial. Budget denials from pick_model and route_via_platform also carry a machine-parseable {"error": "BUDGET_EXCEEDED", ...} JSON block alongside the human-readable text.
{
"mcpServers": {
"inferlane": {
"command": "npx",
"args": ["-y", "@inferlane/mcp"],
"env": { "INFERLANE_MODE": "firewall", "INFERLANE_BUDGET_TOTAL": "25" }
}
}
}
pick_model — Choose the optimal model for any taskcheck_dispatch — Pre-flight a dispatch against local + platform budgets (structured ALLOW/DENY)session_cost — Track session spend in real-timelog_request — Log API calls for cost trackingget_model_pricing — Look up pricing across providersget_cost_comparison — Compare costs across modelssuggest_savings — Get cost optimization recommendationstriage — Auto-classify prompts by complexity, urgency, and costtriage_settings — Configure routing preferencesassess_routing — Evaluate local vs cloud routingroute_to_cloud — Report routing decisions for credibilitydispatch — Send prompts to best available providerdispatch_chain — Multi-provider sequential chainsdispatch_status — Check async task statusschedule_prompt — Schedule prompts for latercreate_chain — Create multi-step chainslist_scheduled / cancel_scheduled / chain_statusagent_status — Traffic light status (green/amber/red/blue)set_agent_status — Manual status overrideset_lifecycle_phase — Track coding→testing→CI→deploy phaseslifecycle_report — Cost-per-phase breakdowntoken_tachometer — Real-time token velocitystate_of_compute — Full compute market reportcredibility_profile — View agent credibility scorecredibility_leaderboard — Compete with other agentsrate_recommendation — Rate model qualitymodel_ratings — View community ratingsimprovement_cycle — Run quality analysiscost_savings — View savings from smart routingcheck_promotions — Active provider promotionsplatform_spend / platform_budget — Platform billingroute_via_platform — Route through InferLane platformsession_history — Cross-provider session tracking| Variable | Required | Description |
|---|---|---|
INFERLANE_API_KEY | No | Enables platform features (dispatch, scheduling, savings) |
INFERLANE_MODE | No | core or firewall to register a trimmed tool profile (see Modes) |
INFERLANE_EVENTS_PORT | No | Enable SSE event stream on this port |
INFERLANE_BUDGET_TOTAL | No | Monthly budget cap in USD — enforced by check_dispatch, pick_model, route_via_platform |
OLLAMA_HOST | No | Local Ollama endpoint for routing assessment |
Install once. Every AI agent session becomes cost-aware:
pick_model recommends the cheapest viable modellog_request tracks what was spentNo configuration needed for basic cost tracking. Add INFERLANE_API_KEY for platform features.
This package reads some files on your machine to do its job. Everything
below stays local and is never transmitted — the watcher does zero
network I/O — unless you set INFERLANE_API_KEY to opt into cloud sync.
Without that key, InferLane has no visibility into any of it.
What it reads locally (read-only, on by default):
~/.claude/projects/**/*.jsonl to
pull the per-message token-usage blocks (message.usage: input /
output / cache token counts + model name) so the fuel gauge reflects
actual spend with no API key and no manual logging. It only reads
these files — it never modifies them — and it does not send their
contents anywhere unless you enable cloud sync. This watcher is on
by default; opt out by setting INFERLANE_NO_CC_WATCH=1 (it also
stays inactive if ~/.claude/projects doesn't exist).What it writes locally:
~/.inferlane/state.db — a SQLite database holding your request
log, model ratings, credibility scores, and budget config so they
survive restarts. It lives only on your machine. If SQLite can't
initialize, the server falls back to in-memory mode and writes
nothing.Optional persistence installer (separate tool, opt-in):
A separate, related InferLane tool — the persistence installer shipped
as the inferlane-persist / inferlane-unpersist commands in the
@inferlane/mcp-server package — can make the cost-awareness guidance
persist across agent sessions. It is opt-in and prompts for
confirmation before changing anything: a [y/N] prompt that defaults
to No, so an unattended or piped run installs nothing unless you pass
an explicit --yes flag. When you consent, it modifies only:
~/.claude/CLAUDE.md (and, if you choose them, the equivalent
per-project instruction files it detects: project CLAUDE.md,
.cursorrules, .github/copilot-instructions.md,
.gemini/styleguide.md, CONVENTIONS.md, AGENTS.md) — it inserts a
small, clearly marker-delimited activation block
(<!-- BEGIN INFERLANE vN --> … <!-- END INFERLANE vN -->). Your
existing content is left intact.~/.claude/settings.json — with a separate explicit confirmation,
it merges a single PreToolUse spend-guard hook without clobbering
any other hooks or keys.Every file that installer touches and every hook it wires is recorded in
a manifest at ~/.inferlane/persist-manifest.json so the
uninstaller can remove exactly what was added and nothing else.
This mirrors §1.3 ("Local-only data") of the InferLane Privacy Policy.
Apache-2.0
FAQs
Local-first compute fuel gauge for Claude Code + 50 MCP tools for model selection, spend tracking, budget firewall, credibility, routing, and the compute exchange. Auto-ingests real usage from Claude Code transcripts — no API key needed. Works with Claude
We found that @inferlane/mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.