Skip to content

GatewayBench: A unified capability and safety evaluation platform for MCP gatewaysGatewayBench: Unified Capability and Security Evaluation Platform for MCP Gateways

arXiv· arXiv:2610.23449· Yitian Zheng, Zhaorun Chen, Haoyu Li, Bo LiTsinghua University; University of Chicago; University of Illinois Urbana-ChampaignIndexed by this site · 2026-10-19· Originally publishedEvaluation

Quick read

Evaluation and benchmarks

Based on the paper PDF (AI-generated); refer to the original

7 MCP gateways, OpenAISDK+GPT-5.4, 0 noise: layered average ASRind 30.9%, flat 47.2%.

Questions
When organizations deploy at scale, the MCP gateway determines the tool surface the agent sees. The authors state that more tools reduce task performance, increase overhead, and expand malicious tool exposure, but that previously there was no systematic evaluation of how gateway design affects capability, efficiency and safety.
Methods
GATEWAYBENCH contains 524 tasks and 11118 real tools. Gateways are divided into flat (all tools given in advance) and layered (discovery meta-tools retrieve on demand). The main experiment injects up to 1500 irrelevant tools on 450 tasks from DTAP, and reports TSR and ASR using rule-based judging that checks the final state.
Experiments and results
0 noise, OpenAI SDK+GPT-5.4: layered average ASRind 30.9%, flat 47.2%. At 1500 noise tools, flat tokens per turn go from 8.3k to 233.3k, layered from 9.1k to 12.6k. Under weak models layered benign TSR is lower.
Limitations and future work
The paper does not specifically discuss limitations. The experiments include 7 gateways, GPT-5.1 and GPT-5.4, two harnesses; the main experiment is a single run of 450 tasks on DTAP, with 0 to 1500 noise tools. Appendix A.1 contains only 3 gateways. The paper does not report the name of the LLM used for domain filtering.
Experimental setupGPT-5.1、GPT-5.4 · GATEWAYBENCH、DecodingTrust-Agent Platform (DTAP) et al. · TSR、ASR et al.
Evaluated models
GPT-5.1GPT-5.4
Benchmarks
GATEWAYBENCHDecodingTrust-Agent Platform (DTAP)MCP-Universe
Metrics
TSRASRASRdASRindASRtoolASRenvTSRindtask timetokens per turntool-call latency
AI summaryThe researchers propose GatewayBench, a unified capability and safety evaluation framework and benchmark for MCP gateways, comprising 524 tasks across six domains and 11,118 tools from 251 real MCP servers. The benchmark divides gateway architectures into flat and hierarchical types and injects task-irrelevant tools into the agent environment to simulate large-scale deployment. After testing benign and adversarial tasks on seven deployed MCP gateways and multiple agent configurations, results show that different gateway designs differ markedly in task completion, tool-use efficiency and attack resistance, and that these effects are strongly related to the underlying model and agent harness.

The researchers propose GatewayBench, a unified capability and safety evaluation framework and benchmark for MCP gateways, comprising 524 tasks across six domains and 11,118 tools from 251 real MCP servers. The benchmark divides gateway architectures into flat and hierarchical types and injects task-irrelevant tools into the agent environment to simulate large-scale deployment. After testing benign and adversarial tasks on seven deployed MCP gateways and multiple agent configurations, results show that different gateway designs differ markedly in task completion, tool-use efficiency and attack resistance, and that these effects are strongly related to the underlying model and agent harness.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    What is to be evaluated is how MCP gateway design changes task success, overhead and injection resistance.

    How MCP gateways change agents' task completion, invocation overhead, and resilience to injection attacks.

    • Deployment scenario: The authors state that in production environments multiple agents connect to different MCP servers, and managing endpoints, credentials, and upstream changes for each is hard to sustain. The gateway thus becomes a unified endpoint between the reasoning model and external services in the harness.
    • Existing shortcomings: The authors state that as tools increase, agents may struggle to discover and select tools, task performance drops, computational overhead rises, and they are exposed to more malicious tools. The authors state that no prior work systematically studied the impact of gateways on capability, efficiency, and security, and state that this paper is the first such unified evaluation.
    • Core division: A flat gateway provides all tools on each interaction; a hierarchical gateway provides only a discovery meta-tool, and the agent retrieves on demand.
    • Evaluation content: GATEWAYBENCH contains 524 tasks across 6 domains, and 11118 real tools across 251 MCP servers. After injecting irrelevant noise tools, TSR, ASR, task time, and tool invocation latency are measured with rule-based judges that check the final environment state.
    • Security setting: Malicious tasks come from DTAP. Direct injection goes through the user prompt (ASRd); indirect injection goes through the tool surface (ASRind), further divided into tool injection and environment injection. The paper does not state whether the attacker's knowledge is white-box or black-box.
  2. What related research exists?

    Existing benchmarks mostly evaluate agents under fixed tool exposure; the authors state that no work has yet systematically compared gateway designs.

    Related work falls into three lines. The authors state that they do not systematically compare the joint impact of gateway design on capability, efficiency and safety.

    • Gateways and scalable tool access: Errico et al. (2025), Hou et al. (2026) and Stein (2026) are used by the authors as background, namely that gateways aggregate and govern the tools exposed to agents. The authors state that giving the full tool list to the agent is the default practice of many harnesses and gateways, and name OpenClaw (2026) and LiteLLM (BerriAI, 2023). The on-demand discovery side includes RAG-MCP (Gan and Sun, 2025), MCP-Zero (Fei et al., 2025), ScaleMCP (Lumer et al., 2025) and Dynamic ReAct (Gaurav et al., 2025). The authors state that relative to flat baselines, these methods reduce the tools exposed per query and attempt to maintain selection accuracy as the tool set grows.
    • MCP tool-use benchmarks: MCP-Universe (Luo et al., 2025), LiveMCPBench (Mo et al., 2025) and MCPMark (Wu et al., 2026) evaluate task success and tool orchestration on large-scale real MCP tool sets. MCP-Atlas (Bandi et al., 2026), MCP-Bench (Wang et al., 2025) and MCPAgentBench (Liu et al., 2026) mix task-relevant tools with plausible distractors. The authors state that these benchmarks target agent capability under fixed tool exposure schemes. Xu et al. (2026) discuss the impact of tool architecture on coding agent consistency and efficiency; the paper does not treat it as an experimental baseline.
    • Safety and injection evaluation: AgentDojo (Debenedetti et al., 2024), InjecAgent (Zhan et al., 2024), Agent Security Bench (Zhang et al., 2025b) and DTAP (Chen et al., 2026) evaluate prompt injection and related attacks in untrusted tools and environments. MCPTox (Wang et al., 2026), MSB (Zhang et al., 2025a) and MCP-SafetyBench (Zong et al., 2025) measure the robustness of MCP agents to tool poisoning and injection. The paper only describes these works and does not criticize them individually.
    • Comparison and data: The experimental comparison is 7 deployed gateways, grouped into flat and layered, not a separate attack model. Tasks come from DTAP and MCP-Universe, and noise tools come from Docker MCP Hub and Arcade.dev.

    The authors place this paper at the gateway layer: existing benchmarks evaluate agents under fixed exposure, whereas this paper evaluates how gateways simultaneously change capability, efficiency and safety. The authors state that GATEWAYBENCH is the first such unified evaluation framework.

  3. How does the paper address this problem?

    GATEWAYBENCH uses 524 tasks and 11118 tools to compare flat and layered gateways.

    The authors use GATEWAYBENCH to divide gateways into flat and hierarchical, and measure task success, overhead, and injection resistance on a scalable tool surface. The main experiments do not change the gateways' default configurations.

    Gateway classification and implementation

    • Flat: All tools are combined into one list, with the server identifier added to tool names to prevent name collisions. LiteLLM and Lunar MCPX sort by server name; AgentCore additionally has a search tool that does semantic matching by query (Table 1).
    • Hierarchical: Only a discovery meta-tool is exposed, and tools are fetched after the query. Figure 2 is hierarchical discovery, or keyword search by task intent. Enkrypt, Strata, and Bifrost use hierarchical discovery, semantic search, and a virtual file system plus code invocation, respectively.
    • Meta-tools: Bifrost's are executeToolCode, getToolDocs, listToolFiles, readToolFile; servers are made into .pyi stubs, and parameter descriptions are truncated. Strata's are discover_server_actions, get_action_details, execute_action, search_documentation, handle_auth_failure (Appendix A.4).
    • Scope and differences: The introduction states 6 open-source and 1 closed-source. In Table 1, AgentCore is not open-source, and Enkrypt and Bifrost are △, with the table note defining △ as partial or limited support. The authors write that Microsoft MCP Gateway and Unla are out of scope. Enkrypt's returns contain a large amount of irrelevant metadata, and the default entry point often times out when the tool set is large (Appendix A.4).

    How tasks are sampled

    • DTAP: CRM, Finance, Travel. From each domain, 50 benign, 50 direct-attack, and 50 indirect-attack tasks are sampled uniformly at fixed intervals, 450 in total. These 450 are the main experiment tasks.
    • MCP-Universe: Repository Management 26, Browser Automation 23, Location Navigation 25. The authors manually removed tasks that were too easy or too hard for the tested agents, leaving 74. The main experiment does not use these 74.
    • Total: 6 domains, 524 tasks. The judging follows the original rule-based judging on both sides, without training a separate judge model.

    Noise tool pool

    • Collection: Docker MCP Hub and Arcade.dev. Descriptions, JSON Schemas, and parameter descriptions are kept, totaling 251 servers and 11118 tools.
    • mock: Only the real schema is registered. When invoked, it returns a standard error and does not execute real operations, to avoid side effects and authentication.
    • Filtering: The authors use an unnamed LLM to summarize domains by goal, typical flow, related servers, or tool category, keeping only servers with no semantic overlap, so that mock failures are not counted as task failures caused by the gateway. Given a noise count N, a fixed subset is deterministically drawn from the filtered pool.

    Protocol and success determination

    • Scale: Each task is injected with 0, 500, 1000, or 1500 irrelevant tools.
    • Agents: OpenAI Agents SDK with GPT-5.1 as the baseline; the other two configurations are the same SDK with GPT-5.4, and OpenClaw with GPT-5.1. Only one factor is changed at a time.
    • Metrics: TSR is the proportion of benign tasks correctly completed; ASR is the proportion of injected malicious goals achieved. ASRd goes through the user prompt, ASRind goes through the tool surface, further divided into tool injection and environment injection. TSRind is the task success rate under indirect attacks. Task time, tokens per turn, and tool invocation latency are also recorded.
    • Determination: DTAP checks the final environment state, with separate success criteria for benign completion and attack goals. MCP-Universe does execution checks, for example whether a branch exists in repository management. The main experiment is run only once due to time and cost.
  4. What experiments did the paper conduct?

    The authors state that the layered gateway has lower indirect ASR, and that this gap mainly comes from tool injection rather than environment injection.

    The main experiment compares 7 gateways on 450 tasks from DTAP, a single run.

    Experimental setup

    • Gateways: flat are AgentCore, Agentgateway, LiteLLM, Lunar MCPX; layered are Enkrypt, Strata, Bifrost. Default configuration unless otherwise stated (Section 5.1, Table 1).
    • Agents: GPT-5.1 and GPT-5.4; harnesses are OpenAI Agents SDK and OpenClaw. The three configurations are SDK plus GPT-5.1, SDK plus GPT-5.4, OpenClaw plus GPT-5.1.
    • Tasks: three domains with 50 benign, 50 direct attack, 50 indirect attack each. Noise tools 0, 500, 1000, 1500, deterministically sampled after domain filtering from 11118 tools.
    • Metrics: TSR is the proportion of benign tasks correctly completed; ASR is the proportion of malicious goals achieved. ASRd goes through the user prompt, ASRind goes through the tool surface, further split into ASRtool and ASRenv. Also TSRind, task time, tokens per turn, tool call latency.
    • Judging: rule-based judging checks the final environment state or execution checkpoints, not LLM scoring. The paper does not state a threshold. The main experiment is run only once due to time and cost (Section 5.1).
    • Appendix: The 74 tasks from MCP-Universe do not enter Table 2 and Table 3, and are used only in Appendix A.1.

    Main results

    The table below is the architecture mean from Table 2 at 0 noise tools (percentages). Mean is the average of the gateways within that architecture, not weighted by task.

    Swipe horizontally to read the table

    Agent configurationFlat TSRLayered TSRFlat ASRindLayered ASRind
    OpenAI SDK + GPT-5.175.3%47.5%60.5%19.6%
    OpenAI SDK + GPT-5.487.2%85.1%47.2%30.9%
    OpenClaw + GPT-5.186.7%71.8%42.5%15.6%
    • Authors' interpretation: The authors state that under all three configurations the layered gateways have lower indirect attack success rates; on weak models this trades away part of the benign task success.
    • Changing models: The authors state that under GPT-5.4 all seven gateways have TSR above 80%. Going from GPT-5.4 down to GPT-5.1, the layered average TSR drops 37.6 percentage points, and flat drops 11.9 percentage points.
    • Exception: With SDK plus GPT-5.1, enkrypt's TSR is 23.3%, ASRd is 15.3%, ASRind is 11.3%. The authors state that this lowest ASR group is capability collapse: the agent did not discover tools following the layered steps, and instead called hallucinated tools (Table 2 footnote, Appendix A.4). The authors state that after switching to OpenClaw, all 7 gateways' TSR rises and 6 gateways' ASRind falls.

    Noise tool scale

    • Mean changes: Table 3 from 0 to 1500 noise tools, the authors state that the flat mean drops 10.0, 3.9, 6.0 percentage points across the three configurations, and layered drops at most 5.5 percentage points. Under GPT-5.4 layered goes from 85.1% to 85.6%, which the authors state is no drop.
    • Crossover: The authors state that with GPT-5.4, at 0 noise flat leads by 2.1 percentage points, and at 1500 noise it trails by 2.3 percentage points. The authors believe flat puts every noise tool into the context, while layered only exposes the discovery results.
    • Single gateway: With SDK plus GPT-5.1, at 1500 noise, litellm's TSR is 57.3%, agentgateway is 72.0%. Under the same configuration enkrypt's four scales are 23.3%, 18.0%, 22.7%, 20.7%.

    Attack types

    • Direct injection: Of the 150 indirect tasks, 48 are environment injection and 102 are tool injection (Appendix A.2). The authors state that gateways shape the tool surface rather than the user prompt, so they should not dominate direct injection; under GPT-5.4 the two ASRd means are 44.7% and 44.2%.
    • OpenClaw: Figure 4, GPT-5.1. The authors state that tool injection separates the two classes at every noise scale, with the flat mean going from 51.5% to 40.6%, and layered always near 16%; the environment injection means of the two classes are close to each other. The main text does not give the per-point numbers for environment injection in that figure.
    • The other two configurations: Appendix A.2 writes that under GPT-5.4 the flat tool injection mean goes from 53.9% to 45.1%, and layered is near 31%; for environment injection the authors state that each scale differs by within about 3 percentage points. The authors state that within layered it is roughly bifrost 20%, strata 33%, enkrypt 41%. With SDK plus GPT-5.1, at 0 noise, environment injection is flat 35.9%, layered 15.3%. The authors believe this comes from the weak model, not the gateway, because the gateway does not control what the environment returns; and state that the low ASR of layered in this configuration is likewise capability collapse, not safety.

    Overhead

    • token: Figure 5, SDK plus GPT-5.4. The flat mean goes from 8.3k to 233.3k per turn, layered from 9.1k to 12.6k. The authors believe flat carries all tool schemas every turn.
    • Time: The authors state that at 0 noise flat is faster, 20.8 seconds versus 30.1 seconds; the advantage reverses between 500 and 1000 tools; at 1500 flat is 64.1 seconds and layered 38.7 seconds.
    • Call latency: Appendix A.3 states that the token curves of the two models are almost identical, and tokens per turn are determined by the number of noise tools. A flat single call is about 0.6 seconds and roughly constant; strata about 0.2 seconds, bifrost about 0.1 seconds; enkrypt under GPT-5.4 goes from 2.6 seconds to 5.4 seconds. The authors state that they found its meta-tool returns a large list each time.

    Other ablations and analyses

    • Appendix A.1, SDK plus GPT-5.1, noise 158/254/358: agentgateway TSR 52.3%/52.0%/54.0% (Score 0.73/0.66/0.75); strata 44.7%/46.0%/43.7% (Score 0.68/0.68/0.68); enkrypt 34.7%/36.0%/23.3% (Score 0.60/0.62/0.52). The authors state that they do not over-interpret this enkrypt point.
    • Table 5, number of times AgentCore search is called out of 1800 runs per agent type: SDK plus GPT-5.1 is 11, SDK plus GPT-5.4 is 19, OpenClaw plus GPT-5.1 is 1. The authors speculate that when the full list is already visible, search has limited use.
    • Appendix A.4 has no separate success rate. The authors state that after Bifrost truncates tool descriptions, the agent cannot see the malicious information in indirect malicious tasks, thereby lowering ASR; GPT-5.1 on Strata often skips discovery and calls hallucinated tools.
  5. What are some points that can be further explored?

    The paper does not have a dedicated section on limitations or future directions.

    Limitations and future directions noted by the authors

    The paper does not specifically discuss limitations. The Conclusion writes that gateways should be designed and evaluated together with other harness components, but does not frame this as future work, nor does it list shortcomings.

    Experimental coverage

    • Gateways: The main experiments are AgentCore, Agentgateway, LiteLLM, Lunar MCPX, Enkrypt, Strata, Bifrost, with default configurations (Section 3, 5.1, Table 1).
    • Agents: GPT-5.1, GPT-5.4, and OpenAI Agents SDK, OpenClaw. The three configurations are SDK plus GPT-5.1, SDK plus GPT-5.4, OpenClaw plus GPT-5.1 (Section 5.1).
    • Tasks and repetitions: The main results come from DTAP's 450 tasks, with noise tool counts of 0, 500, 1000, 1500, single run (Section 5.1). Judging is rule-based checking of the final environment state or execution checkpoints; the paper does not report LLM judging, human agreement, or significance tests (Section 4.1, 5.1).
    • Appendix and out of scope: The gateways in Appendix A.1 are agentgateway, enkrypt, strata, with noise tools 158, 254, 358, SDK plus GPT-5.1. The paper writes that Microsoft MCP Gateway and Unla are out of scope (Section 3).
    • Unnamed model: An LLM was used for domain filtering, and the paper does not report its name (Section 4.2).
  6. Summarize the main content of the paper

    The authors state that the gateway, model, and harness should be chosen together: on large tool sets hierarchical is more injection-resistant, on small tool sets flat is more time-saving.

    GATEWAYBENCH is used to compare the impact of MCP gateways on agent task success, overhead and injection resistance.

    • Question: As tools grow in number, how does spreading out all tools in advance versus using meta-tools to discover on demand change completion rate, token and latency, and resilience to direct prompt injection and indirect tool and environment injection.
    • Approach: 7 deployed gateways under the same rule-based judging. The main experiment is 450 tasks from DTAP, covering CRM, Finance, Travel, injecting 0 to 1500 irrelevant tools. Models are GPT-5.1 and GPT-5.4, harnesses are OpenAI Agents SDK and OpenClaw. Noise tools come from 11118 real definitions from 251 servers, and only return errors when called.
    • 0 noise, SDK plus GPT-5.1: flat TSR 75.3%, layered 47.5%, ASRind 60.5% and 19.6%. enkrypt's TSR is 23.3%, and the authors state that its low ASR comes from incomplete tool discovery.
    • Switching to GPT-5.4: the two TSRs are 87.2% and 85.1%, ASRind 47.2% and 30.9%. Direct injection ASRd is 44.2% and 44.7%, and the authors state that gateways barely distinguish direct injection.
    • More tools: at 1500 noise, GPT-5.4, flat TSR is 83.3%, layered 85.6%; tokens per turn flat goes from 8.3k to 233.3k, layered from 9.1k to 12.6k. At 0 noise the time is flat 20.8 seconds, layered 30.1 seconds, and at 1500 it is 64.1 seconds versus 38.7 seconds. With OpenClaw plus GPT-5.1, all 7 gateways' TSR is higher than the corresponding SDK, and 6 gateways' ASRind is lower.
    • Authors' conclusion: When the tool set is small and fewer interaction turns are wanted, flat gateways are simpler; when the tool set is large and the model is stronger, layered gateways are more resistant to tool injection, and tokens do not rise linearly with noise tools. Gateways should be chosen together with the model and harness.
Read originalarxiv.org