attack 2025

Automatic Red Teaming LLM-based Agents with Model Context Protocol Tools

Ping He 1, Changjiang Li 2, Binbin Zhao 1, Tianyu Du 1, Shouling Ji 1

6 citations · 68 references · arXiv

α

Published on arXiv

2509.21011

Insecure Plugin Design

OWASP LLM Top 10 — LLM07

Prompt Injection

OWASP LLM Top 10 — LLM01

Key Finding

AutoMalTool successfully generates malicious MCP tools that manipulate the behavior of mainstream LLM-based agents while bypassing current detection defenses.

AutoMalTool

Novel technique introduced


The remarkable capability of large language models (LLMs) has led to the wide application of LLM-based agents in various domains. To standardize interactions between LLM-based agents and their environments, model context protocol (MCP) tools have become the de facto standard and are now widely integrated into these agents. However, the incorporation of MCP tools introduces the risk of tool poisoning attacks, which can manipulate the behavior of LLM-based agents. Although previous studies have identified such vulnerabilities, their red teaming approaches have largely remained at the proof-of-concept stage, leaving the automatic and systematic red teaming of LLM-based agents under the MCP tool poisoning paradigm an open question. To bridge this gap, we propose AutoMalTool, an automated red teaming framework for LLM-based agents by generating malicious MCP tools. Our extensive evaluation shows that AutoMalTool effectively generates malicious MCP tools capable of manipulating the behavior of mainstream LLM-based agents while evading current detection mechanisms, thereby revealing new security risks in these agents.


Key Contributions

  • AutoMalTool: an automated framework for generating malicious MCP tools targeting LLM-based agents
  • Systematic red teaming methodology that moves beyond proof-of-concept tool poisoning to automated attack generation
  • Empirical demonstration that generated malicious tools manipulate mainstream LLM agents while evading existing detection mechanisms

🛡️ Threat Analysis


Details

Domains
nlp
Model Types
llm
Threat Tags
inference_timetargetedblack_box
Applications
llm-based agentsmcp tool-integrated systems