Developer reference · MCP server 0.2.0 · checked 2026-11-19
AI API Pricing MCP Server
ai-api-pricing-mcp lets an AI assistant look up source-linked AI API prices, estimate and compare monthly token costs, read recorded price changes, and see what each price change does to a workload you describe. It reads the same public dataset as this site. It runs on your machine over stdio, needs no account or API key, and collects no telemetry.
This page documents version 0.2.0, which adds the get_price_impact tool. To pin this version, use ai-api-pricing-mcp@0.2.0. The data comes from the AI API Pricing Dataset; how prices are verified is described in the methodology.
Install
Node.js 18 or newer is required. Start the server directly with:
npx -y ai-api-pricing-mcpClaude Desktop
Add this entry under mcpServers in claude_desktop_config.json, then restart Claude Desktop:
{
"mcpServers": {
"ai-api-pricing": {
"command": "npx",
"args": ["-y", "ai-api-pricing-mcp"]
}
}
}You can also install the packaged bundle: download ai-api-pricing-mcp-<version>.mcpb from GitHub Releases, then double-click it or drag it into Settings → Extensions.
Claude Code
claude mcp add ai-api-pricing -- npx -y ai-api-pricing-mcpCursor
Put the same mcpServers entry as for Claude Desktop in .cursor/mcp.json in a project, or in ~/.cursor/mcp.json for global use.
VS Code
Create .vscode/mcp.json:
{
"servers": {
"ai-api-pricing": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ai-api-pricing-mcp"]
}
}
}The six tools
All six tools are read-only. Every successful result includes the official provider source URL(s), a verification date, and a link to the matching page on this site.
get_model_priceget_model_price({ model })Find a model by ID or display name and return source-linked prices.
list_modelslist_models({ provider?, max_input_price?, max_output_price? })List source-linked models, optionally filtering by provider and maximum token prices.
estimate_monthly_costestimate_monthly_cost({ model, input_tokens_per_request, output_tokens_per_request, requests_per_month, cached_input_ratio?, use_batch? })Estimate monthly token cost from request volume, with optional cached-input and batch pricing.
compare_modelscompare_models({ models, input_tokens_per_request, output_tokens_per_request, requests_per_month })Compare monthly costs for multiple models and sort them from lowest to highest total.
price_changesprice_changes({ since?, provider? })List up to 20 newest source-linked price-change events.
get_price_impactget_price_impact({ model, input_tokens_per_request, output_tokens_per_request, requests_per_month, cached_input_ratio?, since?, include_scheduled? })Show what each recorded price change of one model does to a monthly workload: the monthly cost before and after, the difference, and whether the change is in effect or only announced.
Model matching accepts exact IDs and display names. A fuzzy query that matches several models returns a “Did you mean” list instead of choosing one. Cost estimates refuse missing required prices; they never substitute a standard, cache, or batch rate.
What get_price_impact answers
Providers change prices, and a change only matters for the workload you actually run. You give the tool one model and a monthly workload: requests per month, input and output tokens per request, and optionally the share of input read from cache. For each recorded price change of that model it returns the monthly cost before and after, the difference in dollars and percent, and whether the change is already in effect or only announced.
How a monthly cost is computed
Total input tokens are input tokens per request × requests per month. The cached share (cached_input_ratio, 0 to 1, default 0) is read at the cached-input rate and the rest at the input rate; output tokens are read at the output rate. The sum, divided by 1,000,000, is the monthly cost at the standard per-1M-token rates in the price-change event. Taxes, negotiated discounts, credits, and provider rounding are not included.
Which changes it prices
Same-model price changes in the price-change events: price updates, component price updates, cached-input prices added or removed, and scheduled price changes. Model launches, successor transitions, and lifecycle notices are not price changes and are left out.
In effect or announced
A change is dated by its effective_from day when the provider gave one. Otherwise it is dated by the day the price monitor first saw it, and the result says “first seen by the monitor”, because the provider may have changed the price earlier. A change dated after today is “announced, not yet in effect”. It is listed, but it is never part of the net total. Use include_scheduled: false to hide announced changes and since (a YYYY-MM-DD day) to drop older ones.
What it does not price
- No price is ever assumed. When a change lacks a price your workload needs, for example the cached-input price before the change although you set a cached share, the change is listed under
skippedwith the reason. - A net total across the changes in effect is given only when none of them was skipped and each one starts from the price the previous one set. Otherwise
netis null andnet_unavailable_reasonsays why. - Price-change events carry the standard rates only. When your per-request input size puts the model in a pricing tier with different rates, the tool refuses instead of mixing tiers.
- Models billed by time of day are not priced; their schedule changes are listed as skipped.
- Models that are not priced per 1M tokens are refused, as in
estimate_monthly_cost.
Reading the result
The structured result carries these fields under data:
entries: One item per priced change, newest first, up to 20: event_id, change_type, date, date_basis, status (in_effect or scheduled), before_monthly_usd, after_monthly_usd, delta_monthly_usd, delta_percent, direction, changed_prices, and the official source and announcement URLs.skipped: Changes that were not priced, each with the reason.net: The combined effect of every change in effect, or null.net_unavailable_reason: Why there is no net total, when net is null.current_monthly_usd: The monthly cost of the same workload at today’s catalog price, or null when the catalog cannot price it.event_feed: Where the events came from (live or bundled), the date of the earliest event, and how many events were checked.notes: Plain-language caveats for this result.
The event feed does not go back forever. The result states the date of the earliest event, and changes before that date are not covered. When the newest change in effect does not end at the current catalog price, a note says that a later change is missing from the feed.
Worked example
Recorded 2026-11-17 for gemini-3.6-flash: 2,000 input and 500 output tokens per request, 100,000 requests a month, and 30% of input cached. This is a recording, not live data: the tool reads the current feed each time you run it.
Gemini 3.6 Flash (gemini-3.6-flash): 2 price change(s) priced for 100000 requests a month, 2000 input and 500 output tokens each, 30% of input cached.
2027-01-01 (announced, not yet in effect): $297.00 to $594.00 a month, +$297.00 (+100.0%): more expensive
2026-08-29 (first seen by the monitor): $594.00 to $297.00 a month, −$297.00 (−50.0%): cheaper
Net across 1 change(s) in effect, 2026-08-29 to 2026-08-29: $594.00 to $297.00 a month, −$297.00 (−50.0%).
Prices are the standard per-1M-token rates in the price-change events, before taxes, negotiated discounts, credits, and provider rounding.
The event feed starts on 2025-12-02; earlier changes are not in it.
Official source URL(s): https://ai.google.dev/gemini-api/docs/pricing
Verified 2026-10-27
AICostBudget: https://aicostbudget.com/en/models/gemini-3-6-flash-pricing- Before 2026-08-29: 140,000,000 uncached input tokens × $1.5/M = $210.00, plus 60,000,000 cached × $0.15/M = $9.00, plus 50,000,000 output × $7.5/M = $375.00, which is $594.00 a month.
- From 2026-08-29: 140,000,000 uncached input tokens × $0.75/M = $105.00, plus 60,000,000 cached × $0.075/M = $4.50, plus 50,000,000 output × $3.75/M = $187.50, which is $297.00 a month.
- The provider announced that the price returns to the earlier rates on 2027-01-01. That change is shown as announced and is not in the net total, which covers only the 2026-08-29 change: $594.00 to $297.00 a month.
The 2026-08-29 date is the day the monitor first saw the lower price, not a date the provider published.
Data sources and privacy
The server writes no files, collects no telemetry, and uses only three public endpoints at runtime: the GitHub Pages pricing JSON, the price-change events file on GitHub, and the sitemap of this site. If live pricing or price changes fail to load, the response says that the bundled fallback was used and may be older. Links to model pages are emitted only when the page is in the sitemap; otherwise the server links to the models index.
Recorded price changes are also published on the price change monitor.
Known limitations
- Prices are list prices from the provider’s pricing page. They are not your invoice.
get_price_impactcovers the changes recorded in the event feed. It does not rebuild earlier price history.- A “first seen by the monitor” date can be later than the day the provider changed the price.
get_price_impactuses standard rates; batch pricing is available inestimate_monthly_costonly.- The tool prices tokens. Per-image, per-second, per-character, and other non-token billing is not covered.
Links
- ai-api-pricing-mcp on npm
- Package README on GitHub
- Report a wrong price, with the official source link