How many tokens does an MCP server cost, and how to cut it
By Jake Marsh, who builds Taskhold. Updated 2026-11-05. Facts about other tools checked 2026-11-05. 4 min read.
Short answer: Ask the server for tools/list and divide the JSON's length by four for an estimate, or paste it into Taskhold's free MCP token counter. Input schemas and long descriptions make up most of it, and the easiest cut is repeated boilerplate such as the regex zod's .uuid() writes into every id field. Removing that regex took Taskhold's own list from about 8,000 tokens to about 7,200 without changing a description.
An MCP server's tool names, descriptions and input schemas are text the model has to read. Connect a few servers and that text can take a real share of the context window before the agent does any work. This guide covers how to measure it, when the cost applies in Claude Code, and what to trim first, with the numbers from our own server.
The MCP token counter does the measuring in your browser. Taskhold itself is a task list that agents report into over MCP, with a live board for the person watching, so we pay this cost too. To see that board, open the live board demo.
Measure the tool list
A remote server answers tools/list over plain HTTP. Add an Authorization header if it needs a key. A server that insists on a session needs an initialize call first:
curl -s https://example.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Four characters a token is an estimate. Each model has its own tokenizer and each client wraps tools its own way, so use the number to compare servers and track changes. In Claude Code, /context shows what is using your context window.
When the cost applies
Claude Code defers tool definitions by default through tool search: only tool names and server instructions load at session start, and Claude pulls in a tool's full definition when it looks that tool up. Tools load upfront when tool search is off or the deployment doesn't support it. Claude Code also cuts a description loaded upfront at 4,096 characters, so put what matters first.
Other clients handle this differently, so check the docs for yours. Your own server's size still matters under deferral: every definition the agent does load counts, and a client without deferral loads them all.
What to trim first
- Repeated regexes. zod's .uuid() writes a long pattern into every id field. Check the id with a custom validator instead and keep format: "uuid" in the schema.
- Integer bounds of 9007199254740991. Schema libraries add these safe-integer limits to integers, and they tell the model nothing. Set a real maximum or drop them.
- $schema on every tool, if your SDK lets you strip it.
- Descriptions that explain what the name already says. Keep what changes which tool the model picks and how it calls it.
- Tools with many input fields. Split them, or drop fields people rarely use.
Rules of thumb we use are about 5,000 tokens a server, 800 a tool and eight input fields per tool. No client enforces those numbers.
What we found on our own server
Taskhold's server has 22 tools and measured about 8,000 tokens. All 20 id fields carried zod's 180-character regex. A custom check kept the same validation and error message, and the list dropped to about 7,200.
We're still over our own rule of thumb, on purpose for now: the remaining descriptions are what tell an agent how to report progress and how to ask you a question. A test in our build fails if the list grows, so the number can only go down. See how agents report into Taskhold for what those tools do.
See how far along your coding agents are.
$12/month or $120/year after the trial. Card up front. Cancel before day 7 and you pay nothing. Every agent you run is included.
Questions
- How many tokens does a typical MCP server use?
- Servers vary too much for one figure, so measure yours. Taskhold's 22 tools come to about 7,200 tokens, about 330 a tool, and its longest tool costs about 1,000.
- Does the MCP token counter send my tool list anywhere?
- No. The counting runs in your browser. The only request it makes is the optional example button, which asks Taskhold's own public MCP endpoint for its tool list.
- Do unused MCP tools still cost tokens?
- In a client that loads tools upfront, yes: the definitions are in context whether or not the agent calls them. With Claude Code's tool search on, only names and server instructions load until a tool is looked up.
Sources
- Claude Code docs: scale with MCP tool search, checked 2026-11-05
- MCP specification: tools, checked 2026-11-05
Related
Updated 2026-11-05. Something wrong or out of date? Email hello@greatwork.company.