Llm MCP Server

Local-first, multi-provider tool that captures LLM API spend and exposes it to coding agents via MCP

Remote serverstreamable-http

What is the Llm MCP Server?

Local-first, multi-provider tool that captures LLM API spend and exposes it to coding agents via MCP

What it actually does

LLM Usage & Cost Tracker — your local-first spend watchdog

  • Ask your coding agent. — It's an MCP server, so Claude Code, Cursor, or any MCP client can answer "how much did I spend on Claude this week?" or "which provider is cheapest for a 10k-in / 2k-out call?" in plain English
  • Or type a command. — It's also a CLI — llm-usage spend, llm-usage compare, llm-usage recommend — for when you'd rather not round-trip through an agent
  • Local-first. — No SaaS, no signup, no telemetry. Just a SQLite file at ~/.llm-usage/usage.db. Privacy is a feature, not a setting

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
compareRank every priced model by projected cost for an n-input / m-output call. Cheapest first, percent against the cheapest. Default view family-deduplicates rows that share both a model family root *and* an identical price —
modelsCatalog browser. Sibling of compare, but answers "what does this model charge?" rather than "what would my workload cost?". Rates per million tokens, sorted alphabetically by provider by default; switch with --sort input
recommendPicks one. Filters by --provider, --model, and --budget, then returns the cheapest match plus two runner-ups. The reasoning string explains what it assumed and what got chosen, so you can sanity-check rather than trust b
spendRead the SQLite. The default view is a usage_summary headline — total dollars, top-3 providers, top-3 models, largest single call. Pass --group-by to switch into rollup mode.
statusOne screen, four sections: Database, Capture proxy, Providers, Pricing. The "is everything actually working?" command. Read-only — running it on a fresh install before you've ever booted the proxy or MCP server prints da
providersPer-provider configuration view. Wider than the status Providers block: adds the wire-format flag (openai-compat: yes/no) and an optional --models expansion that lists every priced model under each provider.
aboutThe front-door panel: version, author, license, and the project homepage. The human-facing companion to --version — fields are read from the installed package metadata, so they match what PyPI shows.

How to install the Llm MCP Server

{
  "mcpServers": {
    "llm-usage": {
      "command": "uvx",
      "args": ["llm-usage-mcp"],
      "env": {
        "ANTHROPIC_API_KEY": "your-value",
        "OPENAI_API_KEY": "your-value",
        "DEEPSEEK_API_KEY": "your-value",
        "DASHSCOPE_API_KEY": "your-value",
        "ANTHROPIC_BASE_URL": "your-value",
        "OPENAI_BASE_URL": "your-value",
        "DEEPSEEK_BASE_URL": "your-value",
        "LLM_USAGE_DB_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
ANTHROPIC_API_KEYCredential the server authenticates with.Yes
OPENAI_API_KEYCredential the server authenticates with.Yes
DEEPSEEK_API_KEYCredential the server authenticates with.Yes
DASHSCOPE_API_KEYCredential the server authenticates with.Yes
ANTHROPIC_BASE_URLEndpoint or connection string the server talks to.Yes
OPENAI_BASE_URLEndpoint or connection string the server talks to.Yes
DEEPSEEK_BASE_URLEndpoint or connection string the server talks to.Yes
LLM_USAGE_DB_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Llm to compare.”
  • “Use Llm to models.”
  • “Use Llm to recommend.”

Frequently asked questions

Local-first, multi-provider tool that captures LLM API spend and exposes it to coding agents via MCP Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.