Cross-Layer Compilation of MCP Tool Permission Declarations and the Enforceability Gap
The Model Context Protocol (MCP) lets large language model (LLM) agents call external tools, yet the protocol offers no way for a server to declare the permissions it needs, and each local server runs as an ordinary process whose behavior neither the model nor the client can constrain. Existing defenses mostly enforce permissions at a single layer and rarely state how much of a declared permission is actually enforced. This report proposes enforcing MCP tool permissions deterministically outside the model and reporting the enforcement gap layer by layer. We extend the AgentBound capability vocabulary with scopes, yielding permission atoms in 7 categories and 20 actions whose containment can be decided mechanically, and build monotonic risk grading and version comparison on top of them. We compile a single declaration into three layers, namely a protocol gateway, an OS sandbox (Landlock, seccomp and an egress proxy) and client configuration, and derive an enforceability matrix that labels every atom at every layer. Of the 20 scope forms in the matrix, 12 can be enforced exactly under at least one backend configuration, and 8 under none. The matrix also exposes a granularity mismatch between tool-level declarations and process-level enforcement, as well as conflicts between backends inside one process. We implement a prototype, permbridge, on Linux. Among five configurations, only ours blocked or detected all eight classes of over-privilege and injection cases (M1–M8); a head-to-head quantitative comparison with the official implementations of AgentBound, ToolHive and Progent in the same environment shows that none of them reaches the coverage of our configuration. In end-to-end experiments with 9 LLMs from 8 different vendors, the success rate of induced SSH private-key reads dropped from 38.9% (35/90) to 0% (0/90), whereas puppet attacks that stay within the callee server's legitimate permissions were not significantly reduced. None of 37 benign tasks was blocked, and the median per-call overhead was below 1 ms. Whether an induced call can be stopped depends on whether it crosses the permission boundary of the server being called; whatever cannot be enforced should be reported to the user. What's new in v2.0: Adds head-to-head quantitative evaluation against official AgentBound, ToolHive, and Progent implementations (M1–M10, MCP-Artifact, DVMS C.1–C.10, and latency/memory overhead including host runtime breakdown); expands cross-vendor LLM evaluation to 9 models across 8 vendors (90 trials per task); expands benign utility evaluation to 37 tasks across 6 official/reference MCP servers; and updates related work and references to 52 entries. Companion Code & Evaluation Suite: https://github.com/siweina/mcp-permbridge (tag v0.2.0)
Authors
- Minghui Liu (ORCID: https://orcid.org/0000-0002-6136-2094)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-01
- DOI
- https://doi.org/10.5281/zenodo.24704180
- Primary Topic
- Security and Verification in Computing
- Type
- preprint