# From Tool Connection to Execution Control: Benchmarking Security Invariants in MCP-Style Agent Runtimes

DevFeed: [From Tool Connection to Execution Control: Benchmarking Security Invariants in MCP-Style Agent Runtimes](<https://devfeed.tech/articles/from-tool-connection-to-execution-control-benchmarking-security-invariants-in-mcp-style-agent-runtimes-126890.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2606.29073>)

Author: Ting Liu

Published: 2026-11-10T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Agent Harness](<https://devfeed.tech/topics/agent-harness.md>), [LLM security](<https://devfeed.tech/topics/llm-security.md>), [test](<https://devfeed.tech/topics/test.md>), [Multi-step AI processes](<https://devfeed.tech/topics/multi-step-ai-processes.md>)

Tags: [adversarial](<https://devfeed.tech/tags/adversarial.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agent-runtimes](<https://devfeed.tech/tags/agent-runtimes.md>), [agents](<https://devfeed.tech/tags/agents.md>), [argument](<https://devfeed.tech/tags/argument.md>), [backend](<https://devfeed.tech/tags/backend.md>), [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [block](<https://devfeed.tech/tags/block.md>), [call](<https://devfeed.tech/tags/call.md>), [canonical](<https://devfeed.tech/tags/canonical.md>), [code](<https://devfeed.tech/tags/code.md>), [compare](<https://devfeed.tech/tags/compare.md>), [complete](<https://devfeed.tech/tags/complete.md>), [control](<https://devfeed.tech/tags/control.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [execution](<https://devfeed.tech/tags/execution.md>), [invariants](<https://devfeed.tech/tags/invariants.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [runtimes](<https://devfeed.tech/tags/runtimes.md>), [security](<https://devfeed.tech/tags/security.md>), [tool](<https://devfeed.tech/tags/tool.md>)

## AI overview

The study reports that eight explicit execution-layer invariants can secure MCP-style tool execution in both a centralized runtime (HCP) and a gateway/server ACL (B3): both blocked 18 modeled violations and completed 25 workflows. Boundary tests show limits and tradeoffs: per-call grants stopped ungranted writes but not secrets passed as ordinary arguments to authorized sinks; session source budgets blocked that copying but refused unrelated actions, while explicit handle pipes or sealed reads blocked handle-mediated exfiltration and preserved unrelated workflows. On 24 held-out AgentDojo tasks, both controllers denied attacker calls, but strict grants also denied 40 non-attacker calls, and approve-all replay reached four new attacker goals. HCP added 0.13 ms per workflow outside MCP calls and retained 7.7 MB over 1,000 workflows, compared with B3's 0.7 MB.

## Source excerpt

arXiv:2606.29073v2 Announce Type: replace Abstract: Tool-connected agents need execution-time invariants that hold even when a model follows an adversarial instruction. We formulate eight execution-layer invariants (I1-I8) covering structured authority, canonical resource resolution, principal and delegation binding, handle lifecycle, explicit source-to-target transfer, request-correlated denial evidence, and single-use approval state. To test whether these protections require a centralized runtime or follow from the invariants themselves, we compare HCP, an in-memory runtime with managed handles and tasks, against an independent gateway/server ACL (B3) enforcing the same I1-I8 contract over identical grants and labels. Both block 18 modeled violations and complete 25 workflows, while 16 source-code ablations pinpoint the checks responsible. Outside our scripted corpus, we test three boundaries. First, on 24 held-out AgentDojo tasks with live models, DeepSeek reaches attacker goals in 4 direct sessions while both controllers deny every attacker call; however, strict reference-derived grants also deny 40 non-attacker calls, and first-divergence replay under an approve-all control reaches 4 new attacker goals. Second, across 132 conditions on unmodified ChainCaps and Playwright MCP servers, per-call grants block ungranted writes but cannot stop a secret passed as an ordinary argument to an authorized sink; session source budgets block that copy but refuse unrelated actions; and explicit handle pipes or sealed reads block handle-mediated exfiltration while preserving unrelated workflows. Third, on a matched MCP backend, HCP adds 0.13 ms per workflow outside MCP calls while retaining 7.7 MB of state over one thousand workflows versus 0.7 MB for B3. Identical decisions across HCP and B3 show that enforcing explicit I1-I8 invariants at controlled entrances secures tool execution across centralized and gateway designs.