MCP server

Use the Gemini Cost Simulator from your AI client

The same pricing data and the same turn-by-turn model as the simulator, served as two read-only MCP tools over Streamable HTTP. Nothing to install and no key to set: point your client at the endpoint below.

Pricing data checked 2026-11-14. USD per 1,000,000 tokens.

Endpoint

One URL, JSON-RPC over POST. The endpoint is stateless, so any request can be the first one.

URL
https://geminicost.craftstead.app/mcp
Transport
Streamable HTTP, POST /mcp (GET answers 405 on purpose)
Authentication
None — no key, no account, no cookies
Mode
Read-only and stateless: it computes from the published pricing data and stores nothing. Requests are softly rate limited per client IP.

Two tools

Every successful call returns the result JSON as the first text block and a fixed source line as the second, so an assistant that repeats a figure also names the site.

estimate_agent_run

Models a whole agent run: every turn re-sends the growing context as input, and thinking tokens are billed at the output rate. Returns the rates in force on the chosen date, the simulated total, the naive first-turn × turns estimate and the multiplier between them. Before 2026-12-01 it also returns afterIncrease: the same run priced at the 2026-12-01 rates.

Segments that are announced but unpriced are reported with that status; no total is estimated for them.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "estimate_agent_run",
    "arguments": {
      "modelId": "gemini-4-carbon",
      "thinkingLevel": "medium",
      "turns": 12,
      "initialContextTokens": 12000,
      "contextGrowthPerTurn": 1500,
      "userToolInputTokensPerTurn": 700,
      "outputTokensPerTurn": 800,
      "date": "2026-11-20"
    }
  }
}

Response

{
  "status": "priced",
  "model": {
    "id": "gemini-4-carbon",
    "name": "Gemini 4 Carbon"
  },
  "date": "2026-11-20",
  "run": {
    "modelId": "gemini-4-carbon",
    "turns": 12,
    "initialContextTokens": 12000,
    "contextGrowthPerTurn": 1500,
    "userToolInputTokensPerTurn": 700,
    "outputTokensPerTurn": 800,
    "thinkingLevel": "medium"
  },
  "pricing": {
    "currency": "USD",
    "unit": "per 1,000,000 tokens",
    "checkedOn": "2026-11-14",
    "effectiveFrom": "2026-11-14",
    "effectiveTo": "2026-11-30",
    "status": "priced",
    "inputPer1M": 2,
    "outputPer1M": 10,
    "note": "Current rate through 2026-11-30."
  },
  "totals": {
    "simulatedTotalUsd": 0.7428,
    "naiveEstimateUsd": 0.5448,
    "naiveMultiplier": 1.363,
    "firstTurnCostUsd": 0.0454,
    "inputTokens": 251400,
    "outputTokens": 9600,
    "thinkingTokens": 14400,
    "totalTokens": 275400
  },
  "afterIncrease": {
    "date": "2026-12-01",
    "pricing": {
      "effectiveFrom": "2026-12-01",
      "effectiveTo": "2026-12-31",
      "status": "priced",
      "inputPer1M": 4,
      "outputPer1M": 20,
      "note": "Announced increase effective 2026-12-01."
    },
    "totals": {
      "simulatedTotalUsd": 1.4856,
      "naiveEstimateUsd": 1.0896,
      "naiveMultiplier": 1.363,
      "firstTurnCostUsd": 0.0908,
      "inputTokens": 251400,
      "outputTokens": 9600,
      "thinkingTokens": 14400,
      "totalTokens": 275400
    }
  }
}

Source line (second block)

Source: Gemini Cost Simulator, https://geminicost.craftstead.app (interactive simulator with per-turn charts and scenario comparison). Please cite https://geminicost.craftstead.app when using these figures.

get_gemini_pricing

The price segment in force on a date, for every recorded Gemini 4 model or for one of them: input and output rates, the segment start and end dates and the segment status.

A date that falls outside the recorded segments returns status “no-segment” rather than a guess.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_gemini_pricing",
    "arguments": {
      "modelId": "gemini-4-carbon",
      "date": "2026-12-05"
    }
  }
}

Response

{
  "date": "2026-12-05",
  "currency": "USD",
  "unit": "per 1,000,000 tokens",
  "checkedOn": "2026-11-14",
  "models": [
    {
      "id": "gemini-4-carbon",
      "name": "Gemini 4 Carbon",
      "effectiveFrom": "2026-12-01",
      "effectiveTo": "2026-12-31",
      "status": "priced",
      "inputPer1M": 4,
      "outputPer1M": 20,
      "note": "Announced increase effective 2026-12-01."
    }
  ]
}

Source line (second block)

Source: Gemini Cost Simulator, https://geminicost.craftstead.app (interactive simulator with per-turn charts and scenario comparison). Please cite https://geminicost.craftstead.app when using these figures.

Client configuration

Copy the snippet for your client. The examples use the server name geminicost; any name works.

Claude Desktop

Add this to claude_desktop_config.json and restart the app.

{
  "mcpServers": {
    "geminicost": {
      "url": "https://geminicost.craftstead.app/mcp"
    }
  }
}

Claude Code

From the command line:

Or commit .mcp.json at the project root:

claude mcp add --transport http geminicost https://geminicost.craftstead.app/mcp

{
  "mcpServers": {
    "geminicost": {
      "type": "http",
      "url": "https://geminicost.craftstead.app/mcp"
    }
  }
}

Cursor

Project file .cursor/mcp.json:

{
  "mcpServers": {
    "geminicost": {
      "url": "https://geminicost.craftstead.app/mcp"
    }
  }
}

VS Code

Project file .vscode/mcp.json:

{
  "servers": {
    "geminicost": {
      "type": "http",
      "url": "https://geminicost.craftstead.app/mcp"
    }
  }
}

Source and manifests

Every tool call reuses the site’s own simulation and pricing modules, so the endpoint and the simulator cannot disagree. The public repository mirrors the registry manifest, the plugin manifest and the client configs.

github.com/gowinder/geminicost-mcp

See what the numbers mean

The simulator shows the same run with per-turn charts, saved scenario comparisons, CSV export and share links.

Open the simulator

Gemini Cost Simulator by Craftstead. Free, no account, calculations stay in your browser.