From Tool Orchestration to Code Execution: A Study of MCP Design Choices
On the map: LLM agents and tool use → Tool learning and function calling
Abstract (arXiv)
Model Context Protocols (MCPs) provide a unified platform for agent systems to discover, select, and orchestrate tools across heterogeneous execution environments. As MCP-based systems scale to incorporate larger tool catalogs and multiple concurrently connected MCP servers, traditional tool-by-tool invocation increases coordination overhead, fragments state management, and limits support for wide-context operations. To address these scalability challenges, recent MCP designs have incorporated code execution as a first-class capability, an approach called Code Execution MCP (CE-MCP). This enables agents to consolidate complex workflows, such as SQL querying, file analysis, and multi-step data transformations, into a single program that executes within an isolated runtime environment. In this work, we formalize the architectural distinction between context-coupled (traditional) and context-decoupled (CE-MCP) models, analyzing their fundamental scalability trade-offs. Using the MCP-Bench framework across 10 representative servers, we empirically evaluate task behavior, tool utilization patterns, execution latency, and protocol efficiency as the scale of connected MCP servers and available tools increases, demonstrating that while CE-MCP significantly reduces token usage and execution latency, it introduces a vastly expanded attack surface. We address this security gap by applying the MAESTRO framework, identifying sixteen attack classes across five execution phases-including specific code execution threats such as exception-mediated code injection and unsafe capability synthesis. We validate these vulnerabilities through adversarial scenarios across multiple LLMs and propose a layered defense architecture comprising containerized sandboxing and semantic gating. Our findings provide a rigorous roadmap for balancing scalability and security in production-ready executable agent workflows.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 24 of its 36 references that are in the map. First posted on arXiv 17 Feb 2026.
Builds on
24 of 36 references.
Closest ancestors · 4
Same direction, newest first
- 2026MCP-Atlas: A Large-Scale Benchmark for Tool-Use Competency with Real MCP Servers31 Jan
- 2025MCP-Bench: Benchmarking Tool-Using LLM Agents with Complex Real-World Tasks via MCP Servers28 Aug
- 2025LiveMCPBench: Can Agents Navigate an Ocean of MCP Tools?3 Aug
- 2024EASYTOOL: Enhancing LLM-based Agents with Concise Tool Instruction11 Jan
Other references · 20
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agentscited by 476
- 2024ToolSandbox: A Stateful, Conversational, Interactive Evaluation Benchmark for LLM Tool Use Capabilitiescited by 272
- 2025Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directionscited by 257
- 2025Progent: Securing AI Agents with Privilege Controlcited by 121
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agentscited by 87
- 2025MCPTox: A Benchmark for Tool Poisoning Attack on Real-World MCP Serverscited by 63
- 2025Model Context Protocol (MCP) at First Glance: Studying the Security and Maintainability of MCP Serverscited by 62
- 2025MCP Safety Audit: LLMs with the Model Context Protocol Allow Major Security Exploitscited by 61
- 2025Enterprise-Grade Security for the Model Context Protocol (MCP): Frameworks and Mitigation Strategiescited by 42
- 2024m&m's: A Benchmark to Evaluate Tool-Use for multi-step multi-modal Taskscited by 38
- 2025MCPMark: A Benchmark for Stress-Testing Realistic and Comprehensive MCP Usecited by 37
8 more
- 2025MCP-SafetyBench: A Benchmark for Safety Evaluation of Large Language Models with Real-World MCP Serverscited by 28
- 2025Attractive Metadata Attack: Inducing LLM Agents to Invoke Malicious Toolscited by 23
- 2025Securing the Model Context Protocol (MCP): Risks, Controls, and Governancecited by 22
- 2025MCPXKIT: The Unified Toolkit for Analyzing Model Context Protocol Securitycited by 21
- 2025We Urgently Need Privilege Management in MCP: A Measurement of API Usage in MCP Ecosystemscited by 15
- 2025Systematization of Knowledge: Security and Safety in the Model Context Protocol Ecosystemcited by 14
- 2025Fault-Tolerant Sandboxing for AI Coding Agents: A Transactional Approach to Safe Autonomous Executioncited by 7
- 2025CodeMem: Architecting Reproducible Agents via Dynamic MCP and Procedural Memorycited by 3
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2026From Tool Connection to Execution Control: Benchmarking Security Invariants in MCP-Style Agent Runtimes
- 2026Separating Intelligence from Execution: A Workflow Engine for the Model Context Protocol
- 2026Rethinking MCP Security: A Large-Scale Study of Runtime MCP Servers and Security Scanner Reliability
- 2026Enhancing Model Context Protocol (MCP) with Context-Aware Server Collaboration
- 2025ScaleMCP: Dynamic and Auto-Synchronizing Model Context Protocol Tools for LLM Agents
- 2025ETOM: A Five-Level Benchmark for Evaluating Tool Orchestration within the MCP Ecosystem
- 2026Don't believe everything you read: Understanding and Measuring MCP Behavior under Misleading Tool Descriptions
- 2025LiveMCP-101: Stress Testing and Diagnosing MCP-enabled Agents on Challenging Queries