arXiv:2506.13666cs.LGcs.AI2025-06被引 36

警惕MCP代理系统中的第三方安全风险,防范外部服务恶意攻击。

We Should Identify and Mitigate Third-Party Safety Risks in MCP-Powered Agent Systems

  • 构建可控框架,系统测试MCP代理中的安全漏洞。
  • 实验证明第三方服务可严重破坏代理行为,防御难度大。
  • 呼吁开展红队测试、安全评估等研究,共建安全生态。

大语言模型(LLM)正进入以环境反馈驱动的学习时代,强化学习与工具调用代理的兴起催生了模型上下文协议(MCP),定义了LLM与外部服务(如API和数据)交互的标准。然而,随着MCP成为主流,其引入的第三方服务带来新的安全风险:这些服务不受开发者控制,可能具有恶意动机,利用漏洞或破坏用户-代理交互。本文通过三个部分论证该问题:首先,构建一个可控框架用于检测MCP代理系统的安全缺陷;其次,开展初步实验,证明此类风险真实存在且难以防御;最后,提出建设安全MCP代理系统的路线图,呼吁开展红队测试、安全化LLM开发、安全评估、数据积累、服务防护及生态建设等研究。代码已开源。

原文摘要 · Abstract (English)

The development of large language models (LLMs) has entered in a experience-driven era, flagged by the emergence of environment feedback-driven learning via reinforcement learning and tool-using agents. This encourages the emergenece of model context protocol (MCP), which defines the standard on how should a LLM interact with external services, such as \api and data. However, as MCP becomes the de facto standard for LLM agent systems, it also introduces new safety risks. In particular, MCP introduces third-party services, which are not controlled by the LLM developers, into the agent systems. These third-party MCP services provider are potentially malicious and have the economic incentives to exploit vulnerabilities and sabotage user-agent interactions. In this position paper, we advocate the research community in LLM safety to pay close attention to the new safety risks issues introduced by MCP, and develop new techniques to build safe MCP-powered agent systems. To establish our position, we argue with three key parts. (1) We first construct \framework, a controlled framework to examine safety issues in MCP-powered agent systems. (2) We then conduct a series of pilot experiments to demonstrate the safety risks in MCP-powered agent systems is a real threat and its defense is not trivial. (3) Finally, we give our outlook by showing a roadmap to build safe MCP-powered agent systems. In particular, we would call for researchers to persue the following research directions: red teaming, MCP safe LLM development, MCP safety evaluation, MCP safety data accumulation, MCP service safeguard, and MCP safe ecosystem construction. We hope this position paper can raise the awareness of the research community in MCP safety and encourage more researchers to join this important research direction. Our code is available at https://github.com/littlelittlenine/SafeMCP.git.

LLM安全MCP协议第三方风险代理系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。