Blog / How agents load MCP tools
OpenCode 1 vs OpenCode 2: from a 63k-token tool preload to a 16-tool catalog
OpenCode is the open-source agent app many teams pick when they want their own model. Its two major versions load MCP tools in opposite ways. If your users run it, that decides most of what your server costs them.
OpenCode 1: everything, every time
We captured the first request OpenCode 1.18.34 sends to its model with a 99-tool production MCP server attached, both live and with a recorded copy of the tool list. Both gave the same result.
OpenCode 1 sends the definitions again with every model request, not just the first. In 40 live runs it averaged 3.7 requests per question, so about 230k tokens of tool definitions per question (3.7 × 63,245, an estimate).
- Average input per question: 341,615 tokens by OpenCode's own usage figures, about 1.6× Codex or Claude Code on the same jobs.
- Largest single request: 131,714 tokens, 13% of its model's 1M limit. Big, but it fit.
- Answers: 39/40 correct (87–100%). Preloading cost tokens, not accuracy.
See what your MCP server costs in OpenCode.
We run your users' jobs in OpenCode, Claude Code, Codex and Grok Build, and show what each loads and pays for.
OpenCode 2: a partial catalog plus search
OpenCode 2.0.31 hides MCP tools behind one code-running tool. In 2 live read-only runs in the interactive app, the model saw:
- server (99 tools, 16 shown)
The catalog is partial. ... search() ...
- 16 of the 99 tools with one-line descriptions, 881 tokens; the first request was about 5,270 tokens.
- The model called
search()from code to find the others. Both answers were correct (2/2, 34–100%). - Headless
runmode never showed the MCP tools to the model in our tests; we didn't confirm why.
With a catalog, what the model sees first is a short description line, so the first words of each description decide a lot. See put the meaning in the first line.
Result cut-offs in both
Both versions keep the first 2,000 lines or 51,200 bytes of a result and save the full output to a file. In OpenCode 1, 29 of 33 large list results were cut. In OpenCode 2 one job hit the cap twice (14,098 and 16,343 tokens kept), then the model grepped and read the saved file over 4 steps and answered correctly. More: output limits by agent.
Sidebar: Grok Build
- First request: 28 built-in tools, 19,674 tokens. No MCP tools on the wire.
- A reminder after the user's message lists connected servers and tool counts, and says to call
search_toolbeforeuse_tool. search_toolruns BM25 on the client, default limit 5.- A project-scoped server didn't start in an untrusted folder, and headless mode gave no warning.
What it means for your server
- For OpenCode 1 users, every tool you add is resent on every request. Trim definitions and split rarely used tools. See how many MCP tools is too many.
- For OpenCode 2 and Grok Build, names and first lines decide discovery. See name tools the way users talk.
- For both OpenCode versions, keep results under 51,200 bytes or page them.
Context in general: MCP context window usage. Back to how agents load MCP tools.
Go deeper: Claude Code tool search, seen from the wire, How Codex finds MCP tools, MCP tool-list token calculator.
How we measured
- OpenCode 1.18.34: first-request captures (live and recorded list), 40 live read-only runs on 16 Oct 2026 with its owner's default model; tokens by o200k_base for definitions, OpenCode's own usage for totals.
- OpenCode 2.0.31: 2 live runs driven through the interactive app, 16 Oct 2026. Very small sample.
- Caps: read from the shipped binaries; cut-offs counted in transcripts.
- Grok Build 1.0.60: one captured task against a 99-tool stub.
- Limits: versions change fast; one server; ranges are 95% Wilson intervals.
FAQ
Does OpenCode load all MCP tools into context?
OpenCode 1.x does: in our capture, all 99 tools (63,245 tokens) went into every model request. OpenCode 2.0 doesn't by default: it showed a catalog of 16 of the 99 tools and let the model search for the rest.
Which OpenCode version do users have?
In our tests OpenCode's standard installer still installed version 1; version 2 was a separate opt-in release.
How does OpenCode 2 choose which tools to show?
Its catalog said it was partial. The 16 shown appeared to be those with the cheapest schemas; the model used search() from code to find others.
What does OpenCode do with large tool results?
Both versions keep the first 2,000 lines or 51,200 bytes and save the full output to a file the model can read. In OpenCode 1, 29 of 33 large list results were cut.
How does Grok Build load MCP tools?
It sends none up front. A reminder lists connected servers and tool counts; the model calls search_tool (client-side BM25, default limit 5) and then use_tool.
See what your MCP server costs in OpenCode.
We run your users' jobs in OpenCode, Claude Code, Codex and Grok Build, and show what each loads and pays for.