Skip to main content
Glama
apipriceindex

apipriceindex-mcp

Official

apipriceindex-mcp

An MCP server that gives any AI agent live, verified LLM API prices.

Ask your assistant "what would 200M input / 15M output tokens a month cost me on Sonnet vs GPT?" and it answers from today's index — every price with its verification date, cross-check confidence and source URL. Data from apipriceindex.com (CC BY 4.0, re-checked daily against official pricing pages).

Tools

Tool

What it does

search_models

Find model ids by name/provider, filter by context window or open weights

get_price

Verified price of one model: input/output/cached input USD per Mtok, verified_at, confidence, source

estimate_cost

Monthly bill of a workload; ranks chosen models — or the whole catalog — cheapest first

Related MCP server: tokenomics

Install

pip install apipriceindex-mcp

Claude Code / Claude Desktop:

claude mcp add apipriceindex -- apipriceindex-mcp

Or in any MCP client config:

{ "mcpServers": { "apipriceindex": { "command": "apipriceindex-mcp" } } }

Behavior

  • Prices are fetched live from the index (15-minute in-memory cache) — never stale training data.

  • Index unreachable → explicit error. No cached or invented price is ever served silently.

  • Index older than 14 days → answers still come, with a warning pointing at the index's health endpoint.

  • Model not tracked → says so, links the dataset. No price invented.

  • Cache discount only where the provider publishes a cached-input price.

  • Cost only: the index does not rank model quality, and third-party benchmark scores are not redistributed.

Environment: APIPRICEINDEX_URL overrides the dataset URL (testing).

License

Code: MIT. Price data: CC BY 4.0, attribution "API Price Index".

Available Tools

3 tools
estimate_costA

Estimate the monthly USD bill of a workload and rank models by cost.

Give monthly volumes in millions of tokens (input and output) and an optional share of input served from cache (0-100). Ranks the given model ids — or the whole catalog — from cheapest to most expensive. Cost only: this tool does not rank model quality.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelsNo
cache_pctNo
input_mtokYes
output_mtokYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It discloses that it ranks by cost only and does not rank quality, and it explains that it can cover either specified models or the whole catalog. However, it does not describe the output format, whether cache_pct affects estimates beyond a simple adjustment, or any potential side effects or external calls.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core purpose. Each sentence adds distinct value: what it does, how inputs are provided, what ranking is produced, and an important limitation. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient to invoke the tool correctly: units, optional parameters, and ranking behavior are all covered. The only notable gap is the lack of an explicit note about the response shape, though the ranking behavior strongly implies it. Given no output schema or annotations, this is a minor omission rather than a critical one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does. It explains input_mtok and output_mtok as monthly volumes in millions of tokens, cache_pct as a 0-100 share of cached input, and models as given model IDs or the whole catalog. All four parameters receive meaningful semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs and resources: 'Estimate the monthly USD bill of a workload' and 'rank models by cost.' It clearly distinguishes itself from the sibling tools by stating what it does and that it is cost-only, which differentiates it from search_models and get_price.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear input context: monthly token volumes, optional cache percentage, and model selection. It implicitly tells an agent when to use it for cost estimation/ranking, but it does not explicitly name alternatives like get_price for single-model pricing or search_models for discovery, so exclusion guidance is absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_priceA

Get the verified price of one model (USD per million tokens).

Returns input/output/cached-input prices with verification date, cross-check confidence and source URL. Prices are re-checked daily against official pricing pages. Data: apipriceindex.com, CC BY 4.0.

ParametersJSON Schema
NameRequiredDescriptionDefault
model_idYes

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses return contents (input/output/cached-input prices, verification date, confidence, source URL), the daily re-check process, and data attribution. It does not mention behaviors for invalid model IDs or failure modes, but the disclosed traits are meaningful and beyond the bare function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste. Core purpose is front-loaded, followed by useful return details and provenance. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter lookup, the description covers what is returned, how current the data is, and the source. The main gap is not connecting model_id to the sibling search_models, but overall the tool is adequately specified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It refers to 'one model' but gives no format, examples, or guidance on where model_id values come from (e.g., search_models). This leaves the sole parameter ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Get'), resource ('verified price of one model'), and unit ('USD per million tokens'). Clearly differentiates from siblings by emphasizing 'one model' and 'verified price' rather than searching models or estimating costs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for fetching a single model's price, but it does not explicitly say when to use it over the sibling tools search_models or estimate_cost. No exclusions or alternative conditions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_modelsA

Search the API Price Index for LLM API endpoints by name, id or provider.

Returns matching models with their id (use it with get_price / estimate_cost), provider, context window and USD prices per million tokens. Optional filters: provider slug (e.g. 'openai'), minimum context window, open-weights only.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
providerNo
min_contextNo
open_weightsNo

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden, and it does so well: it states what is searched, what matching models include, and the available filters. It does not mention order, pagination, or result limits, but for a lookup tool this is not a critical omission.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, with the core search purpose in the first sentence, output details in the second, and optional filters in the third. Every sentence adds necessary information with no repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with no output schema, the description sufficiently covers what is returned and how to use those results with sibling tools. All four parameters are meaningfully described, and the tool's place in the workflow is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must helpfully define the parameters, and it does. It explains query as matching by name/id/provider, provider as a slug like 'openai', min_context as a minimum context window, and open_weights as restricting to open-weights-only models.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Search') and resource ('API Price Index for LLM API endpoints'), and clarifies it searches by name, id, or provider. It also differentiates itself from siblings by noting that the resulting id is meant for use with get_price / estimate_cost.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says that returned model ids should be used with get_price / estimate_cost, which guides the agent to the correct downstream tools. It does not formally state when not to use search_models, but the intended workflow and filtering options are clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.1
    • First observedestimate_cost
    • First observedget_price
    • First observedsearch_models

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation4/5

The tools are mostly distinct: search_models handles discovery, get_price provides verified single-model pricing, and estimate_cost handles cost projection. There is slight overlap between search_models and get_price since both return price data, but the descriptions clarify the intended use well.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: search_models, get_price, estimate_cost. The naming is predictable and makes the purpose of each tool immediately clear.

Tool Count5/5

Three tools is appropriate for a focused pricing-index server. Each tool covers a distinct part of the user workflow: discovering models, looking up verified prices, and estimating workload costs. No tool feels redundant or extraneous.

Completeness4/5

The core domain is well covered: search, price lookup, and cost estimation all work together without obvious dead ends. A minor gap is the lack of a dedicated provider-list or model-detail endpoint, though search_models can partially fill that role.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Live LLM API pricing: current token prices, model comparisons, cheapest-model lookups, and The LLM Price Index for 150+ models across 20+ providers, re-verified daily. No API key required.
    5
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Provides public price indices for GPU rentals (spot, on-demand, DePIN) with verify URLs, enabling agents and users to query and verify compute economics rates.
    5
    1
    Apache 2.0