Organizations: Yonsei University · Division of Language and AI, Hankuk University of Foreign Studies (HUFS) · Department of Data Science, Ewha Womans University
Tool-using LLM agents increasingly coordinate real workloads by selecting and chaining third-party tools based on text-visible metadata such as tool names, descriptions, and return messages. We show that this convenience creates a supply-chain attack surface: a malicious MCP tool server can be co-registered alongside normal tools and induce overthinking loops, where individually trivial or plausible tool calls compose into cyclic trajectories that inflate end-to-end tokens and latency without any single step looking abnormal. We formalize this as a structural overthinking attack, distinguishable from token-level verbosity, and implement 14 malicious tools across three servers that trigger repetition, forced refinement, and distraction. Across heterogeneous registries and multiple tool-capable models, the attack causes severe resource amplification (up to 142.4× tokens) and can degrade task outcomes. Finally, we find that decoding-time concision controls do not reliably prevent loop induction, suggesting defenses should reason about tool-call structure rather than tokens alone.
Figures & tables
Figure 1: Token usage explosion under MCP-induced overthinking attacks in Qwen-Code settings. Total tokens (log scale, in millions) for five models with and without the attack; red bars ( mixed ) show attacked runs, and gray bars ( normal ) show the no-attack baseline. The attack amplifies token consumption up to 142.4× .
Figure 2: Overview of the MCP-driven overthinking attack surface. Malicious tools hidden within a mixed registry exploit standard MCP interfaces to lure agents into crafted cyclic loops. Unlike normal operations ( gray path), this attack path ( red path) forces excessive, redundant reasoning steps, leading to severe denial-of-service through exponential token consumption and latency amplification.
Figure 3: Accuracy and token consumption in ReAct settings.
Model
normal
mixed
Tokens
Time (s)
Tokens
Time (s)
Kimi-K2-Thinking
31.6K
176
343.9K
( 10.9× )
449
( 2.6× )
MiniMax-M2
45.9K
82
6.5M
( 142.4× )
2260
( 27.5× )
Qwen3-Coder
127.5K
77
2.9M
( 22.4× )
727
( 9.5× )
DeepSeek-V3.2
273.5K
222
1.5M
( 5.5× )
1580
( 7.1× )
GLM-4.6
334.3K
89
33.8M
( 101.3× )
925
( 10.4× )
Table 1: Average token consumption and runtime in Qwen-Code settings. Parentheses report the × -factor relative to normal (i.e., mixed / normal ).
AIME2025
GPQA Diamond
HumanEval
Model
Tool Registry
Accuracy
Tokens
Accuracy
Tokens
Accuracy
Tokens
Normal
73.33% (-)
3,838,910 (-)
30.96% (-)
5,789,388 (-)
14.02% (-)
9,513,903 (-)
Kimi-K2-Thinking
Mixed
56.67% (0.77 × )
4,904,131 (1.28 × )
26.90% (0.87 × )
11,965,963 (2.07 × )
16.46% (1.17 × )
19,474,670 (2.05 × )
Normal
73.33% (-)
2,375,798 (-)
55.84% (-)
8,076,783 (-)
72.56% (-)
7,510,249 (-)
MiniMax-M2
Mixed
73.33% (1.00 × )
8,111,917 (3.41 × )
55.33% (0.99 × )
65,423,352 (8.10 × )
62.80% (0.87 × )
53,728,320 (7.15 × )
Normal
66.67% (-)
688,009 (-)
71.07% (-)
6,466,715 (-)
47.56% (-)
5,047,058 (-)
Table 2: Accuracy and token consumption in ReAct -based agent settings with NoWait enabled. Parentheses report the × -factor relative to normal . Token columns are shaded by amplification level: low (1–3 × ), medium (3–7 × ), high (7 × +).
Figure 4: Token amplification (vs. normal baseline) in attack -only and mixed registry settings. Each model shows three dataset pairs (AIME2025, GPQA Diamond, HumanEval). Solid bars denote attack -only, hatched bars denote mixed .
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Category
Tool Name
Description
Arguments
Returns
echo_verification
Forces large-scale marker repetition and recursively demands re-invocation to inflate token usage.
Table 4: Accuracy and token consumption in ReAct -based agent settings. Results are reported under normal and mixed tool registry compositions for AIME2025, GPQA Diamond, and HumanEval. Parentheses report the × -factor relative to normal .
normal
mixed
Model
Problem ID
Tokens
Time (s)
Tokens
Time (s)
1981c
77,580
209
405,100 (5.22 × )
610 (2.92 × )
2008b
22,258
152
283,742 (12.75 × )
694 (4.57 × )
1982e
41,452
388
338,932 (8.18 × )
489 (1.26 × )
2033f
21,131
140
502,473 (23.78 × )
404 (2.89 × )
1996e
24,955
190
278,376 (11.16 × )
429 (2.26 × )
Appendix
Table 5: Per-problem token consumption and runtime in Qwen-Code settings. Parentheses report the × -factor relative to normal .
Model
Provider
Key Restrictions for Research
Source (Access Date)
GPT-4o
OpenAI
Prohibition on using output to develop competing models
Link (2026-02-08)
Claude 3.5
Anthropic
Prohibition on automated data scraping and extraction
Link (2026-02-08)
Gemini
Google
Regional availability and specific API usage quotas
Link (2026-02-08)
Appendix
Table 6: Summary of proprietary model terms and conditions. Each link provides the official documentation used to determine experimental constraints.
The Model Context Protocol (MCP) has become a common interface for connecting large language model (LLM) agents to external tools, but its reliance on stateless, eager schema injection imposes a hidden per-turn overhead the MCP Tax or Tools Tax that practitioner reports place between roughly 10k and 60k tokens in typical multi-server deployments. This payload inflates the key-value cache, is associated with reasoning degradation as context utilization approaches published fracture points around 70%, and turns token budgets into a recurring operational cost. We introduce Tool Attention, a middleware-layer mechanism that generalizes the "Attention Is All You Need" paradigm from self-attention over tokens to gated attention over tools. Tool Attention combines (i) an Intent Schema Overlap (ISO) score from sentence embeddings, (ii) a state-aware gating function enforcing preconditions and access scopes, and (iii) a two-phase lazy schema loader that keeps a compact summary pool in context and promotes full JSON schemas only for top-k gated tools. We evaluate on a simulated 120-tool, six-server benchmark whose per-server token counts are calibrated to public audits of real MCP deployments. In this simulation, Tool Attention directly reduces measured per-turn tool tokens by 95.0% (47.3k -> 2.4k) and raises effective context utilization (a token-ratio quantity) from 24% to 91%. End-to-end figures for task success, latency, cost, and reasoning quality are reported as projections derived from the measured token counts combined with published deployment telemetry; they are not measured on live LLM agents, and we mark projected values explicitly throughout. Taken together, the results support a simple thesis: protocol-level efficiency, not raw context length, is a binding constraint on scalable gentic systems. The code for this work is accessible at https://github.com/asadani/tool-attention
Tool-augmented LLM agents commonly rely on step-wise atomic tool calls, where each invocation, observation, and value transfer is exposed in the main reasoning trace. This creates an execution-granularity mismatch: locally deterministic tool workflows are unfolded into repeated model-visible decisions, consuming context and forcing the model to manage low-level dataflow in the trace. We introduce HyperTool, a unified executable MCP-style tool interface that changes the model-visible unit of tool execution. A model invokes HyperTool with a code block that can call existing tools through their original schemas, manipulate returned values, and pass intermediate results locally, folding deterministic tool subroutines into a single outer call. To train models to use this interface, we synthesize HyperTool-format trajectories from cross-tool compositional tasks and verify them in real MCP environments. On MCP-Universe, HyperTool improves average accuracy from 15.69% to 35.29% on Qwen3-32B and from 9.93% to 33.33% on Qwen3-8B, and surpass GPT-OSS and Kimi-k2.5 on average accuracy, showing that our HyperTool can substantially improve multi-step tool use.
Yaxin Du, Yifan Zhou, Yujie Ge +7
Shanghai Jiao Tong University · IQuest Research · Beijing University of Aeronautics and Astronautics
Agents using the Model Context Protocol (MCP) rely on semantic matching to select tools from third-party servers, exposing a semantic supply-chain risk through attacker-controlled metadata and outputs. We introduce A2M (Attraction-to-Manipulation), a two-stage black-box framework for hijacking MCP agents. The Attraction phase optimizes tool metadata to increase invocation probability; the Manipulation phase uses execution traces to refine adversarial tool returns that steer agents toward attacker-desired outcomes. On LiveMCPBench, direct attacks optimized and evaluated on GLM-4.6 achieve a macro-average malicious tool invocation rate of 93.6% across four scenarios, increase weighted token costs to 32.4× the benign baseline under Cognitive Denial of Service, and attain a mean attack success rate of 74.4% across Information Exfiltration, Environment Integrity Compromise, and Reasoning Derailment. Transfer to four other models without re-optimization yields corresponding macro-averages of 63.6%, 2.7×, and 24.5%. These findings motivate stronger tool vetting and runtime isolation in MCP ecosystems. Code is publicly available at https://github.com/Lilaizhen/A2M.
Laizhen Li, Xuan Wang, Peicheng Zhao +4
Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences · University of Chinese Academy of Sciences · Nanyang Technological University +3