LLM Usage & Cost Tracker
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LLM_USAGE_DB_URL | No | The database URL for storing usage data. | sqlite:///$HOME/.llm-usage/usage.db |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| record_usageC | Record a single LLM API call with token counts. Cost is computed automatically from the pricing table at insert time.
|
| query_spendA | Return spending broken down by a chosen axis over a time window.
Tag semantics: events with NULL/empty tags are excluded from
|
| compare_providersA | Project the cost of a hypothetical workload across providers/models. Returns models ranked by absolute cost ascending, with
|
| recommend_providerA | Recommend the cheapest priced model that fits the workload + budget. v1 ranks by cost only. A future release will incorporate quality
benchmarks (see
|
| get_pricingA | 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 |
| usage_summaryA | Return a one-shot summary of usage over a named calendar period.
|
| list_providersA | List every provider we know about, with their models and OpenAI-compat flag. Sources the provider/model lists from |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| recent_events | Most recent LLM call events recorded by the local capture layer. |
| pricing_table | Current `pricing_snapshot` table — one row per (provider, model). |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhaoyue722/llm-usage-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server