100 MCP Tools Overwhelming Claude and Cursor? A Three-Layer Gateway Fix

MCP tool overload causes Cursor to silently drop tools and waste tokens; a three-layer gateway balances performance and security.
The article explains that connecting too many MCP tools to Claude or Cursor causes two serious problems: Cursor silently drops tools after roughly 40 and 100 tool schemas burn about 77,000 tokens before any user input; separately, hardcoded admin keys and missing schema validation let prompt injection hijack MCP servers and leak tokens. It presents a three-layer gateway: 3 dynamic search tools replacing 100 static schemas (~85% token savings), enforced OAuth 2.1 user-scoped tokens, and cryptographic schema hashing to block tool poisoning.
Connecting 100 MCP tools to Claude or Cursor can very likely crash the system outright. Cursor begins silently dropping tools after roughly 40, and before you even type your first greeting, 77,000 tokens have already been consumed. More dangerously, a poor security configuration can let a single prompt hidden inside a support ticket hijack the MCP server and leak private tokens. Production teams have already begun deploying three-layer MCP gateways to solve these problems.

Tool Overload: Cursor's Silent Dropping and the 77,000-Token Waste
MCP (Model Context Protocol) lets large models call external tools, but once the number of tools balloons, problems arise. According to the video, Cursor quietly drops excess tools after the tool count exceeds 40, without giving any error indication. This means you may believe all 100 tools you connected are available, when in reality only the first 40 are in effect.
An even more insidious cost is token consumption. Every MCP tool carries a complete schema description, and these schemas are fed into the model as part of the context. The video points out that before the user types anything, 77,000 tokens have already been consumed by these tool definitions. This not only wastes money but can also crowd out an already limited context window, causing genuinely important conversation content to be truncated or ignored.
For teams relying on multiple tools to complete complex tasks, uncontrolled growth in tool count directly degrades the system's reliability and cost-efficiency.
MCP (Model Context Protocol) is an open protocol proposed by Anthropic in late 2024, intended to provide LLM applications with a standardized way to connect external data sources and tools. It uses a client-server architecture: a host application (such as Cursor or Claude Desktop) acts as the MCP client, connecting to individual MCP servers, each of which exposes a number of tools, resources, and prompts. Tools describe their name, purpose, and parameter structure in the form of JSON Schema, and the model uses these descriptions to decide when to call them and how to pass arguments. Because of this, every tool definition must reside in full within the model context, and the more tools there are, the larger the fixed token overhead—this is precisely the protocol-level root cause of the tool overload problem.
Security Blind Spots: How a Prompt Hidden in a Ticket Hijacks an MCP Server
Beyond performance issues, the way MCP is configured has also planted security risks. The video mentions that people still paste raw administrator keys directly into local JSON files—a major mistake.
A real attack scenario is this: an attacker hides a malicious prompt inside a support ticket. When Cursor's MCP server processes that ticket, the prompt is triggered, which then hijacks the server and leaks private tokens. This attack exploits the MCP server's trust in tool invocation and the lack of validation on tool descriptions and input sources.

The root of the problem lies in two things: first, excessive privileges—using an administrator key rather than a user-level token; second, the absence of integrity protection for tool schemas, allowing attackers to tamper with tool descriptions or inject malicious instructions.
Prompt injection is a class of attack against LLM applications: the attacker embeds malicious instructions in content the model will read (such as web pages, documents, tickets, or tool return values), inducing the model to deviate from its intended task and perform operations the attacker wants. In the MCP context, the risk is amplified further—the model can not only "say" but also "do." Once injected instructions cause the model to invoke a tool with write permissions or network access, the attacker may use it to read local files, send requests, or leak tokens from environment variables. Similar to XSS in traditional web security, the essence of prompt injection is "data being executed as instructions," and the MCP server's trust in tool invocation along with the lack of source validation makes it a high-value attack surface.
The Three-Layer Gateway Fix: Systematic Governance from Performance to Security
The production teams mentioned in the video adopt a three-layer MCP gateway to address the above challenges.
Layer One: Replace 100 Static Schemas with 3 Dynamic Search Tools
The most direct optimization is to reduce the number of tool schemas exposed to the model. Specifically, instead of stuffing the complete definitions of 100 tools into the model, provide 3 dynamic search tools that retrieve and invoke the tools actually needed based on user intent.
The video claims this approach can cut token consumption by 85%. The idea is similar to using retrieval-augmented generation (RAG) instead of injecting all knowledge at once: locate the relevant tools first, then load their schemas, rather than loading all tools up front.

Layer Two: Enforce OAuth 2.1 and User-Level Tokens
On the security side, the gateway should enforce OAuth 2.1 and use user-scoped tokens rather than administrator keys. This way, even if a tool or server is compromised, the attacker's access is confined to that user's scope and cannot move laterally or gain global control.
The video emphasizes "never use administrator keys," which both embodies the principle of least privilege and reduces the blast radius after a token leak.
OAuth 2.1 is a draft revision of the OAuth 2.0 specification that consolidates security best practices accumulated over the years: mandatory use of PKCE (Proof Key for Code Exchange) to prevent authorization code interception, prohibition of the implicit grant flow, a requirement for exact redirect URI matching, and explicit minimum privileges and short lifetimes for tokens. Adopting OAuth 2.1 in the MCP context means each user obtains an access token representing only their own privileges through a standard authorization flow, rather than sharing an administrator key. User-scoped tokens confine the privilege boundary to a single user, and together with token rotation and revocation mechanisms, they can significantly shrink the impact of credential leaks—a concrete implementation of zero-trust architecture across the tool invocation chain.
Layer Three: Pin Tool Schemas with Cryptographic Hashes to Prevent Tool Poisoning
Tool poisoning refers to an attacker tampering with a tool's description or parameter definitions to induce the model to perform unintended operations. The countermeasure proposed in the video is to pin a cryptographic hash for each tool schema. The gateway verifies the hash when loading a tool, and any unauthorized schema change is detected and rejected.

This layer of protection ensures that the tool definitions the model invokes exactly match expectations, blocking the path of injecting malicious instructions by modifying schemas.
A cryptographic hash (such as SHA-256) maps input of any length to a fixed-length digest and is collision-resistant and one-way: any tiny change to the input produces a completely different digest, and the original cannot be recovered from the digest. By pre-pinning and storing the hash of a tool schema, the gateway can recompute and compare it each time a tool is loaded, thereby detecting any unauthorized schema tampering. This mechanism resembles integrity verification in the software supply chain (such as Subresource Integrity, SRI, and package signing), turning "trusting tool definitions" from a default assumption into a verifiable fact. In practice, one must also consider where hashes are stored and the update process, to ensure attackers cannot simultaneously tamper with both the schema and the hash baseline.
Implementation Advice and Trade-offs
The three-layer gateway covers three dimensions—performance, permissions, and integrity—but a few points still warrant attention during implementation. The dynamic search tools themselves need careful design to ensure retrieval accuracy; otherwise they may introduce new failure modes. Introducing OAuth 2.1 increases configuration complexity and requires integration with existing identity systems. Schema hash verification requires timely hash updates whenever tool definitions change, which places certain demands on the development workflow.
For personal projects with a small number of tools, the first two layers may be sufficient; for enterprise scenarios with many tools and sensitive data, all three layers are indispensable. The "zero bloat, zero silent leaks" mentioned in the video is an ideal goal, and real-world implementation needs to proceed gradually according to each team's situation.
One-line Summary
MCP tool overload causes Cursor to silently drop tools and waste tokens; a three-layer gateway balances performance and security.
Paragraph Summary
The article points out that connecting large numbers of MCP tools to Claude or Cursor triggers two serious problems: on performance, Cursor silently drops excess tools after roughly 40, and the schemas of 100 tools consume about 77,000 tokens before the user even types anything; on security, hardcoded administrator keys and the lack of schema validation let prompt injection hijack MCP servers and leak tokens. The three-layer MCP gateway proposed by production teams addresses each: replacing 100 static schemas with 3 dynamic search tools, cutting token consumption by about 85%; enforcing OAuth 2.1 user-scoped tokens to minimize privileges; and pinning tool schemas with cryptographic hashes to block tool poisoning. The article concludes by discussing implementation trade-offs and applicable scenarios.
Related articles

WorkBuddy + AI Agent: A Zero-Basics Hands-On Tutorial for Building Intelligent Agents
A popular Bilibili tutorial explains how to build a WorkBuddy + AI Agent from scratch, covering installation, Skill customization, and an e-commerce workbench, with a blue book and 12 common Skills for beginners.

Five-Layer Breakdown of Multi-Tenant Isolation for AI Agents (Interview Guide)
High-frequency interview breakdown of AI Agent multi-tenant isolation: five boundary layers—identity, data, tools, runtime, and resources—to handle follow-ups and avoid the Tenant-ID-only pitfall.

AI Agent in Practice: A Complete Guide to Muse and Grok Bot for Office Work
A Bilibili hands-on course breaks down how to use Muse and Grok Bot: connect domestic model APIs via CC Switch to skip account login, use cloud Bots to organize photos, publish docs, and check email on a schedule, with real-world tests of multi-Bot collaboration and scheduled-task delays.