Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ“Š Monitoring
  3. Llm Usage MCP
Llm Usage MCP logo
Health: ActiveRecent health check succeeded.Last checked 9/9/2026, 11:16:24 AM

Llm Usage MCP

User RatingsBe the first to rate and review this MCP server!
View Repository3 GitHub StarsTotal stargazers on GitHub for the source repository (3 stars).Visit Website
llmcost-trackingusage-monitoringsqlitedeveloper-tools

Tracks local LLM usage and costs across four providers, with spend queries, pricing comparisons, and budget-based recommendations.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

This server is confirmed live β€” we successfully called its tools/list endpoint directly (see the verified badge above). We haven't yet sandbox-tested the stdio install command below specifically, which is a separate, ongoing check.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "zhaoyue722-llm-usage-mcp": {
      "command": "uvx",
      "args": [
        "llm-usage-mcp"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Tool Schemas (7) Directory Badge Claim listing AlternativesπŸ“Š More in Monitoring

Overview

The zhaoyue722/llm-usage-mcp MCP server records LLM API usage in a local SQLite ledger and exposes cost analysis through MCP tools. It supports Anthropic, OpenAI, Qwen, and DeepSeek, calculating costs from a provider pricing table and handling Chinese-provider pricing with CNY-to-USD conversion. Use it when an agent or local workflow needs spend totals, provider comparisons, pricing lookup, or cheapest-model recommendations without sending usage data to a hosted service. A separate local capture proxy can record calls automatically, while `record_usage` supports manual ingestion.

Use cases

β€’Track API spend across Anthropic, OpenAI, Qwen, and DeepSeek
β€’Compare projected costs for a token-based workload
β€’Recommend a priced model within a specified budget
β€’Inspect weekly or monthly usage summaries
β€’Record usage manually when a capture proxy is unavailable

Key features

β€’Local SQLite usage ledger
β€’Provider and model spend breakdowns
β€’CNY-to-USD support for Chinese providers
β€’Idempotent recording with request IDs
β€’Cross-provider cost comparison
β€’Budget-based model recommendations

Capabilities & Tool Schemas (7) ~2.2k tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Verified live Verified liveCaptured by calling this server’s live tools/list endpoint.

Inspect callable tools, capabilities, and parameters exposed to AI agents by Llm Usage MCP.

record_usage

Record a single LLM API call with token counts. Cost is computed automatically from the pricing table at insert time. `request_id` enables idempotent recording β€” replaying a log file won't double-count.

query_spend

Return spending broken down by a chosen axis over a time window. `start` and `end` are ISO-8601 strings (trailing-`Z`, `+00:00`, or naive β€” naive is interpreted as UTC). Default window is the last 30 days. `group_by` is one of provider | model | project | tag | day. `filter` AND-combines optional provider/model/project equality predicates. `include_failed` defaults to `False` so failure rows (e.g. streams that died mid-flight with partial counts) are excluded from totals and groups. Pass `True` to fold them back in β€” useful for debugging capture-layer behavior, not for honest spend numbers. Tag semantics: events with NULL/empty tags are excluded from `group_by="tag"` results entirely; multi-tag events contribute once per tag (so per-group `calls` sums can exceed the window total). Project semantics are symmetric: NULL projects are dropped from `group_by="project"`. Groups are ordered cost-desc with alphabetical ties.

compare_providers

Project the cost of a hypothetical workload across providers/models. Returns models ranked by absolute cost ascending, with `relative_cost_pct` measured against the cheapest entry (cheapest = 100%). `models`, if given, restricts the comparison to those model names. Cost is computed from input/output tokens only; `RankedEntry.notes` is always `None` in v1 (the field is retained for future per-row caveats like "tiered pricing approximated"). `include_snapshots=False` (the default) family-dedups the ranked list: rows sharing both a model-family root (`gpt-5-mini` ↔ `gpt-5-mini-2025-08-07`) AND an identical projected cost collapse to one representative, with `RankedEntry.variant_count` recording how many catalog rows the entry stands for. Set `include_snapshots=True` to see every catalog row (each with `variant_count=1`) β€” useful when comparing snapshot-by-snapshot pricing for production pinning.

recommend_provider

Recommend the cheapest priced model that fits the workload + budget. v1 ranks by cost only. A future release will incorporate quality benchmarks (see `quality_snapshot` β€” the table is reserved for that purpose) and accept a `quality_priority` axis; for v1 those would rely on data we don't yet have, so the surface stays cost-only and honest. `expected_input_tokens` / `expected_output_tokens` default to a nominal 1k/1k workload when absent; the `reasoning` notes when defaults are in use. `budget_usd`, when set, filters out models that exceed it β€” if nothing fits, falls back to the cheapest model overall (the result fields are required, so there's no "no match" return shape) and the `reasoning` says so plainly. `providers` / `models` are optional whitelists (AND-combine when both passed). Both are applied before the budget cut, so an over- budget fallback returns the cheapest within the filter set rather than the cheapest priced model overall. A whitelist that matches nothing raises rather than fabricating a result β€” likely a spelling error in the caller's name list. `task_description` is **optional** and echoed into the reasoning but does not drive selection β€” the tool isn't an LLM and can't interpret free text. Omit it (or pass `None`) and the reasoning opens with `"Recommending …"` instead of `"For task 'X': …"`.

get_pricing

Return current pricing for one model, one provider, or all models. Both filters are optional and AND-combined. An unknown (provider, model) returns an empty list rather than an error β€” the caller can distinguish "model not in our table" from "no model matches your filter" by passing `provider` alone.

usage_summary

Return a one-shot summary of usage over a named calendar period. `period` is one of today | week | month | year (default: "week"). Boundaries are calendar UTC: `today` = since 00:00 UTC today, `week` = since Monday 00:00 UTC, `month` = since the 1st of the month, `year` = since January 1st. Returns totals, the top-3 providers and top-3 models by cost (with `pct` of total), and the single most expensive call in the window β€” or `largest_call=None` when the window is empty. `include_failed` defaults to `False`: totals, top-N rollups, and `largest_call` all exclude `success=False` rows (partial-stream captures and other failure rows). Pass `True` for symmetric debugging access to the failure population.

How Llm Usage MCP works

What zhaoyue722/llm-usage-mcp MCP server does

The zhaoyue722/llm-usage-mcp MCP server provides a local ledger for LLM API usage and cost analysis. It supports Anthropic, OpenAI, Qwen, and DeepSeek, including Chinese-provider pricing represented with CNY-to-USD conversion. Data is stored in SQLite at ~/.llm-usage/usage.db.

The server is a cost meter rather than a request router. It does not select models for live API calls or alter client traffic. Its recommendation tools evaluate recorded or hypothetical workloads using the available pricing catalog.

How it works

Usage can enter the ledger through the local capture proxy or through the record_usage MCP tool. The proxy listens only on 127.0.0.1:5525, keeps provider keys on the server side, and provides provider-specific routes for Anthropic, OpenAI, DeepSeek, and Qwen-compatible clients. Each recorded call includes token counts, cost, latency, and a request ID. Reusing a request ID makes repeated ingestion idempotent.

Costs are calculated against the pricing table when a usage row is inserted. query_spend can group results by provider, model, project, tag, or day, and accepts ISO-8601 time boundaries. Failed rows are excluded by default from spend totals and summaries; callers can include them for capture diagnostics. Calendar summaries cover today, week, month, and year using UTC boundaries.

The comparison and recommendation tools use input and output token counts. compare_providers ranks priced models by projected cost, while recommend_provider applies optional provider, model, and budget filters. Recommendations are cost-only in the current version; a task description is echoed in the explanation but does not influence model selection.

Setup and configuration

Install the package with uv tool install llm-usage-mcp, or run the MCP entry point with uvx llm-usage-mcp. The package requires Python 3.13 or newer according to the project metadata.

For automatic capture, configure the API key for each provider in use: ANTHROPIC_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY, or DASHSCOPE_API_KEY for Qwen. Start the proxy with llm-usage-proxy, then point the client’s matching base URL at the loopback proxy. The proxy can start without every provider key, but requests for an unconfigured provider return a configuration error.

The MCP server communicates over stdio. Claude Code can register it with the llm-usage-mcp executable, and the README also identifies Cursor as an MCP client that can use it. A CLI is included for spend, comparison, recommendation, model, provider, status, and proxy operations.

Tools and capabilities

The MCP surface includes:

  • record_usage for manually logging a call.
  • query_spend for filtered, grouped spend windows.
  • usage_summary for totals, top providers, top models, and the largest call.
  • compare_providers for projected cross-model pricing.
  • recommend_provider for cost-based model selection with optional budgets.
  • get_pricing and list_providers for inspecting the local pricing catalog.

The zhaoyue722/llm-usage-mcp MCP server excludes null or empty tags and projects from their respective grouped results. Multi-tag events appear once per tag, so grouped call counts may exceed the total number of calls. Unknown pricing filters return an empty result from get_pricing, while provider or model allowlists that match nothing cause recommendation errors.

Limitations and notes

Pricing and recommendations depend on the seeded local catalog. Recommendation v1 does not use quality benchmarks, and its notes field is reserved for future caveats. If a budget excludes every filtered model, the tool falls back to the cheapest model within the filter set and explains that fallback. The project is local-first and does not provide a hosted SaaS ledger or telemetry service in the supplied material.

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Monitoring View all alternatives
  • Langfuse MCP logoLangfuse MCP

    Query Langfuse traces, debug exceptions, analyze sessions, and manage prompts. Full observability toolkit for LLM applications.

    πŸ“Š Monitoring3 views
    Compare vs Langfuse MCP β†’
  • Opik MCP logoOpik MCP

    Use natural language to explore LLM observability, traces, and monitoring data captured by Opik.

    πŸ“Š Monitoring1 views
    Compare vs Opik MCP β†’
  • Llmkit logoLlmkit

    AI API cost tracking and budget enforcement across 11 LLM providers. 6 tools for spend analytics, budget monitoring, session summaries, and key management.

    πŸ“Š Monitoring2 views
    Compare vs Llmkit β†’
  • Fastmcp Sonarqube Metrics logoFastmcp Sonarqube Metrics

    A Model Context Protocol (MCP) server that provides a set of tools for retrieving information about SonarQube projects like metrics (actual and historical), issues, health status.

    πŸ“Š Monitoring8 views
    Compare vs Fastmcp Sonarqube Metrics β†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars
3
Stargazers on the source repository.
Last commit
4d ago
Most recent push to the default branch.
Tools exposed
7
Callable tools this server registers over MCP.
Directory activity
4 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Llm Usage MCP

Install it with `uv tool install llm-usage-mcp`, or run the MCP entry point with `uvx llm-usage-mcp`.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLlm Usage MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/zhaoyue722-llm-usage-mcp?style=directory)](https://allmcps.com/mcp/zhaoyue722-llm-usage-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/zhaoyue722-llm-usage-mcp"><img src="https://allmcps.com/api/badge/zhaoyue722-llm-usage-mcp?style=directory" alt="Llm Usage MCP on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ“ŠMonitoring
PricingFree
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimePython
AuthNo auth required
LicenseMIT
ClientsCursor
Last updatedSep 7, 2026
10/10 checks healthy over the last 32d
Views4
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars3
GitHub Star CountTotal stargazers on GitHub representing community popularity (3 stars).
Last commit4d ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Sep 7, 2026
61Quality signal: Good Β· 61/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools30/30
Adoption & activity5/15
Community engagement1/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev Β· llm-usage-mcp (PyPI)

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ“Š Monitoring β†’Best MCP servers for Monitoring & Observability β†’Alternatives to Llm Usage MCP β†’Install in Claude DesktopInstall in CursorInstall in VS Code