OverpayingForAIPricing desk
8 min read·Last reviewed for accuracy · 2026-09-11·Prices verified · 2026-09-12

MCP Cost: What Model Context Protocol Servers Add in Tokens

MCP is free, but every connected server injects its tool schemas into every request. This article measures that overhead, shows what ten servers do to a 12-step run on four models, and gives four ways to cut it.

The article text carries the review date. The rate table below is rebuilt from the live catalogue on every deploy.

Fastest win

A single MCP server exposing around 25 tools injects an estimated 3,000 to 8,000 tokens of JSON schema into every request, before the model has read the task. Connect ten and you are re-sending roughly 50,000 tokens per step. On Claude Sonnet 5 that turns a $0.39 twelve-step run into about $1.53. Count the tool list with the vendor's token counter before you connect anything.

The short answer on MCP cost

MCP itself costs nothing. The Model Context Protocol, its SDKs and most community servers are free. What you pay for is tokens: every connected server's tool definitions are injected into every request, and a server with around 25 tools adds an estimated 3,000 to 8,000 tokens of schema. Ten servers is roughly 50,000 tokens per step. On the reference 12-step run that lifts Claude Sonnet 5 from $0.39 to about $1.53, GPT-5.4 from $0.50 to about $1.93, Gemini 3.8 Flash from $0.15 to about $0.58 and DeepSeek V4 Flash from under $0.01 to about $0.04.

Those figures are before prompt caching. With caching the Sonnet 5 run comes back to roughly $0.36. The rest of this article shows where the numbers come from and which levers move them.

Where the tokens come from

An MCP client calls each server's tools/list at start-up and converts the result into the model vendor's tool format. Each tool becomes a name, a description and a JSON schema for its arguments. That block is sent with every model call, whether the model uses the tool or not, because the model cannot call what it cannot see.

Two things make this expensive rather than merely untidy. First, the schemas are verbose: a database server that documents every column, or a browser server with twenty navigation actions, can be several thousand tokens on its own. Second, an agent loop re-sends the whole context on every step, so the schema cost is paid once per step, not once per run. The mechanics of that re-send are covered in [how much an AI agent costs to run](/guides/how-much-does-an-ai-agent-cost-to-run).

Measure a server before you connect it

Do not estimate. Ask the vendor's token counter for the request with and without the tool list; the difference is the schema overhead for that server. This TypeScript snippet pulls a server's tools over MCP, converts them to Anthropic's tool shape and prices the overhead per step on Claude Sonnet 5:

import Anthropic from "@anthropic-ai/sdk";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";

const anthropic = new Anthropic();

export async function toolListCost(mcp: Client, system: string) {
  const { tools } = await mcp.listTools();
  const anthropicTools: Anthropic.Tool[] = tools.map((t) => ({
    name: t.name,
    description: t.description ?? "",
    input_schema: t.inputSchema as Anthropic.Tool["input_schema"],
  }));
  const probe = [{ role: "user" as const, content: "ping" }];
  const withTools = await anthropic.messages.countTokens({
    model: "claude-sonnet-5", system, tools: anthropicTools, messages: probe,
  });
  const noTools = await anthropic.messages.countTokens({
    model: "claude-sonnet-5", system, messages: probe,
  });
  const schemaTokens = withTools.input_tokens - noTools.input_tokens;
  // Sonnet 5: $2 per 1M uncached, roughly $0.20 per 1M as a cache read
  const perStepUSD = (schemaTokens * 2) / 1_000_000;
  return { schemaTokens, perStepUSD, perStepCachedUSD: perStepUSD / 10 };
}

Run it once per server and keep the numbers in the agent's config. A server that costs 6,000 tokens per step and is called on 2% of runs is a strong candidate for removal.

Tool results are the second bill

Schemas are the fixed cost. Tool results are the variable one, and they are often larger. A file read, a web page or a SQL result can be 5,000 to 20,000 tokens. Once a result enters the conversation, every later step re-sends it.

Take the reference trace (1,500-token results) and replace four of the twelve results with 15,000-token SQL dumps at steps 2, 4, 6 and 8. Each dump adds 13,500 tokens over the baseline and is re-sent on every subsequent step: 10 + 8 + 6 + 4 = 28 re-sends, plus the four original sends, 32 in total. That is 13,500 × 32 = 432,000 extra input tokens, or about $0.86 on Sonnet 5 at $2 per million, for four queries that could have returned a row count and the first twenty rows.

How it multiplies across a run

The reference run is a 4,000-token prefix (1,500 system, 2,500 of hand-written tools), a 500-token task, and twelve steps that each add a 300-token tool call and a 1,500-token result. Uncached input across the run is 172,800 tokens; output is 4,800.

Swap the 2,500 tokens of hand-written tools for ten MCP servers at roughly 5,000 tokens each. The prefix becomes 52,000 tokens and step 12 alone sends 52,000 + 11 × 1,800 = 71,800 tokens. Input across the run is 12 × 52,000 + 118,800 = 742,800 tokens, 4.3 times the baseline for exactly the same work.

Model ($/1M in / out)Hand-written tools, 12 steps10 MCP servers, 12 steps10 servers, cached (reads ~10%)
Claude Sonnet 5 ($2 / $10)172,800 × $2 + 4,800 × $10 = $0.39742,800 × $2 + $0.048 = $1.5371,800 × $2.50 + 671,000 × $0.20 + $0.048 = $0.36
GPT-5.4 ($2.50 / $15)172,800 × $2.50 + 4,800 × $15 = $0.50742,800 × $2.50 + $0.072 = $1.9371,800 × $2.50 + 671,000 × $0.25 + $0.072 = $0.42
Gemini 3.8 Flash ($0.75 / $3.75)$0.15742,800 × $0.75 + $0.018 = $0.5871,800 × $0.75 + 671,000 × $0.19 + $0.018 = $0.20 plus cache storage
DeepSeek V4 Flash ($0.05 / $0.16)$0.009742,800 × $0.05 + $0.0008 = $0.04see the vendor page for its cache-hit rate

The cached column assumes 71,800 tokens written once (the prefix at step 1 plus each step's 1,800 new tokens) and 671,000 read from cache. The write premium is Anthropic's roughly 125%; OpenAI has none. Everything in that column follows the rules in [prompt caching for AI agents](/guides/prompt-caching-for-ai-agents).

Four ways to cut MCP overhead

  • Fewer servers per agent. Give each agent the two or three servers its task needs. Three servers instead of ten drops the prefix from 52,000 to 17,000 tokens and the uncached Sonnet 5 run from $1.53 to about $0.69 (322,800 × $2 + $0.048).
  • Tool filtering and lazy loading. The OpenAI Agents SDK and the Claude Agent SDK both accept an allow-list of tool names per MCP server, so a 25-tool server can present 4. Anthropic's API also offers a tool-search tool with defer_loading on the rest, so schemas are fetched into context only when the model searches for them. Either way the model never pays for a schema it will not call.
  • Truncate results at source. Cap every tool result at a few thousand tokens and return a hint such as total rows, a byte offset or a "call again with page=2". Four capped SQL results save the 432,000 tokens computed above.
  • Cache the prefix. Tool definitions render first and never change, so they are the easiest tokens in the request to cache. One breakpoint on the last tool on Anthropic, or simply a stable tool order on OpenAI, converts the schema cost into cache reads at roughly 10% of list.

Do all four. They multiply rather than add: three filtered servers with truncated results and a warm cache is a run where the MCP overhead is under a cent.

Cheapest model that still does this, and when to pay for the flagship

For an agent whose MCP tools are well specified and whose task is clear, DeepSeek V4 Flash ($0.05 / $0.16) runs the ten-server trace for about $0.04 and Gemini 3.8 Flash for about $0.58. In our experience both make correct structured tool calls when the schema is unambiguous. Compare the wider field in [cheapest LLM for AI agents](/guides/cheapest-llm-for-ai-agents) and the [model catalogue](/models).

Pay for Claude Sonnet 5 or GPT-5.4 when the agent must choose between many similar tools (ten servers often means several overlapping "search" and "read" tools) or recover from tool errors without a human. A cheap model that picks the wrong server and loops re-sends the 52,000-token prefix on every wasted step, and at that point the flagship is cheaper per completed task. Claude Opus 5 at $5 / $25 is rarely justified for tool plumbing; save it for the planning step, as described in [multi-agent system cost](/guides/multi-agent-system-cost).

How to cap spend

Large tool lists make runaway loops expensive faster, so the guardrails matter more, not less:

  • max_tokens on every call, sized for a tool call, not an essay
  • A step limit per run; a ten-server agent that has not finished in 20 steps is usually confused, not thorough
  • A stop condition the model can trigger explicitly
  • A per-run dollar cap computed from usage on each response, including cache read and write tokens, that aborts the loop when exceeded

The [token budget guardrails](/guides/ai-agent-token-budget-guardrails) article has the runner code. For per-vendor specifics on how tool definitions are billed, see [Claude agent API cost](/guides/claude-agent-api-cost), and use the [calculator](/calculator) to price your own server list once you have measured it.

Key Takeaways

  • MCP has no licence fee; the cost is tool schemas plus tool results, both billed as input tokens on every step
  • Estimate 3K to 8K tokens per server with ~25 tools; ten servers is roughly 50K tokens of prefix
  • Ten servers turn the 12-step reference run from $0.39 to $1.53 on Claude Sonnet 5 and from $0.50 to $1.93 on GPT-5.4
  • One 15K-token SQL result at step 2 is re-sent ten more times; four of them add roughly 432K input tokens to a run
  • Prompt caching brings the ten-server Sonnet 5 run back to about $0.36; fewer servers and result truncation stack on top
  • Filter tools per agent and truncate results at source; the model should never see a schema it will not call

Editorial context

Who is this for?

Teams wiring MCP servers into Claude, OpenAI or Gemini agents who have noticed the input token line growing faster than the work.

When NOT to use this

Desktop chat users adding one or two MCP servers to a subscription product; the overhead there is paid by the vendor, not by you.

Pricing insights

Ten MCP servers add roughly 50K tokens per step; on a 12-step run that is 570K extra input tokens, or about $1.14 on Claude Sonnet 5 before caching.

Alternatives to consider

A hand-written tool set of the six tools the agent actually uses, Anthropic tool search with deferred loading, or a router step on a cheap model that picks which servers to attach.

Final verdict

Connect the fewest servers that cover the task, filter their tool lists, truncate results, and cache the prefix. Do those four things and MCP overhead becomes a rounding error.

Frequently Asked Questions

Does MCP cost money?

The protocol and the reference SDKs are open source and free, and most MCP servers are free to run. What costs money is the tokens: every connected server's tool definitions are sent as input on every model call, and every tool result comes back into the context. You pay the model vendor for those tokens at the normal input rate.

How many tokens does an MCP server add to a request?

It depends entirely on the server. A server exposing around 25 tools with descriptive schemas lands at an estimated 3,000 to 8,000 tokens; a database server with rich column descriptions can be more. Measure it with the vendor token counter rather than guessing, because the number is re-sent on every step of the run.

Why does connecting more MCP servers make my agent slower and pricier?

Because the tool list is part of the prompt. Ten servers is roughly 50,000 tokens the model must read before it looks at your task, on every single step. That is more input than the task and all its tool results combined for a typical 12-step run, and it also increases time to first token.

Does prompt caching fix MCP overhead?

Mostly. Tool definitions render at the front of the prompt and do not change between steps, so they are ideal cache material. On Anthropic put a cache_control breakpoint on the last tool; on OpenAI the prefix caches automatically. Cache reads are roughly 10% of list, so the ten-server Sonnet 5 run drops from about $1.53 to about $0.36.

What is the cheapest model for an agent with many MCP tools?

DeepSeek V4 Flash at $0.05 per million input runs the ten-server, 12-step trace for under $0.04, and Gemini 3.8 Flash at $0.75 per million for about $0.58. Both handle well-specified tool calls reliably. Move to Claude Sonnet 5 or GPT-5.4 when the agent must choose between many similar tools or recover from errors.

Should I truncate MCP tool results?

Yes, at the server or in the client before the result enters the context. A file read or SQL result can be 5,000 to 20,000 tokens and every later step re-sends it. Cap results at a few thousand tokens and return a hint such as row counts or an offset so the model can request more only when it needs to.

Related

Free courses · no sign-up

Still deciding? Learn the basics first, then come back to the prices.

If our calculators helped you cut down on hidden AI wallet leaks, thanks for using them. A tiny fraction of your savings is what keeps our pricing indexes updated daily.

Not sure which AI is cheapest for your use case? Find out in 30 seconds — no signup required.

AI cost intelligence

Stop overpaying for AI tools

Join the OverpayingForAI list for pricing updates, cheaper alternatives, and practical buying guidance.

Now tracking 50+ AI tools, models, platforms, subscriptions, coding tools, and automation products.

We use your email only for OverpayingForAI updates. Unsubscribe anytime.