How many tools should an MCP server have? I measured 5 to 100 in Claude Code, Codex and Gemini
Description and use
All tested tool counts (5–100) achieved 100 % accuracy, but cost and context depend on how tools are loaded. Tool search in Claude Code reduces tokens with many tools but adds an extra call. Grouping tools saves cost only when all schemas are eagerly loaded.
Problem
Determining the optimal number of tools for an MCP server to balance accuracy, cost, and context across different LLM clients.
Outcome
Accuracy remained 100 % from 5 to 100 tools; cost differences were driven by tool loading strategy (search on/off, eager vs deferred) rather than tool count. Tool search in Claude Code reduced input tokens above ~19 tools but increased cost slightly due to an extra call. Grouping tools saved cost only when all schemas were eagerly loaded.
Workflow
- 1. Reviewed 91 MCP server design sources to gather existing recommendations.
- 2. Built a fake MCP server with 100 realistic file‑handling tools, including look‑alike and vague‑named variants.
- 3. Ran 18 tasks (10 ambiguous) across tool counts 5, 10, 20, 30, 50, 75, 100, each twice, with three clients.
- 4. Collected input token counts for first call and per run under different loading modes.
- 5. Analyzed accuracy, token cost, and impact of tool search, grouping, and naming.
- 6. Summarized findings and provided actionable guidance.
Evidence
Every run with separate tools was fully correct, from 5 to 100 tools, in all three clients and in both Claude Code modes.
Tool search is the switch that matters in Claude Code. It's on by default: only tool names go into the prompt, and the model loads the schemas it needs with one ToolSearch call.
With every schema loaded (Claude Code, search off), 7 grouped tools cost what 14 separate ones do, at 100% accuracy.
Names that misled most often: "3 JPGs into one PDF" led to combine_files, which actually merges PDFs; "shrink a PNG" led to optimize_image; and pptx and docx to PDF got mixed up between convert_file and convert_document.
- Record date: 2026-10-14T20:56:07.719Z