MCP-Guard: A Multi-Stage Defense-in-Depth Framework for Securing Model Context Protocol in Agentic AI
Wenpeng Xing, Zhonghao Qi, Yupeng Qin, Yilin Li, Caini Chang, Jiahui Yu, Changting Lin, Zhenzhen Xie, Meng Han

TL;DR
MCP-GUARD is a multi-stage defense framework that enhances the security of LLMs interacting with external tools by detecting and mitigating prompt injection and other adversarial threats, supported by a new benchmark dataset.
Contribution
The paper introduces MCP-GUARD, a layered defense architecture with a novel detection pipeline, and MCP-ATTACKBENCH, a large benchmark for evaluating security in LLM-tool interactions.
Findings
Achieves 96.01% accuracy in identifying adversarial prompts.
Demonstrates effectiveness of multi-stage detection in reducing security vulnerabilities.
Provides a comprehensive benchmark for future research in LLM security.
Abstract
While Large Language Models (LLMs) have achieved remarkable performance, they remain vulnerable to jailbreak. The integration of Large Language Models (LLMs) with external tools via protocols such as the Model Context Protocol (MCP) introduces critical security vulnerabilities, including prompt injection, data exfiltration, and other threats. To counter these challenges, we propose MCP-GUARD, a robust, layered defense architecture designed for LLM-tool interactions. MCP-GUARD employs a three-stage detection pipeline that balances efficiency with accuracy: it progresses from lightweight static scanning for overt threats and a deep neural detector for semantic attacks, to our fine-tuned E5-based model which achieves 96.01\% accuracy in identifying adversarial prompts. Finally, an LLM arbitrator synthesizes these signals to deliver the final decision. To enable rigorous training and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
