# TokenBudget

> TokenBudget is an MCP server for ai models and llm tooling. MCP server returning sourced LLM API prices and cost budgets for agent runs. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Platforms:** API
- **MCP Registry name:** io.github.adamhursey/tokenbudget
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-27

## About

TokenBudget is a remote Model Context Protocol server that gives AI agents access to current language model API pricing across providers such as OpenAI, Anthropic Claude and Google Gemini. Instead of hardcoding rates, an agent can query the server to look up what a given model costs and estimate spend before it starts a job.

The server runs over streamable HTTP at a hosted endpoint, so MCP-compatible clients can connect to it without installing anything locally. Its focus is on cost planning for agent runs, letting a workflow set a budget and check projected token expenses against it.

It suits developers building multi-step agents who need to keep API spend predictable, and teams comparing model costs when choosing which LLM to route a task to.

## Features

- **Sourced model pricing:** Returns LLM API prices for multiple providers, including OpenAI, Claude and Gemini models.
- **Run cost budgets:** Lets an agent work against a cost budget for a planned run.
- **Remote MCP endpoint:** Served over streamable HTTP so clients can connect without a local install.
- **Multi-provider comparison:** Covers several LLM vendors so costs can be compared across models.

## Good for

- Estimating token spend before an agent starts a multi-step task
- Comparing per-model API prices when choosing an LLM for a workflow
- Enforcing a spending cap on autonomous agent runs
- Giving an AI assistant up-to-date LLM pricing data on demand

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http tokenbudget https://tokenbudget.netlify.app/mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "type": "http",
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://tokenbudget.netlify.app/mcp
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "type": "http",
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://tokenbudget.netlify.app/mcp
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add tokenbudget --url https://tokenbudget.netlify.app/mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.tokenbudget]
url = "https://tokenbudget.netlify.app/mcp"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "httpUrl": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http tokenbudget https://tokenbudget.netlify.app/mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "serverUrl": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "url": "https://tokenbudget.netlify.app/mcp",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "type": "streamableHttp",
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "tokenbudget": {
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "tokenbudget": {
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://tokenbudget.netlify.app/mcp
```

Enter a Name (for example "TokenBudget"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tokenbudget": {
      "type": "http",
      "url": "https://tokenbudget.netlify.app/mcp"
    }
  }
}
```

## Tools

The server marks 1 of 7 tools as able to change data. From the server's own tool labels and tool names; not verified by us.

- `estimate_cost` (says read-only): Price one LLM request (input + expected output) on many models at once, cheapest first, with current list prices from each provider's own pricing page (source URL and check date included), prompt-cache and batch discounts, long-prompt surcharges and announced price changes. Also says whether the request fits each model's context window. Call this before an expensive request to pick a model or to s
- `plan_agent_run` (says read-only): Estimate the total cost of an agent loop that re-sends its growing context every turn, with prompt caching, on many models. Returns total cost, peak context, how many turns fit in each model's context window, how many turns fit in a budget, and a recommended model. Use before starting a long agent task.
- `check_context_fit` (says read-only): Say which models can take this input plus the output you want to reserve, which cannot, and which do not publish a context window. Use before sending a very large document or conversation.
- `count_tokens` (says read-only): Estimate how many tokens a text is for each tokenizer family (OpenAI o200k, Claude legacy and 2026, Gemini, DeepSeek, Mistral, Qwen), with an error band. Estimates only; for exact counts use the provider's count endpoint.
- `list_models` (says read-only): List every model this tool prices, with input, output, cache and batch prices per 1M tokens, context window, max output, source URL and the day the price was checked.
- `get_model_pricing` (says read-only): Price, context window, long-prompt surcharge, announced price changes and source for one model id.
- `send_feedback` (says it can change data): Report a wrong price, a missing model, a bug or an idea. Read by a person. Keep it under 1000 characters and do not include prompts, secrets or personal data (they are scrubbed anyway).

## FAQ

### How do I connect to TokenBudget?

It is available as a remote MCP server over streamable HTTP at a hosted endpoint, so any MCP client that supports that transport can connect.

### Which LLM providers are covered?

The server lists prices for OpenAI, Claude and Gemini models, among others.

### How do I add TokenBudget to Claude Code?

Run this command in your terminal: claude mcp add --transport http tokenbudget https://tokenbudget.netlify.app/mcp

### What are the best alternatives to TokenBudget?

The closest alternatives to TokenBudget are Agent Cost MCP Server, MCP Cost Optimizer, ComparEdge LLM Cost, Llm Cost Estimator and uplinkswitch.

## Where this comes from

- Description: written from its MCP Registry entry.
- Status and tools: checked automatically by AIPoweredBot on 29 November 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agent Cost MCP Server](https://ai-powered.com/mcp/agent-cost-mcp-server): Agent Cost MCP Server is a free MCP server for ai models and llm tooling.
- [MCP Cost Optimizer](https://ai-powered.com/mcp/mcp-cost-optimizer): MCP Cost Optimizer is an open-source MCP server for ai models and llm tooling.
- [ComparEdge LLM Cost](https://ai-powered.com/mcp/comparedge-llm-cost): ComparEdge LLM Cost is an open-source MCP server for ai models and llm tooling.
- [Llm Cost Estimator](https://ai-powered.com/mcp/llm-cost-estimator): Llm Cost Estimator is an open-source MCP server for ai models and llm tooling.
- [uplinkswitch](https://ai-powered.com/mcp/uplinkswitch-2): uplinkswitch is a paid MCP server for design and media.
- [MCP Cost Tracker Router](https://ai-powered.com/mcp/mcp-cost-tracker-router): MCP Cost Tracker Router is an MCP server for developer tools.
- [Tokencost Dev](https://ai-powered.com/mcp/tokencost-dev): Tokencost Dev is an open-source MCP server for ai models and llm tooling.
- [Agent Costcenter](https://ai-powered.com/mcp/agent-costcenter): Agent Costcenter is an open-source MCP server for analytics and data.

---
Source: https://ai-powered.com/mcp/tokenbudget
