How many tokens does an MCP server cost, and how to cut it Taskhold measured the context-window cost of its own MCP server at roughly 8,000 tokens across 22 tools, and cut it to about 7,200 by replacing the 180-character regex that zod's .uuid() writes into all 20 id fields with a custom check that preserves the same validation and error message. The company published a browser-based MCP token counter and a guide recommending developers estimate cost by dividing the tools/list JSON length by four, noting Claude Code defers tool definitions via tool search by default and truncates upfront-loaded descriptions at 4,096 characters. Originally published at taskhold.com https://taskhold.com/guides/mcp-server-token-cost . 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 https://taskhold.com/tools/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 https://taskhold.com/demo/live . 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"}' Paste the response into the MCP token counter, or measure the JSON's length yourself and divide by four. 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. 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. 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. 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 https://taskhold.com/guides/monitor-coding-agent-progress for what those tools do. 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. 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. 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. Taskhold is a hosted task list shared by a person and their AI coding agents over MCP. Agents break tasks into steps and report progress, and the person watches a live board. $12/month or $120/year per person, 7-day trial with a card, no free plan. Made by Great Work LLC.