Anthropic Just Fixed MCP’s Biggest Problem
Quick Overview
Anthropic fixed a major context consumption issue in the Model-Client-Protocol (MCP) system by introducing 'Tool Search,' which dynamically loads only necessary tool definitions on demand, reducing context usage by up to 85% compared to preloading all tools.
Key Points: The primary problem solved was excessive context window usage caused by preloading too many MCP tool definitions, exemplified by the GitHub MCP consuming 46k tokens across 91 tools. The solution, 'MCP Tool Search,' allows Claude Code to dynamically load tools into context only when needed, resulting in an 85% token reduction for tool definitions. Tool Search operates via a 10% context threshold trigger, dynamically loading 3-5 relevant tools at once, rather than preloading all definitions. Server developers must add the 'advanced-tool-use-2025-11-20' beta header to enable this feature. Server instructions should guide Claude on tool execution order (e.g., check PR status before reviewing PR) to maintain correct workflows. Tool descriptions require optimization (short, function-leading, keyword-rich, constraints in input schema) to maximize search effectiveness. The implementation checklist involves 8 steps, including adding the search tool (Regex or BM25 variant), marking non-essential tools with 'deferloading: true', and monitoring context usage.
Context: The video addresses a significant scaling challenge within the Model-Client-Protocol (MCP) framework used for connecting large language models (like Claude) to external tools. As MCP servers accumulate more tools (up to 50+), the tool definitions consume a large portion of the model's limited context window, making complex tasks inefficient or impossible before any actual conversation begins. Anthropic introduced 'Tool Search' to mitigate this context pollution.
Detailed Analysis
The video details the introduction of 'MCP Tool Search' designed to solve the massive context consumption problem caused by preloading extensive tool definitions in the MCP framework. Initially, an example context usage screen shows that MCP tools can consume 89.1k tokens (44.6% of a 200k window) before any user interaction, which is problematic, especially for services like GitHub with 91 available tools. Tool Search addresses this by loading tool definitions dynamically (on-demand) instead of preloading everything. This dynamic loading is triggered when tool descriptions exceed a 10% context threshold, loading only 3-5 relevant tools at once, leading to an 85% token reduction in context usage for tool definitions. Implementation requires client developers to enable the beta header 'anthropic-beta: "advanced-tool-use-2025-11-20"' in API requests. Server developers must add the new search tool (either Regex-based for structured naming or BM25 for semantic search) to their tool list and mark non-essential tools with '"deferloading": true' to prevent immediate loading. Additionally, server instructions should be used to guide Claude on tool execution order (e.g., checking PR status before reviewing a PR). Best practices for tool descriptions include leading with function, keeping them 1-2 sentences, adding searchable keywords, and placing constraints in the 'inputschema' rather than the description, as every word costs tokens. The overall implementation involves an 8-step checklist culminating in monitoring context usage.