Large Language Models (LLMs) have evolved into AI agents that interact with external tools and environments to perform complex tasks. The Model Context Protocol (MCP) has become the de facto standard for connecting agents with such resources, but security has lagged behind: thousands of MCP servers execute with unrestricted access to host systems, creating a broad attack surface. In this paper, we introduce AgentBound, the first access control framework for MCP servers. AgentBound combines a declarative policy mechanism, inspired by the Android permission model, with a policy enforcement engine that contains malicious behavior without requiring MCP server modifications. We build a dataset containing the 296 most popular MCP servers, and show that access control policies can be generated automatically from source code with 80.9% accuracy. We also show that AgentBound blocks the majority of security threats in several malicious MCP servers, and that the policy enforcement engine introduces negligible overhead. Our contributions provide developers and project managers with a foundation for securing MCP servers while maintaining productivity, enabling researchers and tool builders to explore new directions for declarative access control and MCP security.
翻译:大型语言模型(LLMs)已演变为与外部工具和环境交互以执行复杂任务的AI智能体。模型上下文协议(MCP)已成为连接智能体与这些资源的事实标准,但安全性却滞后:数千个MCP服务器在不受限制地访问主机系统的情况下运行,形成了广泛的攻击面。本文首次提出用于MCP服务器的访问控制框架AgentBound。AgentBound结合了受Android权限模型启发的声明式策略机制,以及无需修改MCP服务器即可遏制恶意行为的策略执行引擎。我们构建了包含296个最流行MCP服务器的数据集,并证明可从源代码自动生成准确率达80.9%的访问控制策略。我们还表明AgentBound能够阻止多个恶意MCP服务器中的大多数安全威胁,且策略执行引擎引入的开销可忽略不计。我们的贡献为开发者和项目经理在保障MCP服务器安全的同时维持生产力提供了基础,并为研究人员和工具开发者探索声明式访问控制与MCP安全的新方向创造了条件。