Notes on coding agents and the pages they leave behind, on moving between notes apps, and on the plain mechanics of keeping what you think. Written and published from a Sumibako vault.
What an MCP connector costs in Claude Code: the 429,388-token claude -p call, and the flags that cut it to 2,854
Why claude -p with --tools "" loaded 429,388 tokens of connector tools, how tool search defers them, and the flags that bring a call back to 2,854.
Prashant Shaw
Founder, Sumibako
6 min read
On 31 October somebody opened an issue against Claude Code with a number in the title that made me sit up, because I make one of the things it was about. Their script asks Claude for a decision a few times an hour with claude -p. A one-line health check, "reply DAY DESK OK", was costing 429,388 input tokens. Almost all of it, they found, was "MCP tool definitions from the claude.ai connectors on my account, loaded into every headless call even though the program never uses them."
The thread that followed is the best short course on what a connector costs that I have read, partly because the reporter got the cause wrong at first and corrected it in public. This post is that thread, Anthropic's documentation for the switches involved, and what it means if, like me, you build a connector other people add to Claude. Checked on 3 November 2026, and the issue again on 6 November.
๐งพ The numbers, as corrected
The reporter measured the same prompt with one switch added at a time, on a Claude subscription login, then re-ran it after a commenter pointed out what every row had in common: the script passed --tools "" on every call, because its calls use no tools. The corrected table, from the reporter's own follow-up:
plus --strict-mcp-config --mcp-config <one server>
3,326
H
ENABLE_CLAUDEAI_MCP_SERVERS=false instead
2,854
E
the reporter's lean setup
600
So the claude.ai connectors were nearly the whole bill, and keeping one small server of your own cost 472 tokens. On a different machine, a commenter measured plain claude -p at about 60,000 tokens, claude -p --tools "" at about 276,000, and the strict version at about 5,000. The exact figures depend on how many connectors your account has. The shape does not.
๐ Why fewer tools meant more tokens
Claude Code normally does not load your MCP tools at all. Anthropic's MCP page: "Tool search keeps MCP context usage low by deferring tool definitions until Claude needs them. Only tool names and server instructions load at session start, so adding more MCP servers has minimal impact on your context window." When Claude needs a tool, it searches for it with a built-in tool called ToolSearch and loads that one definition.
Now read the CLI reference for --tools: an empty list disables every built-in tool, and "The flag doesn't affect MCP tools". To remove those as well, the page points you at a separate --disallowedTools rule. ToolSearch is a built-in tool. So an empty --tools list removes the searcher and leaves the things it searches. The MCP page says what happens next, in a sentence the commenter quoted back to the reporter: if you deny ToolSearch or leave it out of --tools, "MCP tools load upfront instead."
That is the trap. An empty --tools list reads like "make this lighter". On an account with connectors, it makes every call carry every connector's full definition. The reporter's own summary, after three days of plan usage, is that it reads lighter, but "on a subscription login with connectors it costs hundreds of thousands of tokens per call."
The connectors arrive because you are signed in. In terminal, editor and Agent SDK sessions, per the MCP page, "Claude Code fetches them from claude.ai", so every connector you have added to your Claude account follows you into scripts you never meant to give them to.
๐NOTE
The obvious fix, --bare, skips MCP servers, CLAUDE.md and the rest of the auto-discovery. But the headless docs are explicit that "bare mode doesn't use your subscription login": it needs an API key. That is why this was a problem for subscription users in particular.
๐ธ Money and context are different losses
A commenter made the point I would have missed: "Cost and context are not the same loss." A block of tool definitions that never changes is a cacheable prefix, so on repeated calls the money lost is smaller than 429,388 suggests. What does not come back is the working space. Four hundred thousand tokens of fixed preamble leave less room for the actual job, and in a loop that runs for hours, running out of room is what triggers compaction, the slow and lossy part.
For a script that asks one question and exits, the loss is plan usage. For an agent that works all afternoon, it is attention. Either way you are paying for tools you never call.
๐งฐ What to do, in order of effort
1๏ธโฃ Do not pass --tools "" on an account with connectors unless you also do one of the next three. If you want some built-in tools, name them and keep ToolSearch in the list.
2๏ธโฃ Use --strict-mcp-config for calls that need no MCP at all. The CLI reference says it uses only the servers you pass with --mcp-config, "ignoring all other MCP configurations." With no --mcp-config, that means none. Row B: 2,854 tokens.
3๏ธโฃ Turn off just the claude.ai connectors with ENABLE_CLAUDEAI_MCP_SERVERS=false for one shell, or "disableClaudeAiConnectors": true in settings, and keep your own servers. Row H matched row B exactly.
4๏ธโฃ Allowlist the one server you need: --strict-mcp-config --mcp-config one-server.json. Row F: the baseline plus that server's definitions.
5๏ธโฃ Watch the number.--output-format json reports usage on every call. The reporter now checks input tokens against a ceiling and alerts on the first breach each day, so a Claude Code update that quietly adds something shows up that day. In an interactive session, /context shows the same thing broken down by category.
The reporter has since packaged the whole recipe as a small library, and the issue is still open, asking Anthropic for one documented lean mode that works with a subscription. Anthropic has not replied yet.
๐ What this means if you make a connector
I make one, so this part is a confession as much as advice. The most useful comment in the thread came from someone on the other side of the same problem: "every tool definition we ship is a tax on every one of our users' prompts, so the connector list has to be worth its tokens."
With tool search on, which is the default, that tax is small: a tool's name and the server's instructions. Anthropic's advice to server authors follows from it: "If you're building an MCP server, the server instructions field becomes more useful with tool search enabled." Instructions are what Claude reads to decide whether to look for your tools at all. With tool search off, whether by setting or by a --tools list that leaves ToolSearch out, every definition rides along on every request.
Sumibako, the notes app I build, has a connector with six tools: write, read, edit, search, publish and an account check. Claude can use it on every plan, Free included, through a custom connector. In a normal Claude Code session it costs you its names and a short paragraph of instructions until Claude actually needs your notes. In a script that strips ToolSearch, it costs all six definitions on every call, whether the script touches your notes or not, and so does every other connector you have added. If a script does not need your notes, give it --strict-mcp-config and let it forget they exist. I would rather lose a call than be the reason a health check costs four hundred thousand tokens. What a connector can do once it is loaded is a separate question, and an older post.
The issue's title asked for a lean mode. What it found is that Claude Code already had one, called tool search, and the quickest way to switch it off is to ask for less.