# LLM-cost-watch: An MCP Server for Monitoring AI Spending and Latency

New tool allows developers to query Claude directly about LLM bill spikes and bottlenecks.

- **Source:** [Hacker News: Show HN](https://news.ycombinator.com)
- **Published:** 2026-11-08
- **Topic:** [technology](https://brifing.si/c/technology)
- **Original article:** <https://github.com/rohith0707/llm-cost-watch>
- **On Brifing:** https://brifing.si/s/1bec6220-1e54-4777-86f2-5ac0a37b7bb7

## New LLM Cost Intelligence

The llm-cost-watch project introduces an open-source Model Context Protocol server designed to track LLM spending and latency. Developers can query Claude directly about their infrastructure costs, bypassing complex web dashboards. The tool provides actionable insights into why bills increase, identifying specific pipelines or features that drive high expenditure and performance bottlenecks.

## Direct Conversational Diagnostics

Users can ask Claude questions like why their spending jumped 40% or where latency issues originate. The system responds by calling specific tools to analyze cost by feature or identify slow calls. For example, it can pinpoint that a knowledge base RAG pipeline accounts for 66.1% of total spend during test runs.

## Core Diagnostic Toolset

The server includes three primary tools: cost_by_feature, slow_calls, and routing_suggestions. These functions identify the largest budget consumers, pinpoint high-latency outliers like recursive tool loops, and calculate potential savings. By analyzing prompt payloads and reasoning stalls, the tool provides specific data on p50, p95, and p99 latency metrics for developers.

## Model Routing Optimization

The routing_suggestions tool analyzes structured prompts running on expensive frontier models. It calculates exact dollar savings from migrating tasks to more efficient models like Claude 3.5 Haiku or GPT-4o-mini. In one scenario, switching a classification task from GPT-4o to a smaller model reduced feature spend by 94% and lowered latency significantly.

## Integration and Setup

Installation requires cloning the GitHub repository and adding the server configuration to the claude_desktop_config.json file. Developers integrate the system into their code using a single line decorator, @watch_llm, which tags specific functions with feature names and model types. This setup process is designed to be completed in under five minutes.

## Open Source and Enterprise

The core functionality of llm-cost-watch is available under an MIT license, making it free for general use. For organizations requiring deeper analysis, the developer offers a commercial 14-day concurrency and cost audit service priced at $2,500. This enterprise option provides professional oversight for companies managing complex, high-volume AI infrastructure deployments.

## Technical Performance Metrics

The tool specifically targets uncompressed context windows and inefficient routing as primary cost drivers. By monitoring 7k token context windows, it identifies why p95 latency might reach 3,120ms. These granular metrics allow engineering teams to make data-driven decisions regarding their AI architecture, ensuring that model selection aligns with the specific task requirements.

## Future of AI Observability

As LLM usage scales, managing costs and latency becomes a critical operational challenge for software teams. By leveraging the Model Context Protocol, llm-cost-watch integrates observability directly into the development workflow. This approach shifts the burden of cost analysis from manual dashboard reviews to automated, conversational queries within the Claude desktop environment.

## Sources covering this story

- https://github.com/rohith0707/llm-cost-watch — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
