Large language model (LLM) applications increasingly act as agents that select and invoke external tools. The Model Context Protocol (MCP) standardizes this interaction by allowing clients to compose tools advertised by multiple servers. However, tool metadata used for discovery and selection is not, by itself, necessarily bound to a verified provider identity. This paper studies this gap as tool-provider misbinding: a failure in which a request intended for a legitimate provider is instead resolved to an attacker-controlled tool. The attacker does not compromise the host, LLM, legitimate server, or network channel; it only operates another MCP server that advertises tools with chosen metadata. We formulate tool provider misbinding as an attacker-controlled tool-selection optimization problem and evaluate it in a controlled MCP environment across five LLM-based clients. The results show that interactions drive misbinding. The strongest failures occur when exact-name collision, task-aligned description, and compatible schema reinforce one another, but authority-enhanced descriptions with compatible schema can also cause wrong-provider execution or unresolved provider ambiguity without name collision. Different models expose the same provider-binding weakness differently, including attacker-controlled provider selection, clarification requests, and unstable or inconsistent provider resolution.
Figures & tables
Fig. 1: Controlled MCP tool-misbinding scenario.
Condition
Name
Description
Schema
C01
Unrelated
Unrelated
Incompatible
C02
Unrelated
Unrelated
Compatible
C03
Unrelated
Copied
Incompatible
C04
Unrelated
Copied
Compatible
C05
Unrelated
Authority-enhanced
Incompatible
C06
Unrelated
Authority-enhanced
Compatible
TABLE I: Main factorial attacker-tool conditions.
Cond.
Name
Desc.
Schema
GPT-5.4
Claude Sonnet 5
Gemini 2.5 Pro
Qwen3.7 Max
DeepSeek V3
VR/CR/RBS
VR/CR/RBS
VR/CR/RBS
VR/CR/RBS
VR/CR/RBS
C01
Unrelated
Unrelated
Incompatible
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
C02
Unrelated
Unrelated
Compatible
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
C03
Unrelated
Copied
Incompatible
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
C04
Unrelated
Copied
Compatible
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.22 / 0.00 / 0.65
C05
Unrelated
Authority-enhanced
Incompatible
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
0.00 / 0.00 / 1.00
TABLE II: Main factorial results. Each condition contains 50 included trials per model. The failure rate is omitted because FR=0 in all conditions.
Fig. 2: (a) Violation rate, (b) Clarification rate, and (c) Resolved Binding instability across the evaluated models and attacker-tool conditions.
Fig. 3: Model-level behavior across attacker-tool conditions.
Fig. 4: Schema amplification across models.
Cond.
GPT-5.4
Claude Sonnet 5
Gemini 2.5 Pro
Qwen3.7 Max
DeepSeek V3
VR
SD
95% CI
CR
VR
SD
95% CI
CR
VR
SD
95% CI
CR
VR
SD
95% CI
CR
VR
SD
95% CI
CR
C01
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
C02
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
C03
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
C04
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.184
0.036
[0.141,0.237]
0.000
C05
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
TABLE III: Unrelated-name robustness results across five unrelated-name instances.
Fig. 5: Robustness to unrelated tool names across C01-C06.
Fig. 6: C06 VR by unrelated-name sample and model.
Cond.
GPT-5.4
Claude Sonnet 5
Gemini 2.5 Pro
Qwen3.7 Max
DeepSeek V3
VR
SD
95% CI
CR
VR
SD
95% CI
CR
VR
SD
95% CI
CR
VR
SD
95% CI
CR
VR
SD
95% CI
CR
C05
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
0.000
0.000
[0.000,0.015]
0.000
C06
0.036
0.017
[0.019,0.067]
0.000
0.000
0.000
[0.000,0.015]
0.208
0.408
0.023
[0.349,0.470]
0.564
0.204
0.022
[0.159,0.258]
0.000
0.508
0.067
[0.446,0.569]
0.000
C11
0.044
0.022
[0.025,0.077]
0.000
0.004
0.009
[0.001,0.022]
0.208
0.024
0.017
[0.011,0.051]
0.528
0.196
0.017
[0.152,0.250]
0.000
0.592
0.041
[0.530,0.651]
0.000
C12
0.980
0.020
[0.954,0.991]
0.000
0.256
0.038
[0.206,0.314]
0.744
0.720
0.045
[0.661,0.772]
0.280
1.000
0.000
[0.985,1.000]
0.000
1.000
0.000
[0.985,1.000]
0.000
TABLE IV: Description-robustness results across five description instances.
Fig. 7: Per-description violation and clarification rates across five authority-enhanced description samples (D1-D5) for C06 and C12.
Fig. 8: Mean violation rate with standard deviation across the five authority-enhanced description samples for C06 and C12.
(a) Violation Rate (VR)
Cond.
GPT-5.4
Claude Sonnet 5
Gemini 2.5 Pro
Qwen3.7 Max
DeepSeek V3
r=1
r=3
r=5
r=10
r=1
r=3
r=5
r=10
r=1
r=3
r=5
r=10
r=1
r=3
r=5
r=10
r=1
r=3
r=5
r=10
C07
0.04
0.10
0.24
0.28
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
C08
0.12
0.14
0.20
0.30
0.00
0.00
0.02
0.00
0.60
0.68
0.70
0.76
0.40
0.86
0.88
1.00
0.28
0.18
0.08
0.00
C09
0.00
0.12
0.26
0.34
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
C10
1.00
1.00
1.00
1.00
0.06
0.08
0.10
0.16
0.88
0.84
0.90
0.92
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
TABLE V: Attacker-budget sensitivity across exact-name collision conditions C07–C12.
Fig. 9: Effect of increasing the attacker budget from r=1 to r=10 across exact-name collision conditions C07–C12.
The Model Context Protocol (MCP) standardizes how a large-language-model (LLM) agent and an external tool server exchange messages, but not trust: a host reads a server's self-declared tool list and dispatches calls, with no notion of which servers it may use, at what sensitivity, or which of a server's tools are in bounds. This work grew out of a concrete need -- letting the Enclawed agent use Google's externally-operated MCP servers (Gmail, Calendar, Drive) safely, admitting the server and bounding the tools it may drive, without changing MCP or Enclawed's own tool application-programming interface (API). The mechanism we built, mcp-attested (shipped in both the open enclawed-oss distribution and the enclaved flavor), generalizes: the gap that makes an unmediated third-party connection unsafe for one user makes a regulated deployment impossible to accredit. We close it with three additive mechanisms: (1) a small, offline-signed clearance assertion a server publishes at a well-known Uniform Resource Identifier (URI) and a host verifies against a pinned trust root before any tool dispatch; (2) a deny-by-default per-server tool allowlist, so admitting a server is not trusting its every tool; and (3) a flavor-gated enforcement mode that turns the checks from warnings into hard denials, with every decision written to a tamper-evident audit log. We give the wire format, the verification algorithm, a security analysis, and an LLM-driven adversarial evaluation; we then state the design in normative Request-for-Comments (RFC 2119) form -- schema, verification rules, error registry, well-known registration, and machine-checkable conformance vectors -- so it can be adopted as an MCP addendum rather than reinvented. An unextended host ignores the well-known document and behaves exactly as today.
The Model Context Protocol (MCP) is an open and standardized interface that enables large language models (LLMs) to interact with external tools and services, and is increasingly adopted by AI agents. However, the security of MCP-based systems remains largely unexplored.In this work, we conduct a large-scale security analysis of MCP servers integrated within MCP clients. We show that treating MCP servers as trusted entities without authenticating the caller identity is fundamentally insecure. Since MCP servers often cannot distinguish who is invoking a request, a single authorization decision may implicitly grant access to multiple, potentially untrusted callers.Our empirical study reveals that most MCP servers rely on persistent authorization states, allowing tool invocations after an initial authorization without re-authentication, regardless of the caller. In addition, many MCP servers fail to enforce authentication at the per-tool level, enabling unauthorized access to sensitive operations.These findings demonstrate that one-time authorization and server-level trust significantly expand the attack surface of MCP-based systems, highlighting the need for explicit caller authentication and fine-grained authorization mechanisms.
Yuhang Huang, Boyang Ma, Biwei Yan +5
Shandong University Qingdao, Shandong, China · City University of Hong Kong Hong Kong, Hong Kong, China
Large Language Models (LLMs) are increasingly serving as autonomous agents, and their utilization of external tools via the Model Context Protocol (MCP) is considered a future trend. Current MCP evaluation sets suffer from issues such as reliance on external MCP services and a lack of difficulty awareness. To address these limitations, we propose MCPAgentBench, a benchmark based on real-world MCP definitions designed to evaluate the tool-use capabilities of agents. We construct a dataset containing authentic tasks and simulated MCP tools. The evaluation employs a dynamic sandbox environment that presents agents with candidate tool lists containing distractors, thereby testing their tool selection and discrimination abilities. Furthermore, we introduce comprehensive metrics to measure both task completion rates and execution efficiency. Experiments conducted on state-of-the-art LLMs reveal significant performance differences in handling complex, multi-step tool invocations. All code is open-source at https://github.com/Brunestuder/MCPAgentBench.