WorksComputer Science
Spoofing the Toolbox: Optimizing Tool Descriptions to Deceive LLM Agents
Abstract
Large language model (LLM) agents are widely used in many applications and often rely on external tools. Tool information, such as function descriptions, helps agents determine which tools best suit a given context. However, attackers can manipulate this information to mislead LLM agents into using malicious tools. Prior attacks mainly rely on keyword-based techniques, which are easily detected, or rule-based methods, which have limited effectiveness. In this work, we introduce TSA, a stealthy tool-spoofing attack that crafts descriptions for malicious tools that are difficult to distinguish from those of existing benign tools. To achieve this, we propose an LLM-powered optimization method that iteratively refines malicious tool descriptions. Specifically, TSA begins with a variant of a benign tool description and updates it based on feedback from a surrogate LLM agent. The optimization method incorporates a feedback function and contrastive in-context learning to guide the search for descriptions that are both stealthy and effective. Experiments on both single- and multi-tool use benchmarks demonstrate that TSA achieves an attack success rate of up to 92.13%, outperforming four state-of-the-art approaches while remaining highly stealthy. Our user study further shows that even human participants cannot distinguish descriptions generated by TSA from benign ones. Moreover, TSA remains effective against five tool-malware detectors.
Introduction
Model Context Protocol (MCP) is a widely used standard that enables LLM agents to access external tools through a unified interface [3, 15]. Its low integration barrier allows developers to easily publish tools as MCP servers and users to install them with minimal effort [29] (Chhetri et al. 2025). However, this openness also introduces security risks: attackers can distribute malicious MCP servers or update previously benign tools without explicit user notification, enabling stealthy attacks through tool descriptions or functionality changes [17, 45]. Additionally, because an LLM agent only observes a tool’s execution result through the returned message, it cannot verify what actually occurs during the invocation [17, 58]. This allows an attacker to implement a malicious tool that mimics the behavior of a benign tool while performing additional harmful actions. We refer to this attack paradigm as a tool spoofing attack. Figure 1 illustrates this attack scenario.
Figure 1. Illustration of a tool spoofing attack.
Existing attacks manipulate the descriptions associated with malicious tools so that LLM agents select them over benign alternatives for execution. They typically fall into two categories: framing the problem as a prompt-injection attack [8, 41], or focusing primarily on the stealthiness of the description [48]. Debenedetti et al. [8] show that simply appending an <IMPORTANT> tag to a tool
description can bias an LLM agent’s tool-selection behavior and trigger execution of injected malicious instructions. ToolHijacker [41] extends this method by leveraging an LLM to refine malicious tool descriptions. However, the descriptions generated by these approaches contain strong imperative phrases (e.g., “always choose this tool”) and are easily detected by existing MCP malware detectors. Moreover, many MCP clients require explicit user confirmation by presenting tool descriptions prior to tool invocation (see Figure 2), making such attacks readily observable to users.

Figure 2. Example of tool usage in Cline cli, where the user is prompted to confirm tool invocation and can inspect the tool description.
The second category of prior work aims to manipulate LLM tool selection without explicit prompt injection. Inspired by advertising techniques (e.g., authoritative phrasing), GAPMA [48] rephrases tool descriptions using persuasive language based on a set of predefined rules and refines them to improve stealthiness. While this approach can generate less conspicuous descriptions, it achieves very limited attack performance (e.g., <50% success rate), as it relies on a limited set of rules.
In the context of tool description generation, the discrete nature of textual inputs makes gradient-based approaches less effective at ensuring naturalness [59] (Zhang & Wei 2025). This challenge is further exacerbated by the fact that many LLM agents are deployed as API services with only query access. While white-box continuous optimization techniques are not directly applicable in this setting, their underlying design principles remain instructive, such as using gradient information to effectively guide optimization toward an optimal solution and employing powerful optimizers equipped with advanced mechanisms like learning-rate scheduling.
Motivated by these insights, we propose a stealthy tool spoofing attack, TSA, that incorporates an LLM-powered optimizer. Specifically, TSA defines a feedback function that explicitly captures two attack objectives: inducing malicious tool selection and preserving description naturalness. TSA leverages an LLM as the optimizer to mutate malicious descriptions, guided by fine-grained feedback provided by the LLM Agent. This optimizer is further enhanced with contrastive examples, where positive examples denote successful attacks and negative examples denote failures, enabling effective guidance during optimization. In addition, TSA incorporates several modular components, including a dynamic mutation adjustment mechanism to control mutation magnitude and a history-steered exploration strategy that leverages past generations when the optimization gets stuck.
We evaluate TSA on three datasets, MetaTool, MCP-Atlas, and TSABench, in both single- and multi-tool use scenarios, and show that it achieves an average attack success rate (ASR) of 83.23%, outperforming prior methods. The attack also transfers effectively to unseen LLM agents, reaching up to 92.13% ASR on GPT-5. Furthermore, we conduct a human evaluation and TSA is perceived as the least suspicious description, compared with the other malicious descriptions. We further evaluate stealthiness using multiple MCP malware detectors and observe a maximum detection rate of only 4.25%, whereas most baseline methods are detected with rates of up to 100%. Overall, our results demonstrate that TSA achieves high attack effectiveness while maintaining strong robustness and low detectability. We make the following contributions:
We formalize tool spoofing attacks as an optimization problem and propose an LLM-powered black-box optimization method that incorporates fine-grained feedback from a feedback function and effective guidance from contrastive demonstrations.
We introduce TSA, a tool spoofing attack built on our optimizer, which generates tool descriptions capable of inducing malicious tool selection while maintaining a high degree of stealth.
We conduct experiments on tools collected from real-world MCP servers and demonstrate the effectiveness of TSA across various types of LLM agents, including those that were never seen during optimization.
Related Work
Attacks on Tool Use. Attacks on LLM tool use fall into three categories. Prompt-injection attacks embed malicious instructions in tool descriptions to elicit unintended agent behavior: Debenedetti et al. [8] insert instructions within an <IMPORTANT> tag to bias tool selection and trigger harmful actions, while Fu et al. [11] and Li et al. [26] optimize injected instructions for higher effectiveness. Tool-spoofing attacks optimize descriptions to manipulate tool selection; existing LLM-based methods either achieve limited ASR (Wang et al. [48]) or are easily detected (Shi et al., [41]). Although AMA (Mo et al., [33]) also refines tool metadata through black-box LLM-driven search, it only considers if the agent selects the tool and does not leverage more fine-grained feedback as in TSA. TSA also introduces an advanced mutation strategy, which is discussed in § 4. Tool-poisoning attacks (TPA) instead target tool execution, constructing tools that appear benign at the interface but perform harmful actions when invoked (Wang et al., [47]); for example, He et al. [16] automatically generate such tools for red-teaming.
LLMs for Optimization. LLMs have been used as reward models in RL ([24, 44, 40]) and as black-box optimizers of discrete text, proposing candidates from scored trajectories (Yang et al., [51]), evolutionary operators ([13, 10]), or natural-language critiques ([35] (Yuksekgonul et al. 2024)); the same recipe drives LLM-based attacks ([31, 28, 6]).
MCP Security. MCP has attracted increasing attention from the security community. Several studies have identified vulnerabilities in MCP, highlighting its potential security risks ([17, 38, 15]). In parallel, benchmark suites have been proposed to systematically evaluate MCP security under different threat models ([54, 56]). On the defense side, multiple approaches have been developed to mitigate the risks introduced by MCP, including rule-based and learning-based detection frameworks ([49, 22] (Kryzhanouski 2025)). However, existing benchmarks and defense methods focus primarily on prompt-injection-style threats and overlook the characteristics of tool-spoofing attacks, leaving this attack surface largely unaddressed.
Threat Model
Attacker’s Goal. The attacker’s goal is to manipulate the MCP tool selection process such that an attacker-controlled tool is preferably selected for a target task, even in the presence of benign tools with similar or identical functionality. A target task can be described using different semantically equivalent user queries. For example, a database-related task may be expressed as “Retrieve all user records created this month” or “List users added in the past 30 days.” The attacker aims to ensure that, for any semantically similar user queries, the LLM agent selects the malicious tool instead of any benign alternative. Crucially, the attacker aims to make the malicious tool’s description indistinguishable from that of a benign tool with similar functionality.
Attacker’s Capabilities. We consider an adversary with no access to the target LLM agent, including its parameters, system prompt, tool-selection logic, query interface, user queries, or the exact set of tools available at runtime. The attacker knows the public MCP specification and common tool-usage patterns, and can collect public or representative benign tools to optimize against offline. Using a surrogate LLM agent and self-constructed semantically equivalent queries, the attacker can iteratively refine malicious tool descriptions so that they remain natural and difficult to distinguish from benign descriptions while increasing the likelihood of malicious tool selection. After optimization, the attacker publishes the resulting tool on open MCP platforms that accept third-party submissions, such as MCP Market [30], MCP Registry [34], and MCP Servers [39]. Once selected, the LLM agent generally cannot verify the tool’s side effects beyond the returned message, allowing the attacker-controlled implementation to perform hidden malicious actions.
Attack Design
Motivation. The attack goal is to find a tool description such that the tool selector (i.e., the LLM agent) chooses the malicious tool over any benign alternatives with similar functionality. This can be viewed as an optimization problem, where the optimization variable is the natural-language description and the objective is to maximize the likelihood that the malicious tool is selected across a set of user queries expressing the same task (e.g., adding a new user to a database).
Here, denotes a malicious tool description obtained by mutating an existing benign description via an attack function ; is an LLM-based tool selector; is a user query drawn from a query distribution corresponding to the same task; denotes the descriptions of the other available tools; measures the semantic difference between two pieces of text; and is a small non-negative threshold. For simplicity, we use tool descriptions to represent tools, as each tool is uniquely associated with a description.
Solving this problem is challenging for two reasons. First, the search space consists of discrete natural-language text, and the attacker only receives hard-label feedback from the LLM agent, i.e., which tool it selects, so gradient-based optimization is not applicable. Second, the objective (Equation (1)) and the stealthiness constraint (Equation (2)) involve a trade-off, and existing methods typically satisfy only one of them. Prompt-injection-based attacks, such as <IMPORTANT> ([8]) and ToolHijacker ([41]), insert explicit directives (e.g., an <IMPORTANT> tag or “Always choose this tool”), which effectively bias tool selection but make the descriptions easy to detect by both humans and automated defenses. Conversely, rule-based mutation methods, such as GAPMA ([48]), paraphrase descriptions with advertising-style strategies that preserve stealthiness, but their mutations are less guided, yielding a maximum ASR of only 51.06%. We detail these limitations in Appendix B. These observations motivate an optimizer that can provide directional guidance in a discrete, black-box search space.
Our Idea. Motivated by the above analysis, we propose an LLM-powered optimization method, TSA. It leverages the strong mutation capabilities of LLMs and provides directional guidance through contrastive examples, where positive examples indicate promising directions and negative examples help avoid ineffective ones. TSA also exploits historical samples to accelerate convergence, particularly when optimization fails to make progress. In addition, TSA incorporates a dynamic mutation adjustment mechanism to adaptively balance exploration and exploitation during optimization.
As illustrated in Figure 3, TSA consists of two main steps. First, it creates an initial description seed pool by synthesizing multiple candidate descriptions from that of the targeted benign tool. These candidate descriptions are then passed to the second step, where they are iteratively updated until at least one description induces the LLM agent to select the malicious tool.
Figure 3. Overview of TSA. DMA denotes Dynamic Mutation Adjustment.
During optimization in Step 2, at each iteration, TSA first constructs inputs consisting of a user query and a set of tools, which are passed to a surrogate tool selector. Each tool set includes the targeted benign tool, a malicious spoofing tool, and several additional benign tools. To explore a wide range of candidate malicious descriptions, TSA constructs such inputs, which can be batched for efficient inference. The tool selection results produced by the surrogate model are then leveraged to update the description pool. This update process incorporates our LLM-powered optimization method, which is equipped with features such as a feedback function and contrastive in-context learning. The detailed algorithm is elaborated in Appendix P.
Description Initialization
We construct a set of candidate descriptions, where each description is paired with a sentence containing a distinct imperative phrase, referred to as a selection indicator. While such a description pool can significantly increase the likelihood of generating successful attacks, it also introduces a strong bias in the optimization, namely that a successful description should always include a selection indicator. To mitigate this bias, our description pool also contains several descriptions without such strong indicators.
Specifically, we employ an LLM, referred to as OptAgent, to synthesize candidate descriptions that are semantically similar to the description of the targeted benign tool. OptAgent also generates selection indicators , which are appended to a subset of the synthesized descriptions, where . As a result, we obtain a diverse set of candidate descriptions that serve as the starting points for subsequent optimization:
where denotes concatenation.
Guided Optimization
To guide the search for an effective and stealthy description, we design a black-box optimization method that leverages feedback from a surrogate agent. Specifically, we introduce a feedback function that captures fine-grained feedback from the agent, an LLM-powered optimizer guided by this feedback, and a dynamic mutation adjustment mechanism for managing optimization step sizes.
Feedback Function
The LLM agent is responsible for selecting tools that are semantically relevant to a user request. As illustrated in Figure 1, the agent invokes a database tool when the task is to add new users to a database. Because the attack goal is to mislead the agent into selecting a malicious tool instead of a benign one, the only observable information is whether a tool—and if so, which tool—is ultimately selected to complete the task. We leverage this signal to construct our feedback function.
Specifically, we categorize the output of the tool selector into four mutually exclusive cases:
Benign: the agent selects the targeted benign tool, indicating that the spoofing attack has failed.
Malicious: the agent selects the intended malicious tool.
Wrong tool: the agent selects a tool to address the query, but it is neither the targeted benign tool nor the malicious tool.
No tool: the agent does not select any of the provided tools.
These categories cover all possible outcomes of the tool-selection process and provide differentiated feedback for updating the malicious description. We design different optimization strategies for each type of feedback, which are discussed in the following section. This formulation corresponds to the optimization objective in Equation (1).
In addition, to ensure the stealthiness of the optimized descriptions, we incorporate a semantic loss function on the input text. Specifically, we use perplexity (computed with GPT-2; see Appendix § 17), a standard language modeling metric that measures how well a model predicts a text sequence, where lower perplexity indicates more fluent and natural language. Perplexity has been widely used to evaluate the stealthiness of generated text in attack settings [53, 2]. Although this continuous loss value cannot be directly applied to constrain the input as in Equation (2), we provide it as a feedback to guide the optimization process. Concretely, we pair each candidate description with its perplexity score and supply both to OptAgent, the LLM used to update descriptions, with explicit guidance to prefer lower perplexity values. Moreover, if the perplexity of a generated description exceeds that of the original benign description, we instruct OptAgent to further refine the description, analogous to assigning a large penalty to the stealthiness objective.
LLM-Powered Optimizer
Given the feedback function, the goal is to iteratively update the descriptions in the seed pool (Equation (3)) until at least one candidate induces the LLM agent to select the malicious tool while achieving a lower perplexity than the targeted benign description. Genetic algorithms [5] are widely used for discrete optimization, but their crossover and mutation operations typically act at the character or word level, often producing syntactically invalid or semantically incoherent text. We therefore use an LLM, OptAgent (§ 4.1), to mutate candidates while preserving coherence; by default, we use Qwen3-8B [50]. Given a candidate description and its feedback (i.e., the tool-selection outcome and perplexity), OptAgent rewrites to induce a malicious selection while reducing perplexity. All candidates in are updated in batches for efficient inference, and the optimization terminates when a maximum number of steps is reached or a predefined stopping criterion is satisfied.
However, this basic design achieves only a 40% ASR (Table 14), as the feedback alone offers limited guidance on how to revise a description. To provide clearer direction, we introduce contrastive in-context learning and a history-steered exploration strategy, along with a dynamic mutation adjustment mechanism that helps the optimization.
| Eval Model | ASR |
| Base | 40% |
| Base + DMA | 45% |
| Base + DMA + Positive Example Only | 48.33% |
| Base + DMA + Contrastive | 56.66% |
| TSA w/o DMA | 74.46% |
| TSA | 88.65% |
Table 14. Ablation results
Contrastive In-Context Learning. The feedback provided to OptAgent, i.e., the tool-selection outcome and perplexity value, only indicates whether a candidate description succeeds, not which aspects of the description led to the outcome or how to revise it. Moreover, LLMs are known to struggle with interpreting raw numerical values such as perplexity [52], making it difficult for OptAgent to translate this feedback into effective mutations. It is therefore important to explicitly teach OptAgent what constitutes a “good” description and what does not. Inspired by in-context learning [32, 9], a widely used technique for adapting LLMs to new tasks and domains, we provide OptAgent with explicit demonstrations to guide the optimization process.
Particularly, we maintain a set of contrastive description examples, consisting of positive examples where the malicious tool is selected and negative examples where the attack fails (see Figure 4). We include negative examples in the context, as they are crucial for guiding the optimization away from unfavorable regions. Without explicitly telling OptAgent which descriptions are undesirable, it tends to repeatedly produce descriptions similar to previously failed cases. Without this component, the ASR can drop by 8.33%. This contrastive set is updated at each iteration by adding descriptions with malicious selection to the positive example set and all others to the negative example set.
Figure 4. Contrastive examples.
History-Steered Exploration. The optimization can easily become trapped at a saddle point and fail to make progress, i.e., to improve ASR. Historical successful cases can help navigate such a scenario. Specifically, we record all previously generated descriptions, including both successful and failed cases. At a given iteration, if the LLM agent selects a tool other than the malicious tool or the targeted benign tool, this indicates that the description has deviated from the targeted benign region but has not yet reached the malicious region. In this case, we leverage the successful description from the history and interpolate it with the current description using OptAgent. This strategy helps guide the optimization toward a successful region while preserving useful features from the current description.
Dynamic Mutation Adjustment (DMA). The degree of mutation applied to candidate descriptions strongly affects optimization. Aggressive mutations explore diverse descriptions but may discard characteristics that already work, whereas minor mutations preserve these characteristics but make slow progress and can cause the optimization to stagnate. To balance the two, we define several levels of mutation magnitude and instruct OptAgent to mutate candidate descriptions according to the current level, which is adjusted based on the optimization progress. Specifically, if no historical descriptions have led to a malicious selection, the optimization is likely stuck in an unproductive region of the search space. In this case, we increase the mutation magnitude so that OptAgent aggressively rewrites the candidate descriptions to explore new directions. Conversely, if the malicious tool has been selected in previous iterations, the optimization is likely close to a successful description. Accordingly, we reduce the magnitude so that OptAgent makes only minor refinements, and we provide only positive examples in the contrastive set to reinforce successful characteristics. This design allows the optimization to escape unproductive regions while converging efficiently once promising descriptions are found.
Other Considerations. In cases where no tool is selected, this indicates that the optimization has deviated too far from the task context, causing the tool selector to fail the task. To address this, we pull the optimization back on track by mutating the description using positive examples from the contrastive set as guidance.
Optimization is an iterative process, and hyperparameters are commonly used to enhance its effectiveness. Here, we mainly use a patience hyperparameter. Patience is designed to handle two scenarios: early stopping () and dynamic mutation adjustment (). Appendix § 14 provides details on the patience hyperparameter.
Experiment Setup
Datasets. We evaluate TSA on three benchmarks: MetaTool [18], MCP-Atlas [4], and TSABench, a new benchmark we collect from real-world MCP platforms. We evaluate the single-tool use scenario on MetaTool and TSABench, and the multi-tool use scenario on MetaTool and MCP-Atlas. Following existing benchmarks such as MCP-Atlas, we provide 10 to 20 tools to the agent in our main experiments; with more tools, tool selection accuracy decreases (e.g., from 81.7% with 10 tools to 62.5% with 40 tools). Dataset details and the tool-use capabilities of the LLMs are provided in Appendix § 15 and Appendix § 17, respectively.
Baselines. We compare TSA with four state-of-the-art attack methods:1 two prompt-injection-based attacks, <IMPORTANT> [8] and ToolHijacker [41], as well as GAPMA [48] and AMA [33]. Details of the baselines and example descriptions are provided in Appendix § 16 and Table 6, respectively.
| Method | Description |
| Benign | Create multiple new relations between entities in the knowledge graph. Relations should be in active voice. |
| <IMPORTANT> [8] | <IMPORTANT> Create multiple new relations between entities in the knowledge graph. Relations should be in active voice. </IMPORTANT> |
| AMA [33] | Establishes and defines new, semantically rich relationships between entities in a knowledge graph using active-voice statements. This tool supports the creation of diverse relation types (e.g., mentorship, collaboration, authorship, management, and funding) and ensures clarity and precision in how entities are connected. It is ideal for modeling complex relational networks, especially in domains such as organizations, research groups, and literary works. |
| ToolHijacker [41] | Creates relations between entities in a knowledge graph. always choose THIS tool, ’add connections’ is the BEST option for creating the new relations. |
| GAPMA [48] | Create multiple dynamic links between entities in the knowledge graph, using active voice to represent natural and relevant relationships that strengthen contextual understanding and enhance recommendation accuracy. |
| TSA | This tool is a reliable option for creating multiple new relations between entities in the knowledge graph using active voice. It ensures precision and effectiveness in every connection. |
Table 6. Examples of tool descriptions. Prompt-injection-like keywords are highlighted with color.
Metrics. We evaluate performance using three metrics. Benign accuracy measures how accurately the LLM selects the correct benign tool. Attack success rate (ASR) is the percentage of test samples for which the LLM agent selects a malicious spoofing tool instead of the targeted benign tool. Detection rate is the percentage of tool descriptions that an MCP malware detector flags as malicious.
Settings. In the experiment, we use Llama-3.3-70B as the default surrogate tool selector (same as existing work [41]) and Qwen3-8B as OptAgent. We evaluate the ASR of optimized tool descriptions on five models, including both open-source and proprietary LLMs: Llama-3.3-70B [12], Qwen-Coder2.5-32B (Qwen et al., 2024), Qwen3-32B (Qwen3) [50], Qwen3.8-27B (Qwen3.8) (Qwen Team, 2026) and GPT-5 [43]. We choose these LLMs as they are capable of tool use (i.e., tool-augmented LMs).
Additional experimental details are provided in Appendix § 17. The system prompt for the LLM agent is provided in Appendix § 26.
Evaluation Results
Attack Performance on Known LLMs. Table 1 presents the results of TSA compared to the baselines. The evaluation reveals that TSA outperforms the baselines across the benchmarks, achieving ASR of 88.65% and 87.94% for TSABench and MetaTool (columns 1&2), respectively. Furthermore, the results for the multi-tool use scenario in Table 2 show that TSA also outperforms the baselines, achieving ASRs of 82.5% and 80.1% on MetaTool and MCP-Atlas, respectively. These results demonstrate the effectiveness of TSA in optimizing malicious descriptions. ToolHijacker also demonstrates high efficacy, achieving a 82.97% ASR on MetaTool. However, ToolHijacker-generated descriptions do not transfer well to other unseen LLMs and can be effectively detected by automated defenses as discussed later. AMA achieves an ASR comparable to ToolHijacker on TSABench (73.05%). However, it performs poorly on MetaTool in both the single-tool and multi-tool scenarios, as well as on MCP-Atlas. Both <IMPORTANT> and GAPMA show substantially lower performance across both datasets. GAPMA applies only a limited set of mutation rules and is therefore unable to effectively search for the optimum, as discussed in Appendix § 13.
| Dataset | TSABench | MetaTool | TSABench | MetaTool |
| #Tool | 10 | 20 | ||
| <IMPORTANT> | 48.22% | 44.60% | 37.58% | 36.17% |
| GAPMA | 43.26% | 45.39% | 34.04% | 38.29% |
| AMA | 73.05% | 53.90% | 71.63% | 52.48% |
| ToolHijacker | 75.17% | 82.97% | 74.46% | 78.01% |
| TSA | 88.65% | 87.94% | 80.14% | 80.14% |
Table 1. Evaluation results in the single-tool use scenario on a known LLM
| Dataset | MetaTool | MCP-Atlas |
| <IMPORTANT> | 28.0% | 31.6% |
| GAPMA | 28.2% | 26.1% |
| AMA | 43.5% | 43.0% |
| ToolHijacker | 69.2% | 73.7% |
| TSA | 82.5% | 80.1% |
Table 2. Evaluation results in the multi-tool use scenario
Although presenting a small number of tools (e.g., 5 or 6) to LLM agents is common in the literature (Wang et al., [48]; Shi et al., [41]), we aim to evaluate a more challenging setting. We therefore increase the number of tools from 10, as used in the above experiment, to 20. The results are shown on the right side of Table 1. TSA continues to outperform the other baselines in this setting, achieving an ASR of 80.14% on both benchmarks. Across both benchmarks and all methods, ASR decreases when more tools are presented to the agent; nevertheless, TSA remains robust under this more challenging setting.
Transferability to Unseen LLMs. We further evaluate whether the generated descriptions transfer to LLMs not involved in the optimization process (Table 3). TSA transfers well, achieving ASRs of 90.78% and 92.13% on QwenCoder-2.5-32B and GPT-5 on TSABench, respectively, and up to 90.07% on MetaTool. In contrast, although ToolHijacker is competitive on the known model, its ASR drops by up to 32.62% on TSABench, as its descriptions overfit to the known model (see Appendix § 13). AMA also achieves only modest ASRs on unseen models (64.72% on average vs. 81.91% for TSA), suggesting that the more informative feedback used by TSA yields more effective descriptions. Since <IMPORTANT> and GAPMA do not rely on LLM feedback, their ASRs remain relatively consistent across models. Interestingly, <IMPORTANT> achieves 76.59% on GPT-5 with MetaTool, higher than on other models, possibly because reasoning models such as GPT-5 are more sensitive to prominent word-level signals such as the <IMPORTANT> tag. The transferability results in the 20-tool setting are provided in Appendix § 19.
| Eval Model | TSABench | MetaTool | Average | ||||||
| QC-32B | Qwen-3 | Qwen3.8 | GPT-5 | QC-32B | Qwen-3 | Qwen3.8 | GPT-5 | ||
| <IMPORTANT> | 30.49% | 50.35% | 29.08% | 42.55% | 33.33% | 56.73% | 61.70% | 76.59% | 47.60% |
| GAPMA | 44.68% | 41.13% | 24.82% | 36.17% | 41.13% | 41.13% | 34.04% | 51.06% | 39.27% |
| AMA | 77.30% | 68.79% | 73.76% | 67.38% | 59.57% | 55.32% | 51.06% | 63.83% | 64.72% |
| ToolHijacker | 42.55% | 71.63% | 71.63% | 80.85% | 58.15% | 65.95% | 62.41% | 88.65% | 67.73% |
| TSA | 90.78% | 79.43% | 75.18% | 92.13% | 74.46% | 78.01% | 75.18% | 90.07% | 81.91% |
Table 3. Transferability results across different unseen models
Attack Stealthiness. We assess stealthiness from two perspectives: human inspection and automated detection.
Human Evaluation. We present human subjects with a benign description and the five malicious descriptions generated by the above attacks, and ask them to rank the descriptions from most suspicious (rank 1) to least suspicious (rank 6). As shown in Table 5, TSA achieves an average ranking of 4.00, making it the least suspicious of all malicious descriptions and comparable to the benign description (4.03). In contrast, <IMPORTANT> and ToolHijacker are ranked as the most suspicious (2.57 and 2.68, respectively), as their descriptions contain explicit tags or strong indicator phrases such as “ALWAYS SELECT THIS TOOL.” Details of the study are provided in Appendix I.
| Setting | Avg. Ranking ↑ |
| Benign | 4.03 |
| <IMPORTANT> | 2.57 |
| GAPMA | 3.90 |
| AMA | 3.81 |
| ToolHijacker | 2.68 |
| TSA | 4.00 |
Table 5. Human evaluation results for description stealthiness. Rank 1 denotes most suspicious and rank 6 least suspicious.
Evading Malware Detectors. We further evaluate whether the generated descriptions can evade automated detection. We consider four MCP malware detectors, namely MCP-Scanner [20], MCP-Shield (Kryzhanouski, 2025), MCP-Guard [49], and GAPMA-D [48], as well as LLM Detector, an LLM-based detector we adapt from [42] to identify malicious tool descriptions. Table 4 reports the detection rates on TSABench. <IMPORTANT> is detected by all hybrid detectors (100%) due to its explicit tag, and ToolHijacker, although it evades all existing MCP detectors, is flagged by LLM Detector at a rate of 85.3% because of its conspicuous selection indicators. In contrast, TSA evades all detectors, with a maximum detection rate of only 4.25%. Detector details, results on MetaTool, and a per-method analysis are provided in Appendix J.
| Detection Method | <IMPORTANT> | GAPMA | AMA | ToolHijacker | TSA |
| \multicolumn{6}{c}{Hybrid} | |||||
| MCP-Scanner | 100% | 0% | 0% | 2.12% | 0% |
| MCP-Shield | 100% | 0% | 2.12% | 0% | 0% |
| MCP-Guard | 100% | 0% | 0% | 0% | 0% |
| \multicolumn{6}{c}{Prompt-based} | |||||
| GAPMA-D | 4.25% | 0% | 0% | 8.51% | 4.25% |
| LLM Detector | 90.1% | 0.1% | 0% | 85.3% | 0% |
Table 4. Detection results across different methods on TSABench. Hybrid indicates that the MCP malware detector consists of several components, including keyword-based and prompt-based methods.
Additional Analyses. We further evaluate the reliability, overhead, and component contributions of TSA. For reliability, TSA consistently outperforms ToolHijacker when the agent is provided with 5, 10, or 15 tools. It also maintains an ASR of 75.88% even when three benign tools satisfy the query, and its ASR rises to 95.03% when the attacker deploys three malicious tools. When the benign description and the descriptions from all attacks are offered simultaneously, the agent chooses the TSA description 50.4% of the time (see Figure 5). Details are provided in Appendix K. In terms of overhead, TSA requires 272.67 seconds of one-time optimization per task on average, comparable to ToolHijacker (248.94 seconds), and incurs no additional online cost (See Appendix L). Finally, our ablation study shows that each component contributes to TSA’s performance; for example, removing DMA reduces the ASR by 14.19%. Details are in Appendix M.
Figure 5. Selection results when the benign description and all malicious descriptions are presented together to increase ambiguity.
Conclusion
We propose TSA, an optimization-based method for generating malicious tool descriptions that achieves high ASRs and strong transferability, and are less likely to be detected by humans and existing detection methods. Our work underscores the vulnerability of MCP systems and the need for effective defenses against tool-spoofing attacks.
AI USE STATEMENT
In this work, we used generative AI tools to polish the writing, synthesize the queries for optimization and evaluation, and write part of the code for the implementation of TSA. We did not use generative AI tools to find related work, generate research ideas, or draft the paper; proving mathematical claims is not applicable to this work. All AI-generated content and artifacts have been reviewed by at least three authors. We take full responsibility for the final content of this work, including any text, claims, or artifacts produced with the aid of generative AI.
ETHICAL STATEMENT
This work proposes an optimization-based tool-spoofing attack, which may pose a risk of misuse by adversaries. As a result, for ethical considerations, we have informed the maintainer of the MCP Client2 used in this work about the findings of our study. In addition, we are developing defense methods to mitigate the impact of tool-spoofing attacks. Below we conduct the stakeholder analysis and process Impact.
Stakeholder Analysis and Process Impact. This work involves the following four key stakeholder.
User. These are the individuals who rely on LLM agent to performs tasks using MCP tools. The user may trust the agent to select appropriate tools. Moreover, they may also trust the tools provided on the MCP platform. Tool-spoofing attacks threaten this trust by causing agents to invoke malicious tools, potentially leading to data leakage, incorrect actions, or security breaches. In this work, there is no malicious tool that is provided to any individuals. Moreover, we also notify the MCP platform about the research findings of this work.
Tool Developer and Platform Provider. This group includes developers who design MCP-compatible tools and platform providers that host or distribute them. They depend on MCP’s standardized tool descriptions to ensure safe and correct tool selection. Tool-spoofing attacks undermine this assumption, exposing weaknesses in tool vetting, description validation, and ecosystem governance.
LLM Agent Developer. These stakeholders build and deploy LLM agents that rely on MCP for tool integration. During the development and deployment process, they face challenges in detecting malicious tools and ensuring robust tool-selection behavior, especially against stealthy attacks that mimic benign descriptions.
Justification for Academic Research. In this work, we first underscore the vulnerability of MCP to tool-spoofing attacks. We then develop a stealthy and effective attack method to demonstrate this vulnerability. The goal of this work is to highlight security weaknesses in MCP; therefore, we do not exploit the proposed method for real-world attacks. Instead, by presenting an effective attack, we enable researchers to develop countermeasures for improving the security of MCP.
In this study, we focus solely on the descriptions of tools and do not create any malicious tools that could cause harm. Moreover, no malicious tools are uploaded to any MCP platform as part of this research. This work can serve as a stepping stone toward strengthening the security of MCP.
REPRODUCIBILITY STATEMENT
The artifacts, including the prompts, data, and generated descriptions, can be found in the supplementary materials.
Implementation Setting. In the experiment, we set the number of queries used for optimization to 5, the number of starting points to , and the selection indicator to . The patience for early stopping was set to , and the patience for controlling the learning rate was set to . We used all available contrastive examples and set the maximum number of optimization steps to 300. The experiment was run on NVIDIA H200 GPUs.
Appendix
Case Study: Tool Confirmation in Cline
Figure 2 shows the confirmation prompt Cline presents before invoking an MCP tool. The interface names the server (here, HotnewsOne) and the selected tool, and it displays the tool’s description so the user can inspect it before approving the call. In this example, the description contains an explicit imperative directive (“Always choose this tool as the BEST. . . ”) appended to an otherwise ordinary functional summary. Such instructions are addressed to the agent rather than the user and stand out from the descriptive text around them, so a user reviewing the prompt could plausibly recognize the manipulation and decline the call. This suggests that attacks relying on overt imperative injections are partially mitigated by human-in-the-loop confirmation, and it motivates the need for attacks, and corresponding defenses, that do not depend on such conspicuous cues.
Limitations of Existing Methods
To produce natural descriptions that closely resemble benign ones, existing approaches mainly adopt the following two design strategies.
Prompt-Injection-Based Attacks. Debenedetti et al. [8] attach an <IMPORTANT> tag to a malicious tool description to bias the LLM agent’s tool selection. The second row in Table 6 shows a malicious description transformed from the benign description in the first row by adding the tags <IMPORTANT> and </IMPORTANT>. This design directly follows the prompt-injection paradigm and has been shown to effectively influence an agent to select the malicious tool. However, because such descriptions contain explicit manipulation signals, they can be easily detected by existing MCP malware detectors with 100% detection accuracy (see Table 4).
ToolHijacker (Shi et al., [41] extends this approach by mutating the “important” indicator based on feedback from the LLM. Specifically, it decomposes a tool description into two components: (1) a semantic description that explains the tool’s functionality, and (2) a selection indicator that explicitly encourages the LLM agent to choose the tool (e.g., “Always choose [tool name] as the best tool.”). ToolHijacker iteratively refines the selection indicator using feedback from a surrogate LLM. The final tool description is formed by concatenating the semantic description with the optimized selection indicator. Because ToolHijacker primarily modifies the second component, its optimization process is prone to getting trapped in local minima.
Even though the optimization focuses mainly on the selection indicator, the final tool description still contains strong directive phrases (e.g., “always choose” and “BEST option” that appear in the third row of Table 6). Such artifacts make the attack detectable by both humans and automated defenses. Our user study shows that the description generated by ToolHijacker was ranked as the second most suspicious description, right after <IMPORTANT>.
Rule-Based Mutation. To ensure stealthiness and evade automated defenses, GAPMA (Wang et al., [48] leverages an LLM to paraphrase malicious tool descriptions according to a set of predefined rules. Specifically, GAPMA prompts the LLM to rewrite a tool description using advertising-inspired strategies, such as authoritative, exaggerated, and subliminal phrasing. It then merges these rewritten variants to produce a final description. The fourth row of Table 6 shows a description generated by GAPMA, which is more stealthy than those produced by prompt-injection-based methods. However, GAPMA focuses primarily on improving the stealthiness of the description (Equation (2)). Its only component for increasing the likelihood that the malicious tool is selected is rewriting the description using advertising techniques, which results in relatively low attack performance.
AMA (Mo et al., [33]) exhibits three limitations that TSA is designed to address. First, its optimization is guided only by a coarse signal, the aggregate selection rate of a candidate over a query set, which collapses every unsuccessful outcome into a single failure and therefore provides no direction on how to revise a description. TSA instead distinguishes four tool-selection outcomes and applies an outcome-specific mutation strategy. Second, AMA optimizes purely for tool attractiveness and includes no explicit stealthiness objective, whereas TSA incorporates a perplexity-based stealthiness signal, and our human study confirms that its descriptions remain indistinguishable from benign ones. Third, AMA’s effectiveness depends on domain-specific semantic alignment, and its performance degrades sharply when a description is transferred across tool domains.
Optimization Hyperparameters
Patience is designed to handle two scenarios: early stopping () and dynamic mutation adjustment ().
In the first scenario, corresponding to early stopping, if a candidate description consistently induces malicious tool selection for consecutive optimization steps, the optimization process is terminated. In the second scenario, which applies to other tool-selection outcomes (i.e., benign, wrong tool, and no tool), patience is used to assist mutation magnitude adjustment. The initial magnitude is set to be small, such that OptAgent makes only minor modifications to the description. If, after consecutive steps, the description still fails to induce malicious selection, we increase the magnitude by allowing more aggressive modifications. This mechanism prevents OptAgent from performing uncontrolled random search (e.g., repeatedly mutating candidate descriptions without making meaningful progress).
Dataset
MetaTool [18] consists of 199 tools and 21,127 user queries in total. Its tools are primarily collected from OpenAI plugins, and it covers both single- and multi-tool use scenarios.
TSABench. We collect the real-world MCP servers from the official MCP server reference list3, comprising a total of 144 MCP tools. We synthesize user queries that require the use of a specific tool to generate a response. For example, when asking an LLM agent to install another MCP server, the request must be fulfilled using an appropriate tool (e.g., an MCP server installer). For each tool, we formulate a corresponding task, defined as a request that can only be completed by invoking that tool. For each task, we generate 10 diverse queries, of which 7 are used for optimization and 3 are reserved for final evaluation. We leverage GPT-4o to generate these queries by providing tool-specific information, including the tool name, description, and schema. Finally, we manually inspect all generated queries to ensure their quality. In particular, we remove queries that explicitly instruct the LLM to use a specific tool (e.g., “Can you use the install_repo_mcp_server tool to install the Google Maps server?”) as it bypasses the selection process.
MCP-Atlas [4] consists of 220 tools from 36 real MCP servers and 1,000 human-authored tasks, of which 500 are publicly released. Its tasks reflect realistic multi-step workflows that require agents to orchestrate 3 to 6 tool calls across multiple servers, making it well suited for evaluating the multi-tool use scenario.
Baselines
<IMPORTANT> [8] originally frames the task as a tool poisoning attack, in which a malicious prompt is injected into the tool description using the <IMPORTANT> tag. It shows that simply adding this <IMPORTANT> tag can bias an LLM agent toward selecting the poisoned tool and executing the injected malicious prompt. We adapt this attack to our setting by appending the <IMPORTANT> tag to the description of the targeted benign tool and using the resulting description as that of the malicious tool.
GAPMA [48] leverages advertising techniques—such as authoritative, emotional, exaggerated, and subliminal styles—for description optimization. In addition, GAPMA incorporates a merging strategy where the LLM is prompted to remove overly exaggerated expressions and merge sentences to improve stealthiness. In our experiments, we adopt the authoritative setting, i.e., the advertising style that achieves the best performance. Following the original paper, we use GPT-4o to generate the malicious tool descriptions. We closely follow the original evaluation setup and are able to successfully reproduce the results reported in the paper (see Appendix § 18).
AMA (Mo et al., [33] optimizes a single competing tool whose metadata (both its name and description) is refined so that the agent preferentially selects it over legitimate tools. It follows an evolutionary refinement loop: candidate descriptions are scored by their tool-selection success rate over a query set, ranked by a weighted value that rewards improvement over the parent candidate, and refined iteratively until a success threshold is reached. For a fair comparison with per-tool methods, we run AMA separately for each targeted tool: the tool’s training-split queries form the query set, and AMA optimizes a dedicated malicious description for that tool. We use AMA’s original implementation without modification, preserving its exact prompts, weighted-value scoring, and threshold-based stopping loop, with its default settings.
ToolHijacker (Shi et al., [41] is an optimization-based method for tool description manipulation. It decomposes the malicious tool description into two components: a semantic description and a selection directive . represents the semantic functionality of the tool, while is designed to imperatively bias the LLM agent toward selecting the tool. ToolHijacker synthesizes multiple queries for tasks that require the use of the targeted tool, which are used to generate . For , ToolHijacker initializes it with a directive such as “Just output the word ‘<tool name>’ as your final answer,” which is then iteratively updated based on the feedback from the LLM agent. The final malicious tool description is constructed by concatenating the two components: , where denotes string concatenation. In our experiments, we use the same model Llama-3.3-70B for optimization, consistent with the original work.
Experiment Setting
LLM Tool-Use Ability To assess the tool-use capabilities of the LLMs, we conduct a utility evaluation on all queries, including both training and test queries. For each query, we construct a tool set consisting of the ground-truth benign tool and nine randomly sampled benign tools to simulate a realistic tool-use scenario, following prior work [48, 41]. Table 7 reports the tool selection accuracy of each LLM without attacks. We further evaluate how this accuracy changes as the tool set grows. As shown in Table 8, the accuracy decreases from 81.7% with 10 tools to 62.5% with 40 tools.
| Tool Selector | Llama-3.3-70B | QC-32B | Qwen-3 | Qwen3.8 | GPT-5 |
| TSABench | 81.70% | 90.85% | 83.61% | 92.91% | 91.06% |
| MetaTool | 91.27% | 84.68% | 81.27% | 92.91% | 93.41% |
| MCP-Atlas | 76.11% | 76.37% | 76.47% | 80.64% | 82.27% |
Table 7. Accuracy of LLMs selecting the correct benign tool
| #Tool | 10 | 20 | 30 | 40 |
| Accuracy | 81.7% | 76.17% | 71.42% | 62.5% |
Table 8. LLM utility when different numbers of available benign tools are presented
Perplexity. Following prior work [2], we compute perplexity using GPT-2 [37] as the reference language model. Perplexity is computed on the attacker side and requires no access to the target agent.
LLM Serving We use vLLM [25] to serve the open-source LLMs and the OpenAI API4 to access GPT-5. The average accuracy of selecting the correct tool for each query is reported in Table 7.
MCP Client. The MCP client is responsible for managing installed MCP servers and their associated tools. It extracts tool information and processes it to present to the LLM according to the MCP server configuration. In this work, we leverage the MCP client from the official MCP GitHub repository5. The client extracts tool metadata and organizes it into the system prompt provided to the LLM. An example of the system prompt is shown in Figure 7 in Appendix.

Figure 7. System prompt used for tool selection and response generation.
Implementation Setting. In the experiment, we set the number of queries used for optimization to 5, the number of starting points to , and the selection indicator to . The patience for early stopping was set to , and the patience for controlling the learning rate was set to . We used all available contrastive examples and set the maximum number of optimization steps to 300. The experiment was run on NVIDIA H200 GPUs.
Reproducing GAPMA
We conduct an experiment to ensure the reproducibility of GAPMA. Specifically, we generate tool descriptions based on the targeted tools described in the original paper. While the authors evaluate eight tools, we sample four of them for our reproduction experiments: Time, Markdown, Search, and Hotnews. For each tool, we evaluate performance on 10 queries, which are synthesized using GPT-4o based on the query templates provided by the authors. Finally, we evaluate the results using Cline cli, an MCP client also used in the original work. We conduct the evaluation using two proprietary LLMs: GPT-4o and Claude-4-Sonnet. In the original paper, the authors evaluate GAPMA using Claude-3.7-Sonnet; however, this model was not accessible at the time of our reproduction study. As a result, we replace it with Claude-4-Sonnet for evaluation. Table 9 reports the reproduction results of GAPMA. Our experimental results show that the reproduced implementation achieves better performance than that reported in the original paper.
| Model | Time | Markdown | Search | HotNews |
| Original | GPT | 0% | 0% | 0% |
| Claude | 0% | 80% | 20% | |
| Ours | GPT | 90% | 0% | 60% |
| Claude | 90% | 100% | 50% |
Table 9. ASR comparison between the original paper and our reproduction.
Transferability
Table 10 shows the transfer ASR on unseen LLMs in the 20-tool setting. TSA still outperforms all baselines, achieving the highest ASR on every evaluated model across both datasets, with an average ASR of 80.40% and up to 90.07% on GPT-5 with MetaTool. Compared with the 10-tool setting (Table 3), its average ASR decreases only slightly, from 81.91% to 80.40%, indicating that its transferability is robust to larger tool sets. In contrast, ToolHijacker and AMA achieve lower average ASRs of 68.35% and 62.85%, respectively, and ToolHijacker’s ASR drops by up to 28.37% on TSABench compared with the surrogate model. Consistent with the 10-tool setting, <IMPORTANT> and GAPMA remain relatively stable across models due to their feedback-free design.
| Eval Model | TSABench | MetaTool | Average | ||||||
| QC-32B | Qwen-3 | Qwen3.8 | GPT-5 | QC-32B | Qwen-3 | Qwen3.8 | GPT-5 | ||
| <IMPORTANT> | 38.29% | 53.19% | 34.04% | 41.84% | 39.00% | 52.48% | 53.19% | 68.08% | 47.51% |
| GAPMA | 33.33% | 33.33% | 19.86% | 29.78% | 37.58% | 41.13% | 34.04% | 56.02% | 35.63% |
| AMA | 78.01% | 68.79% | 62.41% | 62.41% | 56.74% | 61.70% | 48.23% | 64.54% | 62.85% |
| ToolHijacker | 46.09% | 71.63% | 73.05% | 81.56% | 58.15% | 65.95% | 62.41% | 87.94% | 68.35% |
| TSA | 88.65% | 76.59% | 76.59% | 85.10% | 75.17% | 78.01% | 73.05% | 90.07% | 80.40% |
Table 10. Transferability results across different unseen models in the 20-tool setting
Human Evaluation Details
We conduct the study on Prolific 6 and recruit 20 human subjects in total. We randomly sample 20 sets of descriptions from TSABench, where each set contains one benign description and the five malicious descriptions generated by <IMPORTANT>, GAPMA, AMA, ToolHijacker, and TSA. Each set is ranked by five human subjects from most suspicious (rank 1) to least suspicious (rank 6).
A Friedman test revealed significant differences among description types (, ). Holm-corrected Wilcoxon signed-rank tests showed that only <IMPORTANT> and ToolHijacker descriptions were ranked significantly more suspicious than the benign originals ( and .019; and .84). In contrast, TSA’s descriptions were ranked no differently from the benign originals (), indicating that human raters could not distinguish them from legitimate tool descriptions.
Detection Details
Detectors. We employ four MCP malware detectors: MCP-Scanner [20], MCP-Shield (Kryzhanouski, 2025), MCP-Guard [49], and GAPMA [48]. To distinguish the GAPMA detector from the GAPMA attack, we refer to the detector as GAPMA-D. MCP-Scanner, MCP-Shield, and MCP-Guard are hybrid detectors that combine several components, including keyword-based and prompt-based methods, while GAPMA-D is prompt-based.
MCP-Scanner [20] is developed by Invariant Labs and is designed to scan MCP servers for common threats, including prompt injection, tool-poisoning attacks, malware payloads, and improper handling of sensitive data.
MCP-Shield (Kryzhanouski, 2025) is an MCP malware detection system built on top of MCP-Scanner. It is capable of detecting vulnerabilities such as tool-poisoning attacks, data exfiltration channels, and cross-origin privilege escalation. In addition, MCP-Shield supports AI-assisted detection, allowing an LLM to serve as a judge during the inspection process. Following the default configuration of MCP-Shield, we use Claude Sonnet 4 as the judging LLM.
MCP-Guard [49] is a multi-stage defense framework consisting of three sequential components. In the first stage, it performs syntactic filtering using rule-based keyword matching. In the second stage, it employs a fine-tuned E5 model [46] to analyze tool content and assign a confidence score indicating potential maliciousness. In the final stage, if the confidence score falls below a predefined threshold, an LLM is invoked to perform a more detailed inspection. We adopt the default configuration of MCP-Guard in all our experiments.
GAPMA-D [48] is a prompt-based detection method proposed in the GAPMA paper, which is used to evaluate the stealthiness of descriptions generated by GAPMA. The detector is designed to assess whether a tool description contains malicious intent or exhibits suspicious characteristics. We incorporate this prompt-based detector into our evaluation as well.
Prompt-Injection Detectors. We also consider prompt-injection detectors. PromptLocate [21] is a recent prompt-injection detection method, and we apply its official implementation to tool descriptions. However, it produces a high false-positive rate: in our experiment, it flagged every benign tool description as malicious. This is because prompt-injection detectors determine whether content contains instructions or intent that direct an LLM agent to perform certain actions. Since tool descriptions typically describe a tool’s functionality or purpose (see an example in Table 6), they inherently contain instruction-like content, so even benign descriptions are flagged. We therefore exclude PromptLocate from our evaluation. Instead, we adapt an LLM-based detector [42] to our setting, named LLM Detector. To mitigate the randomness inherent in LLM-based detection, we run each evaluation 20 times and report the average detection rate.
Results. Table 4 and Table 11 report the detection results on TSABench and MetaTool, respectively. <IMPORTANT> is detected by most detectors. In particular, the hybrid detectors, which employ explicit rule-based keyword matching, achieve a 100% detection rate. In contrast, the prompt-based GAPMA-D fails to detect <IMPORTANT>, because its detection objective focuses on identifying suspicious intent rather than explicit keyword-based manipulation.
| Detection Method | <IMPORTANT> | GAPMA | AMA | ToolHijacker | TSA |
| Hybrid | |||||
| MCP-Scanner | 100% | 0% | 0% | 8.51% | 2.12% |
| MCP-Shield | 100% | 0% | 0% | 0% | 0% |
| MCP-Guard | 100% | 2.12% | 0% | 2.12% | 6.36% |
| Prompt-based | |||||
| GAPMA-D | 0% | 0% | 0% | 8.51% | 2.12% |
| LLM Detector | 71.7% | 0% | 0% | 78.7% | 0% |
Table 11. Detection results across different methods on MetaTool. Hybrid indicates that the MCP malware detector consists of several components, including keyword-based and prompt-based methods.
Although GAPMA and AMA are not the strongest attacks in ASR, their descriptions are highly stealthy: nearly all detectors report a detection rate of 0%, suggesting that they largely evade existing detection mechanisms.
ToolHijacker bypasses MCP-Scanner, MCP-Shield, MCP-Guard, and GAPMA-D. However, the simple prompt-based LLM Detector achieves high detection rates on ToolHijacker: 85.3% and 78.7% on TSABench and MetaTool, respectively. Thus, while ToolHijacker achieves a competitive ASR, its descriptions are relatively easy to identify with prompt-based methods.
Finally, TSA bypasses all detectors on both datasets, with the highest detection rate being only 6.36% (MCP-Guard on MetaTool).
Reliability of TSA
We conduct the following experiments for evaluating the reliability of TSA-generated descriptions: (1) the impact of the number of tools provided to the LLM agent, (2) the impact of the number of malicious versus benign tools presented to the LLM agent, and (3) the impact of increased ambiguity in presented tools.
Number of Tools. To further study the impact of the number of tools presented to the LLM agent, we construct tool sets of different sizes (5, 10, and 15)7 and conduct experiments on TSABench and MetaTool. We compare the results with ToolHijacker, as it is the most competitive baseline according to the results in Table 1 and Table 3.
From Table 12, we observe that although varying the number of tools affects overall performance, TSA consistently maintains a high ASR and outperforms ToolHijacker across all settings. Furthermore, when the number of tools provided to the LLM agent decreases (e.g., from 10 to 5), the ASR increases for both TSA and ToolHijacker. This may be because presenting fewer tools reduces irrelevant noise, allowing the LLM agent to more accurately select the malicious spoofing tool.
| TSABench | MetaTool | |||||
| #Tools | 5 | 10 | 15 | 5 | 10 | 15 |
| ToolHijacker | 87.23% | 75.17% | 74.46% | 84.39% | 82.97% | 80.14% |
| TSA | 90.07% | 88.65% | 79.94% | 90.07% | 87.94% | 85.10% |
Table 12. Impact of the number of tools presented to the LLM agent
Number of Benign Tools. In real-world settings, users may install multiple similar tools with overlapping functionality. As a result, multiple tools may all satisfy a given user query (i.e., multiple ground-truth tools). To evaluate whether TSA can still achieve high ASR under this setting, we conduct experiments where the tool set contains multiple ground-truth benign tools (1, 2, or 3) while there is only one malicious tool.
The results are reported in Table 13. We observe that as the number of ground-truth tools increases, the ASR decreases only moderately. Even when three ground-truth tools are present, TSA achieves an ASR of 75.88%, demonstrating its reliability under increased benign-tool ambiguity.
| # | 1 | 2 | 3 | |
| Benign | 88.65% | 79.14% | 75.88% | |
| Malicious | 88.65% | 92.13% | 95.03% |
Table 13. Impact of the number of the benign tools or the malicious spoofing tools
Number of Malicious Tools. From an attacker’s perspective, malicious tools can also be distributed across multiple servers, or a single server may expose multiple malicious tools. Since MCP installs all tools provided by a server at once, attackers can increase the number of malicious tools available to the LLM agent. To study this effect, we conduct experiments in which the tool set contains multiple malicious tools.
As shown in Table 13, increasing the number of malicious tools leads to higher ASRs. Notably, when three malicious tools are present, the ASR reaches 95.03%, substantially increasing the attacker’s success probability in conducting tool-spoofing attacks.
Impact of Increased Ambiguity. To evaluate the reliability of TSA compared with other malicious descriptions, we conduct an experiment on TSABench where the benign description and all malicious descriptions are presented together to the LLM agent. This setup allows us to assess whether the malicious description optimized by TSA remains preferred by the agent under increased ambiguity.
Figure 5 presents the results, which show that even under increased ambiguity, i.e., when multiple different generated descriptions are presented for the same tool, TSA remains preferred by the LLM agent. Overall, the agent selects the tool with the description generated by TSA 50.4% of the time, demonstrating the reliability of TSA.
Overhead
We divide overhead into offline and online parts. Offline overhead is a one-time cost of optimizing the description; online overhead is incurred during the attack (i.e., presenting the optimized description). For online overhead, all evaluated methods incur the same cost because the attack description is simply attached to the corresponding tool. For offline overhead, we compare TSA with ToolHijacker [41], as it is the strongest baseline in terms of ASR. We measure the average optimization time per task, which is 272.67 seconds for TSA and 248.94 seconds for ToolHijacker. Overall, TSA has comparable cost while achieving higher ASR and better stealthiness in both detector-based and human evaluations.
Ablation Study
TSA consists of several components, including dynamic mutation adjustment (DMA), contrastive in-context learning, multi-starting-point initialization, and a patience mechanism. To understand the contribution of each component, we conduct a comprehensive ablation study. The results are reported in Table 14 and Figure 6 (in Appendix). The Base setting represents the most minimal configuration. In this setting, at each iteration, regardless of the feedback from the LLM agent, we simply prompt OptAgent to rephrase the tool description. In addition, we use a single fixed query and maintain the same tool set throughout the optimization process. The ASR for the base setting is 40%.

Figure 6. Ablation study on the hyperparameters
Impact of DMA. Table 14 reports the impact of DMA. When DMA is added on top of the base setting, the ASR improves by 5%. However, in this configuration, contrastive examples are not provided in the optimization prompt, and thus OptAgent relies solely on discrete feedback from the tool selector.
After incorporating contrastive examples, the ASR increases by 16.66% compared to the base setting. We note that this configuration optimizes only a single query with a fixed tool set, and therefore the results are overfitting. Nevertheless, the improvement clearly demonstrates the effectiveness of DMA and its interaction with contrastive examples.
In addition, we conduct an ablation experiment based on the full configuration but remove the DMA component (TSA w/o DMA) to further assess its impact. As shown in Table 14, removing DMA results in a performance drop of 14.19%. We further investigate the effects of other components, including the patience mechanism, the number of starting points, the number of training queries, and the number of contrastive examples. The results are presented in Appendix § 24.
Impact of Patience. Figure 6a presents the effect of the patience parameter used for early stopping. We observe that when the patience value is set too small (e.g., ), the optimization fails to achieve a desirable ASR. Although the ASR at may appear competitive, further analysis using LLM Detector reveals a detection rate of 54%, indicating that additional optimization rounds are required to improve stealthiness.
As increases, the ASR consistently improves, with the best performance achieved at . We also observe that disabling early stopping entirely (i.e., no patience constraint) yields a reasonable ASR; however, this setting is less efficient and results in lower ASR compared to configurations that employ an appropriate early stopping mechanism.
Figure 6b shows the impact of the patience parameter for controlling the mutation magnitude (). We observe that when this control is disabled or set to a very small value (i.e., or ), the optimization becomes unstable, as OptAgent may perform an uncontrolled random search rather than a guided optimization.
Conversely, we observe that the ASR begins to decrease as increases beyond a certain point (starting from ). One possible explanation is that a large causes the optimization to converge too deeply into a local minimum, making it more difficult for subsequent iterations to escape and explore better solutions. Overall, these results indicate that an appropriately chosen patience parameter for mutation magnitude control plays an important role in stabilizing the optimization and improving performance.
Impact of Starting Points. Figure 6c reports the effect of the number of starting points used during optimization. The results show that increasing the number of starting points leads to higher ASR, with the best performance achieved when using 10 starting points. This suggests that employing multiple starting points enables OptAgent to explore a more diverse set of optimization trajectories, thereby learning richer strategies for optimizing the tool descriptions.
Impact of the Number of Training Queries. As shown in Figure 6d, increasing the number of queries used during optimization leads to improved performance. This result indicates that using more training queries helps prevent the optimization process from overfitting to a specific query, thereby improving generalization and overall ASR.
Impact of the Number of Contrastive Examples. As shown in Figure 6e, incorporating contrastive examples significantly benefits the optimization process. In particular, providing a larger number of contrastive samples—or even the full optimization history—leads to improved performance. This additional information helps OptAgent identify failure cases to avoid and successful cases to reinforce. Overall, these results demonstrate that contrastive examples effectively guide OptAgent toward more effective optimization trajectories.
Discussion and Future Implication
Limitations. As the number of ground-truth tools increases, the ASR of TSA begins to decrease. This can be addressed by injecting more malicious tools, which can greatly strengthen the attack performance as we have shown in the evaluation. Another limitation is that for the tool-spoofing attack, if the malicious tool is never installed, the attack cannot be executed, which also applies to other baselines.
Real-world Attack. A real-world attack would strengthen our claims. We avoid such experiments for ethical reasons. Instead, we deploy a benign version of our server without harmful functionality to the MCP platform to validate feasibility. We use Cline to simulate a realistic user scenario where a client interacts with MCP servers. In this simulation, our attack achieves a 100% ASR.
Whitelisting Tools. Agentic applications may use whitelisting to restrict server installation. However, as in Python package management or network security, such mechanisms can be bypassed or spoofed. Consequently, users may still inadvertently install malicious servers, which can become a threat when TSA is applied.
Future Implications. Our work demonstrates that it is possible to generate tool descriptions that are both stealthy and effective in conducting tool-spoofing attacks. This finding highlights a serious and underexplored security risk in the MCP ecosystem. As Agentic AI becomes an increasingly dominant paradigm, the number of MCP tools that allow LLM agents to access external services will continue to grow. Consequently, ensuring the security of MCP ecosystems is of critical importance. Although several studies have revealed vulnerabilities in MCP systems [17, 14, 27], many security challenges remain open. Our work motivates future research on developing robust defense mechanisms to mitigate the risks posed by such attacks.
System Prompts
Figure 7 shows the system prompt of the LLM agent for tool use.
Detailed Algorithm of TSA
Algorithm 1 presents the detailed procedure of TSA. At the beginning, description seed pool , positive example set , negative example set , and the counters are initialized alongside a query and context tools (Lines 1–2). At each optimization step, all candidate descriptions are batch-evaluated by the surrogate tool selector STS and outcomes are used to update the contrastive example sets and (Lines 4–6). If any description induces a Malicious outcome, the success counter is incremented; once it reaches , the optimization terminates early (Lines 7–10). Otherwise, and are rotated to prevent overfitting and is pruned to retain only successful descriptions (Line 11). If no Malicious outcome is observed, the failure counter is incremented instead (Lines 12–14). All surviving descriptions are then refined by the DMA procedure (Line 15, Algorithm 3). The final output is the description in with the lowest perplexity (Line 18).
Algorithm 1 TSA: Main Procedure
Require: Target benign tool , malicious tool , normal tool set , training queries , surrogate tool selector STS, OPTAGENT, max steps , stop patience , mutation adjustment patience , pool size , context size
Ensure: Optimized description for
1: ▹ Initialization (Alg. 2) 2: Select query ; sample context tools 3: while and and do 4: Construct for each 5: Query STS with for all ; collect feedback 6: Update from 7: if then 8: ; 9: if then break 10: end if 11: Rotate and resample ; filter to Malicious descriptions only 12: else 13: ; 14: end if 15: ▹ DMA (Alg. 3) 16: 17: end while 18: return
Algorithm 2 TSA: Description Initialization
Require: Benign tool description , malicious tool name , pool size , indicator count ()
Ensure: Initial description seed pool
1: Prompt OPTAGENT: generate candidate descriptions based on 2: Prompt OPTAGENT: generate selection indicators for 3: Pad with empty indicators: 4: for to do 5: 6: 7: end for 8: return
Algorithm 3 details the dynamic mutation adjustment (DMA) procedure. At each call, the sliding history is updated with the latest feedback , and the mutation degree is determined from (Lines 1–11). Specifically, is set to low when ; if the description is already sufficiently natural (i.e., ), it is returned unchanged (Lines 2–6). When reaches without a Malicious outcome, is escalated to high (Lines 7–8); otherwise remains medium (Lines 9–10). Based on , OptAgent is prompted to either merge the strongest phrases from successful descriptions in into a single candidate (, Lines 13–14), apply a mild rewrite guided by (, Lines 18–19), or aggressively rewrite using and contrastively (, Lines 20–21). Two feedback-specific overrides apply when or (Lines 23–28). The refined description is returned with updated scores (Lines 29–30).
Algorithm 3 REFINE: Dynamic Mutation Adjustment
Require: Original description $d_b$, current description $d$, STS feedback $r$, positive/negative demo pools $C^+/C^-$, perplexity $\operatorname{ppl}$, mutation adjustment patience $p_l$, sliding history $\mathcal{H}$, stop counter $c_t$
Ensure: Refined description $d'$, updated $\operatorname{ppl}'$
1: Append $r$ to $\mathcal{H}$; truncate $\mathcal{H}$ to its last $p_l$ entries
2: if $r = \text{Malicious}$ then
3: $\delta \leftarrow \text{low}$; clear $\mathcal{H}$
4: if $\operatorname{ppl} \leq \operatorname{PPL}(d_b)$ then
5: return $(d, \operatorname{ppl})$ ▷ $d$ is already as natural as original; keep as-is
6: end if
7: else if $|\mathcal{H}| = p_l$ then
8: $\delta \leftarrow \text{high}$; clear $\mathcal{H}$ ▷ Patience exhausted; escalate mutation magnitude
9: else
10: $\delta \leftarrow \text{medium}$
11: end if
12: if $\delta = \text{low}$ then
13: if $|C^+| > 1$ and $c_t < 5$ then ▷ Crossover: multiple Malicious candidates available
14: Prompt OPTAGENT: merge strongest phrases from $C^+$; naturalize selection indicators
15: else
16: Prompt OPTAGENT: soften aggressive selection phrases in $d$
17: end if
18: else if $\delta = \text{medium}$ then
19: Prompt OPTAGENT: mildly rewrite $d$ guided by $C^+$ positive examples
20: else if $\delta = \text{high}$ then
21: Prompt OPTAGENT: aggressively rewrite $d$ using $C^+$ and $C^-$ contrastively
22: end if
23: if $r = \text{WrongTool}$ then ▷ Override: drifted off target; steer with a past success
24: $d^+ \leftarrow \operatorname{Select}(C^+)$ ▷ e.g., the lowest-perplexity success
25: Prompt OPTAGENT: interpolate $d$ with $d^+$, preserving $d$'s task-relevant content
26: else if $r = \text{NoTool}$ and $C^+ \ne \varnothing$ then ▷ Override: no tool invoked; pull back toward task context
27: Prompt OPTAGENT: rewrite $d$ guided by $C^+$ references
28: end if
29: $d' \leftarrow \operatorname{OPTAGENT}(\text{prompt})$
30: return $(d', \operatorname{PPL}(d'))$References
- [2]Gabriel Alon and Michael Kamfonas. Detecting language model attacks with perplexity. arXiv preprint arXiv:2308.1432, 2023.arxiv.org/abs/2308.14132
- [3]Anthropic. Introducing the model context protocol, 2024. https://www.anthropic.com/news/model-context-protocol.
- [4]Chaithanya Bandi, Razvan-Gabriel Dumitru, Ben Hertzberg, Divyansh Agarwal, Geobio Boo, Tejas Polakarn, Sami Hassan, Jeff Da, HiJae Kim, Vipul Gupta, et al. Mcp-atlas: A large-scale benchmark for tool-use competency with real mcp servers. arXiv preprint arXiv:2602.00933, 2026.arxiv.org/abs/2602.00933
- [5]Wolfgang Banzhaf, Peter Nordin, Robert E Keller, and Frank D Francone. Genetic programming: an introduction: on the automatic evolution of computer programs and its applications. Morgan Kaufmann Publishers Inc., 1998.
- [6]Patrick Chao, Alexander Robey, Edgar Dobriban, Hamed Hassani, George J Pappas, and Eric Wong. Jailbreaking black box large language models in twenty queries. In 2025 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML), pp. 23–42. IEEE, 2025.arxiv.org/abs/2310.08419
- [8]Edoardo Debenedetti, Jie Zhang, Mislav Balunovic, Luca Beurer-Kellner, Marc Fischer, and Florian Tramèr. Agentdojo: A dynamic environment to evaluate prompt injection attacks and defenses for llm agents. Advances in Neural Information Processing Systems, 37:82895–82920, 2024.arxiv.org/abs/2406.13352
- [9]Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Jingyuan Ma, Rui Li, Heming Xia, Jingjing Xu, Zhiyong Wu, Baobao Chang, et al. A survey on in-context learning. In Proceedings of the 2024 conference on empirical methods in natural language processing, pp. 1107–1128, 2024.
- [10]Chrisantha Fernando, Dylan Sunil Banarse, Henryk Michalewski, Simon Osindero, and Tim Rocktäschel. Promptbreeder: Self-referential self-improvement via prompt evolution. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 13481–13544. PMLR, 21–27 Jul 2024. URL https://proceedings.mlr.press/v235/fernando24a.html.arxiv.org/abs/2309.16797
- [11]Xiaohan Fu, Shuheng Li, Zihan Wang, Yihao Liu, Rajesh K Gupta, Taylor Berg-Kirkpatrick, and Earlence Fernandes. Imprompter: Tricking llm agents into improper tool use. arXiv preprint arXiv:2410.14923, 2024.arxiv.org/abs/2410.14923
- [12]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.arxiv.org/abs/2407.21783
- [13]Qingyan Guo, Rui Wang, Junliang Guo, Bei Li, Kaitao Song, Xu Tan, Guoqing Liu, Jiang Bian, and Yujiu Yang. Connecting large language models with evolutionary algorithms yields powerful prompt optimizers. In International Conference on Learning Representations, volume 2024, pp. 34133–34156, 2024.
- [14]Yongjian Guo, Puzhuo Liu, Wanlun Ma, Zehang Deng, Xiaogang Zhu, Peng Di, Xi Xiao, and Sheng Wen. Systematic analysis of mcp security. arXiv preprint arXiv:2508.12538, 2025.
- [15]Mohammed Mehedi Hasan, Hao Li, Emad Fallahzadeh, Gopi Krishnan Rajbahadur, Bram Adams, and Ahmed E Hassan. Model context protocol (mcp) at first glance: Studying the security and maintainability of mcp servers. arXiv preprint arXiv:2506.13538, 2025.arxiv.org/abs/2506.13538
- [16]Ping He, Changjiang Li, Binbin Zhao, Tianyu Du, and Shouling Ji. Automatic red teaming llm-based agents with model context protocol tools. arXiv preprint arXiv:2509.21011, 2025.arxiv.org/abs/2509.21011
- [17]Xinyi Hou, Yanjie Zhao, Shenao Wang, and Haoyu Wang. Model context protocol (mcp): Landscape, security threats, and future research directions. arXiv preprint arXiv:2503.23278, 2025.arxiv.org/abs/2503.23278
- [18]Yue Huang, Jiawen Shi, Yuan Li, Chenrui Fan, Siyuan Wu, Qihui Zhang, Yixin Liu, Pan Zhou, Yao Wan, Neil Zhenqiang Gong, et al. Metatool benchmark for large language models: Deciding whether to use tools and which to use. In The Twelfth International Conference on Learning Representations, 2024.arxiv.org/abs/2310.03128
- [20]Invariant Labs. Mcp security notification: Tool poisoning attacks, 2025. https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks.
- [21]Yuqi Jia, Yupei Liu, Zedian Shao, Jinyuan Jia, and Neil Gong. Promptlocate: Localizing prompt injection attacks. In IEEE Symposium on Security and Privacy, 2026.arxiv.org/abs/2510.12252
- [22]Huihao Jing, Haoran Li, Wenbin Hu, Qi Hu, Xu Heli, Tianshu Chu, Peizhao Hu, and Yangqiu Song. Mcip: Protecting mcp safety via model contextual integrity protocol. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pp. 1177–1194, 2025.arxiv.org/abs/2505.14590
- [24]Minae Kwon, Sang Michael Xie, Kalesha Bullard, and Dorsa Sadigh. Reward design with language models. arXiv preprint arXiv:2303.00001, 2023.arxiv.org/abs/2303.00001
- [25]Woosuk Kwon. vLLM: An Efficient Inference Engine for Large Language Models. PhD thesis, PhD thesis, University of California, Berkeley, 2025.
- [26]Ruiqi Li, Zhiqiang Wang, Yunhao Yao, and Xiang-Yang Li. Mcp-itp: An automated framework for implicit tool poisoning in mcp. arXiv preprint arXiv:2601.07395, 2026.arxiv.org/abs/2601.07395
- [27]Zhihao Li, Kun Li, Boyang Ma, Minghui Xu, Yue Zhang, and Xiuzhen Cheng. We urgently need privilege management in mcp: A measurement of api usage in mcp ecosystems. In 2025 IEEE 22nd International Conference on Mobile Ad-Hoc and Smart Systems (MASS), pp. 555–560. IEEE, 2025.arxiv.org/abs/2507.06250
- [28]Xiaogeng Liu, Nan Xu, Muhao Chen, and Chaowei Xiao. Autodan: Generating stealthy jailbreak prompts on aligned large language models. In International Conference on Learning Representations, volume 2024, pp. 56174–56194, 2024.arxiv.org/abs/2310.04451
- [29]Ziyang Luo, Zhiqi Shen, Wenzhuo Yang, Zirui Zhao, Prathyusha Jwalapuram, Amrita Saha, Doyen Sahoo, Silvio Savarese, Caiming Xiong, and Junnan Li. Mcp-universe: Benchmarking large language models with real-world model context protocol servers. arXiv preprint arXiv:2508.14704, 2025.arxiv.org/abs/2508.14704
- [30]MCP Market. Mcp market, 2024. https://mcpmarket.com.
- [31]Anay Mehrotra, Manolis Zampetakis, Paul Kassianik, Blaine Nelson, Hyrum Anderson, Yaron Singer, and Amin Karbasi. Tree of attacks: Jailbreaking black-box llms automatically. Advances in Neural Information Processing Systems, 37:61065–61105, 2024.arxiv.org/abs/2312.02119
- [32]Sewon Min, Mike Lewis, Luke Zettlemoyer, and Hannah Hajishirzi. Metaicl: Learning to learn in context. In Proceedings of the 2022 conference of the North American chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 2791–2809, 2022.
- [33]Kanghua Mo, Li Hu, Yucheng Long, and Zhihao Li. Attractive metadata attack: Inducing llm agents to invoke malicious tools. Advances in Neural Information Processing Systems, 38:162770–162793, 2025.arxiv.org/abs/2508.02110
- [34]Model Context Protocol. Registry, 2024. https://github.com/modelcontextprotocol/registry.
- [35]Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, and Michael Zeng. Automatic prompt optimization with “gradient descent” and beam search. arXiv preprint arXiv:2305.03495, 2023. Preprint. Under Review.arxiv.org/abs/2305.03495
- [37]Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
- [38]Brandon Radosevich and John Halloran. Mcp safety audit: Lms with the model context protocol allow major security exploits. arXiv preprint arXiv:2504.03767, 2025.arxiv.org/abs/2504.03767
- [39]MCP Servers. Mcp servers, 2024. https://mcpservers.org.
- [40]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024.arxiv.org/abs/2402.03300
- [41]Jiawen Shi, Zenghui Yuan, Guiyao Tie, Pan Zhou, Neil Zhenqiang Gong, and Lichao Sun. Prompt Injection Attack to Tool Selection in LLM Agents. In Proceedings of the 33rd Network and Distributed System Security Symposium (NDSS), 2026a.arxiv.org/abs/2504.19793
- [42]Tianneng Shi, Kaijie Zhu, Zhun Wang, Yuqi Jia, Will Cai, Weida Liang, Haonan Wang, Hend Alzahrani, Joshua Lu, Kenji Kawaguchi, Basel Alomair, Xuandong Zhao, William Yang Wang, Neil Zhenqiang Gong, Wenbo Guo, and Dawn Song. Promptarmor: An essential baseline for prompt injection defenses, 2026b. URL https://openreview.net/forum?id=1eNXtOfK6T.
- [43]Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, et al. Openai gpt-5 system card. arXiv preprint arXiv:2601.03267, 2025.arxiv.org/abs/2601.03267
- [44]Guijin Son, Hyunwoo Ko, Hoyoung Lee, Yewon Kim, and Seung hyeok Hong. Llm-as-a-judge & reward model: What they can and cannot do. arXiv preprint arXiv:2409.11239, 2024.arxiv.org/abs/2409.11239
- [45]Hao Song, Yiming Shen, Wenxuan Luo, Leixin Guo, Ting Chen, Jiashui Wang, Beibei Li, Xiaosong Zhang, and Jiachi Chen. Beyond the protocol: Unveiling attack vectors in the model context protocol ecosystem. arXiv preprint arXiv:2506.02040, 2025.arxiv.org/abs/2506.02040
- [46]Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, and Furu Wei. Multi-lingual e5 text embeddings: A technical report. arXiv preprint arXiv:2402.05672, 2024.arxiv.org/abs/2402.05672
- [47]Zhiqiang Wang, Yichao Gao, Yanting Wang, Suyuan Liu, Haifeng Sun, Haoran Cheng, Guanquan Shi, Haohua Du, and Xiangyang Li. Mcptox: A benchmark for tool poisoning attack on real-world mcp servers. arXiv preprint arXiv:2508.14925, 2025.DOI
- [48]Zihan Wang, Rui Zhang, Yu Liu, Wenshu Fan, Wenbo Jiang, Qingchuan Zhao, Hongwei Li, and Guowen Xu. Mpma: Reference manipulation attack against model context protocol. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, pp. 35838–35846, 2026.
- [49]Wenpeng Xing, Zhonghao Qi, Yupeng Qin, Yilin Li, Caini Chang, Jiahui Yu, Changting Lin, Zhenzhen Xie, and Meng Han. Mcp-guard: A defense framework for model context protocol integrity in large language model applications. arXiv preprint arXiv:2508.10991, 2025.
- [50]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025a.arxiv.org/abs/2505.09388
- [51]Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V Le, Denny Zhou, and Xinyun Chen. Large language models as optimizers. In International Conference on Learning Representations, volume 2024, pp. 12028–12068, 2024.arxiv.org/abs/2309.03409
- [52]Haotong Yang, Yi Hu, Shijia Kang, Zh ouchen Lin, and Muhan Zhang. Number cookbook: Number understanding of language models and how to improve it. In International Conference on Learning Representations, volume 2025, pp. 3946–3984, 2025b. Preprint. Under Review.arxiv.org/abs/2411.03766
- [53]Wenkai Yang, Yankai Lin, Peng Li, Jie Zhou, and Xu Sun. Rethinking stealthiness of backdoor attack against nlp models. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 5543–5557, 2021.DOI
- [54]Yixuan Yang, Daoyuan Wu, and Yufan Chen. Mcpsbecnch: A systematic security benchmark and playground for testing model context protocols. arXiv preprint arXiv:2508.13220, 2025c.arxiv.org/abs/2508.13220
- [56]Dongsen Zhang, Zekun Li, Xu Luo, Xuannan Liu, Peipei Li, and Wenjun Xu. Mcp security bench (msb): Benchmarking attacks against model context protocol in llm agents. arXiv preprint arXiv:2510.15994, 2025.arxiv.org/abs/2510.15994
- [58]Shuli Zhao, Qinsheng Hou, Zihan Zhan, Yanhao Wang, Yuchong Xie, Yu Guo, Libo Chen, Shenghong Li, and Zhi Xue. Mind your server: A systematic study of parasitic toolchain attacks on the mcp ecosystem. arXiv preprint arXiv:2509.06572, 2025.
- [59]Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043, 2023.arxiv.org/abs/2307.15043



