MCP Server

Give your agent live LLM pricing as callable tools — look up what a model costs, compare models to find a cheaper one, estimate a job before running it, and check what is being retired.

Endpoint

https://agentcost.tech/api/mcp

Streamable HTTP. Public — no credentials, no sign-up. Protocol revisions 2026-07-28, 2025-06-18, 2025-03-26, so both the current stateless revision and the older handshake era work.

Connect

Claude Code

Add the remote server from the terminal.

claude mcp add --transport http agentcost https://agentcost.tech/api/mcp

Claude Desktop, Cursor, Windsurf and other config-file clients

Add an entry under mcpServers in the client's config file.

{
  "mcpServers": {
    "agentcost": {
      "type": "http",
      "url": "https://agentcost.tech/api/mcp"
    }
  }
}

Anything else that speaks MCP

Point any MCP client at the endpoint over Streamable HTTP. No install step, no API key, no OAuth flow.

https://agentcost.tech/api/mcp

Tools

list_models

Search the public AgentCost catalogue of LLM models and their per-1,000-token rates. Filter by provider and/or a substring of the model name. Use this to compare model costs or find a cheaper alternative. Returns rates in USD; no credentials required.

provider
Provider slug to filter by, e.g. openai, anthropic, google, aws, azure.
query
Case-insensitive substring to match against the model name, e.g. 'sonnet' or 'gpt-4'.
limit
Maximum models to return. Results are sorted cheapest-input-first.

get_model_pricing

Look up the per-1,000-token rates for a single named model. Resolves the name exactly, then case-insensitively, then by provider-prefixed suffix (so 'gpt-4o' finds 'azure/gpt-4o'). Use this when you already know which model you are pricing.

model*
Model name as the provider spells it, e.g. gpt-4o or claude-sonnet-4-6.

estimate_cost

Work out the USD cost of one or more LLM calls before making them, from the current catalogue. Give a model and the token counts involved. Use `calls` to price a whole job rather than a single call. Cached input tokens bill at the provider's cached rate when one is published and at the full input rate when it is not; the result reports which happened.

model*
Model name, e.g. gpt-4o.
input_tokens*
Prompt tokens per call.
output_tokens*
Completion tokens per call.
cached_input_tokens
Prompt tokens served from the provider's cache, per call.
cache_write_tokens
Tokens written into the prompt cache, per call.
calls
How many identical calls to price. Use this to cost a whole job.

list_model_deprecations

List models with an upstream-announced retirement date, soonest first. Use this to check whether a model a user depends on is being retired, or to avoid recommending one that is.

provider
Optional provider slug to filter by.
limit

* required

What it does not do

These tools read the public pricing catalogue only. They cannot see your own spend, projects or budgets — that needs an authenticated account and the REST API. Nothing here writes anything, so every tool is safe to call speculatively.

Verify it

curl -sX POST https://agentcost.tech/api/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2026-07-28" \
  -H "Mcp-Method: tools/list" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Related: REST API reference · Versioning & deprecation policy · OpenAPI spec