Organizations: Peking University · Zhongguancun Academy · Meituan‡ · The Hong Kong University of Science and Technology · Beijing Key Laboratory of Data Intelligence and Security, Peking University
Large language model agents are increasingly deployed through the Model Context Protocol (MCP), which allows them to discover and invoke tools across multiple servers at runtime. Existing MCP benchmarks primarily measure task completion; where they diagnose failures, they do so after execution rather than building specific reasoning, execution, and memory failure risks into task construction. We introduce MCPHallu, a benchmark for diagnosing hallucination-prone agent failures in MCP environments along three axes: reasoning, execution, and memory. MCPHallu contains 358 tasks across five capability domains and runs on 36 production MCP servers in isolated containers. Each task is designed with a structural trigger that makes one of four subtypes the dominant failure risk: Branch Collapse, Unreachable Goal, Tool Misuse, or Context Forgetting. This design enables subtype-level analysis rather than aggregate task success alone. We evaluate fourteen frontier LLM agents from eight vendors on 5{,}012 trajectories. Current MCP agents remain vulnerable to hallucination-inducing tool environments, achieving an average score of 0.642 on a [0,1] scale (higher is better). Failures concentrate on Unreachable Goal tasks, where the average score drops to 0.458 and 23.2% of runs pass, indicating that agents often continue issuing tool calls or claim successful completion rather than recognizing infeasible goals. Subtype rankings diverge sharply: a model's rank shifts by 6.9 of 13 positions on average across subtypes, and Branch Collapse is uncorrelated with Unreachable Goal across models (r=−0.12). MCPHallu is released at https://github.com/J1zz/mcp_hallu.
Figures & tables
Figure 1: Overview of MCPHallu. (a) shows a benchmark case of branch collapse , where the model follows largely correct intermediate tool-use steps but fails at final aggregation, yielding an incorrect ranking. (b) reports average performance across four hallucination subtypes. (c) summarizes the benchmark statistics.
Benchmark
Multi-server
Stateful
Long-horizon
Subtype-level attribution
ToolBH
✗
✗
✗
partial
RelyToolBench
✗
✗
✗
partial
τ -bench
✗
✓
✓
✗
WebArena
✗
✓
✓
✗
AgentBench
✗
partial
✓
✗
MCP-Atlas ( Bandi et al., 2026 )
✓
partial
✓
post-hoc
Table 1: Comparison with representative tool-use and agent benchmarks along the conditions that distinguish MCP deployments (§ 1 ) and the attribution granularity of the evaluation. For statefulness, “partial” denotes limited coverage of verified persistent-state changes; for attribution, “partial” denotes tool-call-level labels and “post-hoc” denotes diagnosis after task execution.
Figure 2: Hallucination failure forms at the three stages of the agent loop, each with a toy example. MCPHallu instantiates them as Branch Collapse and Unreachable Goal (reasoning), Tool Misuse (execution), and Context Forgetting (memory).
Figure 3: Overview of the MCPHallu task construction pipeline. Starting from live MCP servers, we extract executable tool schemas, synthesize subtype-targeted tasks, filter them for executability and label consistency, and retain the surviving tasks after expert review.
Subtype
Judge
Outcome
Dependency
Early-Stop
Confusion
Branch Collapse
∙
∙
∙
Context Forgetting
∙
∙
∙
Unreachable Goal
∙
∙
Tool Misuse
∙
∙
Table 4: Active evaluation components per subtype ( ∙ ).
Calls
Runs
Pass%
Mean
Comp.%
0
320
65.0
0.778
0.6
1–3
455
27.9
0.569
13.8
4–7
266
0.0
0.342
30.1
8–15
158
0.0
0.201
36.7
16+
243
0.0
0.121
19.8
Table 6: Unreachable Goal performance vs. tool-call count.
Type
Runs
Pass%
Mean
Steps
Conf. calls
Correct only
825
84.7
0.927
3.54
0.00
Correct + conf.
260
32.3
0.649
10.70
3.42
Conf. only
16
0.0
0.348
3.38
1.63
Neither
75
8.0
0.364
0.37
0.00
Table 7: Tool Misuse trajectories grouped by tool-set archetype. Using the correct tool together with a confusion tool sharply lowers performance.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Intended ↓ / Observed →
BC
UG
TM
CF
N
Branch Collapse
16
1
2
2
21
Unreachable Goal
0
21
0
0
21
Tool Misuse
0
4
13
0
17
Context Forgetting
0
3
1
17
21
Appendix
Table 9: Subtype attribution audit on 80 failed runs (counts). Rows give the intended subtype, columns the observed dominant failure.
Role
Model
Stage
Task generator
Claude Sonnet 4.6
Adversarial synthesis (§ 4.3 )
Repair and filtering solver
Claude Code (Claude Sonnet 4.6)
Automated filtering (Appendix D.3 )
Semantic judge
GPT-4o
Evaluation (§ 4.4 )
Cross-validation judge
Claude Sonnet 4.5
Judge validation (Appendix H )
Appendix
Table 10: Model roles in MCPHallu.
Figure 6: MCPHallu task distribution ( N=358 ). (a) Task counts by hallucination subtype, split by difficulty: Unreachable Goal is the largest group (103 tasks), the others range from 82 to 89, and every subtype covers all three difficulty levels. (b) Task counts by capability domain: Coding is the largest (80 tasks) and Productivity the smallest (61 tasks).
Use case
Tasks
Share
Financial / market lookup
73
20%
Code review / repository operations
73
20%
Trip / local-information planning
72
20%
Reporting / data analysis
63
18%
Literature / paper search
55
15%
Record / file / calendar writes
16
4%
Appendix
Table 11: MCPHallu tasks by use case.
Model
API Provider
Native context
Temp
GPT-4o
OpenAI
128K
1.0
GPT-5-chat
OpenAI
400K
1.0
Claude Haiku 4.5
Anthropic
200K
1.0
Claude Sonnet 4.5
Anthropic
200K
1.0
Claude Sonnet 4.6
Anthropic
200K
1.0
Claude Opus 4.5
Anthropic
200K
1.0
Appendix
Table 12: Inference details for the 14 models evaluated on MCPHallu. Native context is the provider’s maximum window; all agents run with a 128K-token context (§ 5.1 ).
Agent behavior
#Runs
Pass%
Keeps acting, no infeasibility declared (4+ calls)
307
0.0
Keeps acting, no infeasibility declared (1–3 calls)
210
0.0
Stops and declares infeasibility
448
48.0
Appendix
Table 13: Agent behavior on Unreachable Goal tasks. Agents that stop and recognize infeasibility pass 48.0% of the time; those that keep acting without declaring infeasibility pass 0.0%.
Final-response class
#Runs
Pass%
Mean score
Avg. steps
Completion only
195
2.1
0.199
9.98
Limitation only
304
44.4
0.668
4.82
Completion + limitation
83
18.1
0.514
9.08
Neither
784
23.0
0.442
7.64
Appendix
Table 14: Final-response language on Unreachable Goal (non-empty responses only, pooled over 14 models). Completion-only responses are the dominant false-completion mode.
Figure 7: (a) Pass rate and (b) share of final responses containing completion-style language, by tool-call count on Unreachable Goal tasks. Pass rate collapses to zero after three calls while completion-style language rises through 8–15 calls, indicating that extended trajectories shift the model toward a false-completion register rather than infeasibility recognition.
Regime
#Runs
Pass%
Mean score
Avg. steps
Stateless ( General / Analytics / Financial )
644
59.2
0.713
7.17
Stateful ( Productivity / Coding )
504
24.6
0.431
11.46
Appendix
Table 15: Context Forgetting performance by whether the task requires writing remembered values to external state. Stateful instances are substantially harder than stateless ones.
Model
Branch
Context
Unreach.
Tool
Spread
Claude Haiku 4.5
3
9
12
7
9
Claude Opus 4.5
1
7
7
6
6
Claude Opus 4.6
7
1
2
1
6
Claude Sonnet 4.5
6
4
3
2
4
Claude Sonnet 4.6
9
3
1
3
8
DeepSeek-V3.1
5
2
11
10
9
Appendix
Table 16: Per-subtype model ranks (1 = best). The rightmost column shows the rank spread across the four subtypes; mean spread is 6.86 of a possible 13.
Subtype
General
Analytics
Financial
Productivity
Coding
Tool Misuse
0.886
0.859
0.886
0.605
0.775
Context Forgetting
0.599
0.832
0.695
0.396
0.474
Branch Collapse
0.705
0.687
0.808
0.598
0.809
Unreachable Goal
0.562
0.421
0.542
0.565
0.246
Appendix
Table 19: Mean score by capability domain × hallucination subtype, pooled over 14 models. The hardest cells mostly require writing a value back to live state, not a single difficult domain.
Figure 8: Cross-judge agreement scatter: GPT-4o judge score ( x -axis) vs. Claude Sonnet 4.5 judge score ( y -axis), one point per model per subtype ( n=56 ). The two judges agree closely ( r=0.914 ); the largest divergence is on Context Forgetting (squares). The dashed line is the OLS fit; the dotted diagonal marks perfect agreement.