tokenade
GitHubenfr
Install

MCP Servers: What They Are and What They Cost

An MCP server gives your AI agent tools it didn't ship with. What it costs you is mostly what those tools return — here's the mechanism and the maths.

Profile photo of Paul Irolla

By Paul Irolla

Founder · AI & developer tools · Tokenade

Ph.D. in AI · builds token-optimization tooling for AI agents

View author page
Updated 9 min read
Cite this page

What is an MCP server?

An MCP server is a program that exposes tools — functions an AI model can call — over the Model Context Protocol, so an agent can read your database, hit your API or drive a browser without anyone writing custom glue code for that specific pairing. It runs either as a local process on your machine or as a remote HTTP endpoint, and any MCP-speaking agent can connect to it.

The reason the protocol exists is combinatorial. Before it, every agent needed a bespoke integration with every tool: N agents times M tools, all written by hand and all breaking independently. MCP turns that into N + M — a server is written once and works with anything that speaks the protocol. That's a genuinely good piece of engineering, and it explains why the ecosystem grew as fast as it did.

I build token-reduction tooling, so my interest is narrower than most write-ups on this: what a server costs once it's connected. That part is almost never mentioned in the install instructions, and it's the part that shows up on your bill every month.

How does an MCP server actually work?

The agent connects to the server, asks what tools it offers, and the server replies with a manifest — a machine-readable list of every tool, its parameters and its description. The agent then decides how much of that manifest the model sees, and every tool call adds its result to the conversation.

The flow, in order:

  1. Connect. Over stdio for a local process, or HTTP for a remote endpoint. (SSE still works but HTTP is now the preferred remote transport.)
  2. Discover. The agent requests the tool list. The server returns schemas describing each tool.
  3. Advertise. The model has to be told a tool exists before it can call it. Early agents put every schema in the model's context window upfront. Modern agents defer tool loading by default: Claude Code's tool search, on for Claude 4.5 and later models, shows only tool names and loads a schema when the model reaches for it.
  4. Call. When the model decides a tool fits, it emits a call, the server executes it, and the result comes back into the conversation.

Step 4 is the one that matters financially now, and it's the one the quickstarts skip. The result isn't read once and forgotten — it's part of the history the model re-reads on every later turn, because each turn re-sends the whole context. One 8,000-token JSON response, twenty turns later, has been paid for twenty times (cheaper with prompt caching, never free).

Beyond tools, a server can also expose resources you reference directly (an @-mention pointing at a file, an issue, a schema) and prompts that surface as slash commands. Support varies — each server chooses what to implement — but resources in particular are worth knowing about, because pulling one specific thing is cheaper than describing a search.

What does an MCP server cost you?

Mostly what its tools return. A server costs you in two places: its tool definitions, and the results of the calls you make.

The definitions used to be the big one. When agents loaded every schema upfront, each connected server was re-sent on every turn whether you used it or not; GitHub's official server alone ships 20 toolsets and 56 read-only tools before the write ones. That problem has largely been fixed inside the agents. Claude Code defers MCP tool definitions by default through tool search, and other current agents defer tool loading too. It still applies behind third-party API proxies, for servers marked alwaysLoad, and in agents without tool search; lazy MCP loading covers those cases.

The results are the cost that remains. A GitHub issue listing comes back as pages of JSON with URLs, IDs and nested user objects. A browser snapshot can run to thousands of lines. A database query returns every row you asked for. All of it lands in context and stays in history. Here I have to be straight: almost no vendor publishes what any of this costs, and third-party estimates contradict each other by tens of thousands of tokens because they measured different versions under different conditions. I won't repeat them as facts.

So measure rather than guess. Two readings tell you nearly everything:

  • Context before you type. Open a fresh session and check what's already occupying the window. With deferred loading, MCP should be a small share; if it isn't, your setup loads tools upfront.
  • Context after a few calls. Use the server for a real task and look again. The jump is what its responses cost, usually the bigger number.

That takes two minutes and beats any figure I could quote you, because servers change between releases.

Are MCP servers worth it, then?

Often yes — but the honest answer is that it depends on the ratio between what a server saves you and what its responses cost you.

A server earns its place when it replaces work that would otherwise cost more. A database server that answers a schema question in one call beats an agent reading six migration files to infer the same thing. A browser server that fetches clean page content beats it pulling raw HTML. In both cases the response is repaid by tokens not spent elsewhere.

A server loses its place when its responses are bigger than the job needs. A tool that answers a yes-or-no question with 8,000 tokens of JSON costs you on that turn and on every turn after it, because the result stays in history.

Two habits help. Keep servers scoped to the project that needs them rather than installed globally, so the agent has fewer tools to choose from. And watch what your heaviest tools return, not just what they declare.

Can you keep the tools without paying for what they return?

Mostly, yes. The definition side is handled by deferred loading in current agents. The output side needs a layer between the agent and the server.

That's what Tokenade does, inside Claude Code, Cursor, Codex, Copilot and Windsurf. Its MCP proxy wraps your servers (tokenade mcp-wrap install, one command) and compacts what the tools return before it reaches the model: dedicated compactors for GitHub and GitLab, browser automation (Playwright, Puppeteer, Chrome), filesystem, Git, memory and databases (Postgres, SQLite, MySQL, Supabase, DuckDB), and a generic shape-aware compactor for every other server. Screenshots and images pass untouched, and the full result stays recoverable when the agent needs a detail. Compaction runs entirely on your own machine: nothing leaves it; the code is open for you to audit. tokenade dashboard shows what each tool saved.

How do you choose which servers to run?

Start from the task, not from the list. The ecosystem is large and most of it is irrelevant to any given project, so the useful question is "what does this repo need me to reach?" rather than "what's popular?".

A short heuristic that has held up for me:

  • Prefer few tools over many. A smaller surface means a smaller chance the model picks the wrong tool, and a smaller bill on agents that still load tools upfront.
  • Prefer resources over tools for read-only lookups. Referencing a specific resource pulls one thing; a tool call describes a search.
  • Prefer project scope. A server that follows you into every repository clutters the tool list in projects that never use it.
  • Prefer tools with narrow outputs. A tool that can filter, paginate or select fields returns less than one that dumps everything.
  • Re-audit after adding. Check /context right after connecting something and after its first real calls, while the before-and-after is still meaningful.

For the Claude Code–specific shortlist, the best MCP servers for Claude Code ranks them by value against their real cost, and Claude Code MCP setup covers the connection mechanics — scopes, .mcp.json, secrets and connection states.

What goes wrong (anti-patterns)

Installing servers globally by default. It's the convenient choice. Every project gets every tool you have ever connected, and the model has more to choose from for no reason.

Assuming every setup defers tool loading. A third-party API proxy, an alwaysLoad flag or an agent without tool search brings back upfront loading. Check once.

Trusting third-party size figures. They contradict each other because they measured different versions. Measure your own — it takes two minutes.

Ignoring what tools return. One unfiltered response can outweigh every schema you connected, and it stays in history for the rest of the session.

Treating a big context window as permission. A 1M-token window doesn't make tool output free; it just removes the forcing function that used to keep you tidy. You still pay for what you put in it.

Frequently asked questions

What is an MCP server in simple terms?

It's an adapter. On one side it speaks the Model Context Protocol, which any compatible AI agent understands; on the other it does something useful — queries a database, calls an API, controls a browser. Because the agent-facing side is standardised, one server works with every agent that speaks MCP, instead of needing a custom integration per pairing.

Do I need an MCP server to use an AI coding agent?

No. Agents work fine with their built-in abilities — reading files, running commands, editing code. MCP servers extend that reach to systems the agent can't otherwise touch. They're an addition with a token cost, not a prerequisite, and starting with none is a perfectly reasonable default.

Are MCP servers safe?

They run with whatever permissions you give them, so the honest framing is that an MCP server is code you're choosing to trust, like any dependency. Local servers run on your machine with your access; remote ones receive whatever you send them. Project-scoped configs are typically gated behind an approval prompt for exactly this reason — pulling a branch shouldn't silently wire a new server into your session.

Do MCP servers work with agents other than Claude?

Yes — that's the point of a shared protocol. A server written for one host generally works in another, though hosts differ in configuration format and in which optional parts of the spec they implement (resources and prompts especially), and in whether they defer tool definitions. The size of what tools return carries over unchanged, which is why reducing AI coding agent token usage is agent-agnostic advice.

How many MCP servers is too many?

There's no fixed number, because cost depends on what the servers return rather than how many there are. The practical test is whether you invoked each one recently. With deferred loading an idle server costs little, but it still crowds the tool list, and on setups that load tools upfront it's charged on every turn — disconnect it and reconnect when the need returns. Reconnecting takes seconds and loses nothing.

What's the difference between MCP tools, resources and prompts?

Tools are functions the model calls to do something. Resources are data it references directly, usually with an @-mention, to read something specific. Prompts are pre-written workflows the server exposes as slash commands. Tools always take some manifest space (at least their names, with deferred loading); resources and prompts are optional capabilities that not every server implements.


See also:

FAQ

Cut your AI agent's token bill.

Ranked #1 on the Token-Harness Optimizer Leaderboard. Zero config.

Tokenade cuts the token bill of AI agents: one install, zero config, and it trims what your agent sends to the model.