Skip to content

Hybrid Analysis for Secure MCP Tool Use in LLM Agents

Jul 2026 · arXiv.org · Vol abs/2607.25297 · 0 citations · 40 references
Computer Science

TL;DR

MTGuard is proposed, a hybrid analysis-based defense framework designed to safeguard the use of MCP tools in LLM agents by leveraging lifecycle-aware static-dynamic co-analysis and effectively mitigates multiple categories of harmful tool use across different LLM agents while maintaining performance on benign user tasks.

Abstract

The rapid development of large language model (LLM) agents has enabled their broad adoption across diverse real-world tasks. To standardize interactions between LLM agents and external environments, Model Context Protocol (MCP) tools have emerged as a de facto standard and have been widely integrated into these systems. However, the use of MCP tools also introduces new safety risks, as LLM agents can be induced to perform malicious or unauthorized actions. Although prior work has proposed defenses for securing tool use in LLM agents, most methods rely on static analysis, i.e., inspecting prompts and generated outputs, which limits the defense effectiveness and robustness. To address these limitations, we propose MTGuard, a hybrid analysis-based defense framework designed to safeguard the use of MCP tools in LLM agents by leveraging lifecycle-aware static-dynamic co-analysis. Extensive evaluation demonstrates that MTGuard effectively mitigates multiple categories of harmful tool use across different LLM agents while maintaining performance on benign user tasks.

View source

Similar papers

Conference Open access Jun 2026

AEGIS: Preventing Cross-Domain Resource Abuse in MCP

AEGIS is presented, a policy enforcement component that enables administrators to define fine-grained safeguards against resource abuse across heterogeneous MCP tools and modalities and detects and mitigates abusive behaviors while preserving the flexibility of MCP-based agent ecosystems.

S. Priya, Teryl Taylor, Frederico Araujo · 1 citation
Open access Jul 2026

Tool-Flow Taint Analysis for Data Exfiltration Defense in Large Language Model Agents

A comprehensive framework based on Tool-Flow Taint Analysis designed to mitigate data exfiltration in Large Language Model agents is introduced, providing a critical foundation for securing next-generation autonomous agents against sophisticated data-stealing attacks in enterprise environments.

Chun Tian, Hiu-Tung Li, Michelle Yu · 0 citations
Conference Jul 2026

A Comparative Analysis of Security Vulnerabilities and Defense Mechanisms in Large Language Models

Large Language Models (LLMs) are now deployed at an unprecedented scale across many critical sectors, rapidly transitioning from experimental AI tools to embedded components of production software systems. This accelerated adoption, often enabled by low-code integrations, has lowered technical barriers while simultaneo...

Md Abdul Barek, Md Bajlur Rashid, A. K. I. Riad et al. · 0 citations
Jul 2026

Confused Deputy Attack Against Model Context Protocol

Puppet is developed, the first automated security evaluation framework that enriches benign tool descriptions through selective requirement engineering to maximize semantic expressiveness, restructures them into LLM-preferred formats using description schema transformation, and applies name prioritization to introduce...

Zhiyuan Li, Jingzheng Wu, Yuhao Peng et al. · 0 citations
Preprint Aug 2026

ToolHazard: Scaling Adversarial Environments for Security Evaluation and Alignment of LLM-based Agents

Experiments reveal substantial agent vulnerabilities and show that injection timing and placement affect attack effectiveness, and ToolHazard-generated alignment data improves security on both ToolHazard-Bench and AgentDojo while preserving benign task utility.

Yutao Mou, Pengfei Yang, Zhenfei Yin et al. · 2 citations
Open access Jul 2026

Can Language Models Generate Secure Terraform Code? A Security-Focused Benchmark Using Static Analysis

An empirical benchmark evaluating whether LLMs and SLMs can generate security-compliant AWS Terraform configurations suggests that prompt design is a critical factor, highlighting the need for a proper pipeline for developing and validating LLM-assisted secure IaC generation.

Francis Luis Santos Vargas, R. Mansilha, Diego Kreutz · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.