GT-MCP: Defending LLM Context Poisoning
Abstract
Large Language Models (LLMs) engaged in multiturn interactions maintain an evolving context rather than generating isolated responses, making them vulnerable to promptinjection and context-poisoning attacks in which locally plausible adversarial fragments gradually distort reasoning trajectories. Existing defenses primarily focus on filtering individual outputs and largely ignore how context evolves across turns, leaving the dynamics of long-horizon reasoning exposed. Although the Model Context Protocol (MCP) standardizes context exchange and tool invocation, it serves as a passive routing layer and does not enforce stability in context evolution. To address these limitations, we introduce the Game-Theoretic Secure Model Context Protocol (GT-MCP), a controller-driven multi-agent solution that treats context management as a closed-loop dynamical process. GTMCP coordinates three heterogeneous LLM agents and selects the outputs using a trust function that jointly evaluates causal consistency against a validated context graph, semantic agreement between agents, and distributional drift over time. When instability is detected, a rollback-based self-healing mechanism restores the validated context, preventing propagation of unsupported fragments. Empirical evaluation over 500 interaction turns under an adaptive adversarial threat model demonstrates that contextual drift remains bounded in 99.6% of turns, with recovery required in only 0.4%. The per-turn utility is tightly concentrated (median = 0.19, P05 = 0.72, P95 = 0.30) with severe degradation (< 1) occurring only in 0.4% of cases, and no injection attempt succeeds at the controller level. The selected outputs maintain stable win rates above 98%, and computational overhead remains predictable (latency per token = 1.63 10[]s).