arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.03580cs.CRcs.AI
收藏

不要轻信你所读到的:在误导性工具描述下理解和测量MCP行为

Don't believe everything you read: Understanding and Measuring MCP Behavior under Misleading Tool Descriptions

School of Computer Science and Technology(计算机科学与技术学院)

Zhihao Li, Boyang Ma, Xuelong Dai, Minghui Xu, Yue Zhang, Biwei Yan, Kun Li

AI总结:

研究揭示MCP协议中描述与代码不一致的问题,发现13%的服务器存在潜在安全风险,强调需加强透明度和审计

摘要:

模型上下文协议(MCP)使大语言模型能够通过自然语言描述调用外部工具,成为许多人工智能代理应用的基础。然而,MCP并未强制要求文档中的工具行为与实际代码执行保持一致,尽管MCP服务器通常拥有广泛的系统权限。这种差距引入了一个尚未被深入探索的安全风险。我们研究了外部呈现的工具描述与底层实现之间的一致性如何系统性地塑造智能代理的思维模型和决策行为。具体而言,我们首次对MCP生态系统中的描述-代码不一致进行了大规模研究。我们设计了一个自动静态分析框架,并将其应用于36个类别中的10240个真实MCP服务器。我们的结果表明,尽管大多数服务器高度一致,大约13%存在显著不一致,这可能允许未记录的特权操作、隐藏状态变异或未经授权的财务操作。我们进一步观察到在应用类别、流行程度和MCP市场中存在系统性差异。我们的发现表明,描述-代码不一致是基于MCP的AI代理中的具体且普遍的攻击面,这促使了未来代理生态系统中系统审计和更强透明度保证的必要性。

英文摘要:

The Model Context Protocol (MCP) enables large language models to invoke external tools through natural-language descriptions, forming the foundation of many AI agent applications. However, MCP does not enforce consistency between documented tool behavior and actual code execution, even though MCP Servers often run with broad system privileges. This gap introduces a largely unexplored security risk. We study how mismatches between externally presented tool descriptions and underlying implementations systematically shape the mental models and decision-making behavior of intelligent agents. Specifically, we present the first large-scale study of description-code inconsistency in the MCP ecosystem. We design an automated static analysis framework and apply it to 10,240 real-world MCP Servers across 36 categories. Our results show that while most servers are highly consistent, approximately 13% exhibit substantial mismatches that can enable undocumented privileged operations, hidden state mutations, or unauthorized financial actions. We further observe systematic differences across application categories, popularity levels, and MCP marketplaces. Our findings demonstrate that description-code inconsistency is a concrete and prevalent attack surface in MCP-based AI agents, and motivate the need for systematic auditing and stronger transparency guarantees in future agent ecosystems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑