Skip to main content
Glama
README.md
# modelpricing-mcp

[![ModelPricing](https://modelpricing.xyz/api/badge)](https://modelpricing.xyz)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

Official **Model Context Protocol (MCP)** server for **[ModelPricing.xyz](https://modelpricing.xyz)**. Gives AI coding agents (Cursor, Claude Desktop, Windsurf, Antigravity) live access to 2026 frontier LLM API pricing, KV prompt caching math, and token cost simulations.

## Tools Included

1. **`list_llm_models`** — Fetch live 2026 rates across OpenAI, Anthropic, Google, DeepSeek, xAI, and Meta.
2. **`calculate_llm_cost`** — Simulate monthly API costs for any input/output token volume and KV cache hit ratio (`0` to `1`).
3. **`compare_llm_models`** — Side-by-side cost & savings comparison between any two models with direct links to interactive charts.

## Quick Setup (Cursor / Claude Desktop / Windsurf)

Add to your `mcp_config.json` or `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "modelpricing": {
      "command": "npx",
      "args": ["-y", "modelpricing-mcp"]
    }
  }
}
```

## Links

- **Interactive Web Simulator**: [https://modelpricing.xyz](https://modelpricing.xyz)
- **Public JSON API**: `https://modelpricing.xyz/api/pricing.json`
- **Open Dataset**: [https://github.com/allex122/llm-pricing-dataset](https://github.com/allex122/llm-pricing-dataset)

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation4/5

Each tool has a distinct purpose: list fetches raw pricing data, calculate computes cost for a workload, and compare does a two-model side-by-side. The only mild overlap is between calculate and compare, since both surface cost figures, but the descriptions clearly delineate workload-based ranking versus pairwise comparison.

Naming Consistency5/5

All three tools follow a clean verb_noun pattern (list_, calculate_, compare_) on the same domain object (llm_models). The convention is predictable and immediately readable.

Tool Count4/5

Three tools is on the thin side but well-matched to a focused pricing-reference server: fetch, compute, and compare cover the core needs without bloat. Slightly more (e.g. a single-model lookup) could round it out, but nothing feels redundant.

Completeness4/5

The surface covers the main lifecycle of the domain—retrieve pricing, apply it to a workload, and compare models. Minor gaps exist, such as retrieving one specific model's full details or historical pricing, but these are workable via list_llm_models.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues