llm-quota-mcp
Reads token and cost totals already tracked locally by Hermes Agent via its sessions export, for a specified session or recent window of sessions, without requiring a network call or API key.
Checks current OpenAI API per-minute rate-limit window and reset time, and can optionally retrieve historical usage/cost totals using an organization Admin API key.
Click 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., "@llm-quota-mcpcheck my Anthropic rate-limit quota"
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.
llm-quota-mcp
Inspect LLM API rate-limit headers and locally recorded Hermes Agent usage through a CLI, Python API, or stdio MCP server. This is not a monthly-credit balance or subscription-quota tracker: unavailable fields remain None/null with explanatory notes.

What it reads
Anthropic: a
count_tokensprobe and any rate-limit headers returned. The probe does not generate a paid completion; headers may be absent.OpenAI: a minimal chat completion to inspect request/token windows. This is a real API call with a small token cost. An optional organization Admin API key enables historical usage/cost queries; a normal project key does not.
Hermes: local token and cost records obtained through
hermes sessions export. This reports usage already incurred, not remaining provider quota.
Related MCP server: Claude Code Usage
Install
Requires Python 3.10+. Provider probes use requests; the MCP extra installs the MCP SDK. The Hermes reader additionally needs a compatible hermes executable on PATH.
git clone https://github.com/zhuhroscar-tech/llm-quota-mcp.git
cd llm-quota-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[mcp]"
llm-quota --helpFor CLI-only use, install with pip install -e . instead.
CLI and Python
Provide ANTHROPIC_API_KEY or OPENAI_API_KEY through your local secret-management environment. Optional OpenAI settings are OPENAI_ADMIN_API_KEY and OPENAI_ORG_ID.
llm-quota anthropic --json
llm-quota openai --json
llm-quota hermes --newer-than 24h --jsonUse --model to select a model your provider key can access. Network/authentication errors or unsupported probe models can prevent a report.
import os
from llm_quota import get_anthropic_quota
quota = get_anthropic_quota(api_key=os.environ["ANTHROPIC_API_KEY"])
print(quota.requests.remaining, quota.requests.reset_at)MCP setup
Register llm-quota-mcp as a stdio server in your host. A host using the mcpServers convention can use:
{
"mcpServers": {
"llm-quota": {"command": "/absolute/path/to/.venv/bin/llm-quota-mcp"}
}
}Replace the executable path. Supply secrets to the server process using your host's environment/secret mechanism; configuration schemas differ by host. Tools are check_anthropic_quota, check_openai_quota, and check_hermes_usage.
Safety and tests
Never commit keys or paste them into agent conversations. Prefer environment credentials over per-call key arguments, and grant Admin API access only when needed. Results can contain sensitive usage/cost information. Rate-window snapshots are not guarantees that a later request will succeed.
pip install -e ".[dev]"
pytest -vProvider tests mock HTTP; live account behavior is not established by those tests. Hermes integration coverage depends on an available compatible CLI. MIT license.
This server cannot be deployed
Maintenance
Related MCP Connectors
Token guard and rate limiter preventing runaway API cost spikes for OpenAI and Anthropic.
Meter, cap, and block AI agent spend before the provider is charged.
Budget & cost control for AI agents — per-agent spend caps + rate limits before each call.
Live status, API pricing and rate limits for ChatGPT, Claude, Gemini, Cursor and 42+ AI tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceExposes rate-limit and usage data for AI coding agent CLIs as MCP tools, enabling querying of usage snapshots and reset times.MIT
- AlicenseNot gradedqualityCmaintenanceSurface Claude Code token usage, estimated cost, and plan-limit status in any MCP client. Enables agents to query usage data from local logs and Anthropic API.MIT
- AlicenseAqualityBmaintenanceLets AI agents check remaining MiniMax Token Plan quota and automatically pause themselves before hitting rate limits.8MIT
- AlicenseNot gradedqualityCmaintenanceProvides coding agents with pre-flight cost estimation by analyzing local logs to forecast token usage and quota impact before expensive work, exposing tools for remaining quota, per-task cost estimates, and attempt affordability.42 npmMIT