Ratel Dramatically Cuts MCP Tool Context Usage
Key point
The open-source tool Ratel uses the BM25 algorithm to dramatically reduce MCP tool context usage in Claude Code.
Details
The open-source tool Ratel has introduced a way to solve the context waste caused by tool definitions in Claude Code's MCP (Model Context Protocol) environment.
With the existing approach, when using multiple MCP servers and tools, about 38,000 tokens were consumed per turn just for tool definitions, immediately saturating the context window.
Key features of Ratel:
- BM25-based tool selection: Instead of including all tool definitions in the context, it uses BM25 (keyword search) to extract, in real time, only the top 5 tools most relevant to the user's query.
- Low-cost, high-efficiency structure: It adopts a deterministic keyword search method without using an LLM, embedding API, or vector DB, making it free and extremely fast.
- Easy installation: With a single
ratel mcp importcommand, existing Claude Code MCP settings can be migrated instantly, along with a backup.
This technology maximizes the efficiency of tool calls without complex semantic embeddings, dramatically lowering the context cost and latency of agent workflows.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.