AEGIS: Preventing Cross-Domain Resource Abuse in MCP
Organizations: IBM Research, USA
Abstract
The Model Context Protocol (MCP) is an open source JSON-RPC protocol that standardizes how large language models (LLMs) interact with external systems through programmatic functions known as tools. Attackers or malicious agents can exploit certain modalities of these MCP tools to degrade the overall quality of service of agent-based applications. For example, an agent may request an excessively large search radius or very long videos, overloading backend systems and potentially causing slowdowns or denial-of-service. Each modality including text, images, video, and location introduces distinct vectors for resource abuse, complicating the development of consistent mitigation strategies. Moreover, multimodal and crossdomain tools expose diverse request schemas and parameters, making it difficult to define policies that are both generalizable and precise enough to enforce meaningful resource constraints. In this paper, we present AEGIS, a policy enforcement component that enables administrators to define fine-grained safeguards against resource abuse across heterogeneous MCP tools and modalities. AEGIS leverages the reasoning capabilities of large language models to analyze, categorize, and normalize diverse tool invocations into a unified, policy-friendly representation accessible to security practitioners. Integrated with the Open Policy Agent and the ContextForge AI Gateway, AEGIS detects and mitigates abusive behaviors while preserving the flexibility of MCP-based agent ecosystems.
Figures & tables
| Modality | Parameters |
|---|---|
| Image | Aspect Ratio ( aspect_ratio ), number of images ( num_records ), scaling percent ( scaling_percent ), width ( width ), height ( height ), channels ( num_channels ), resolution ( resolution ) |
| Video/Audio | Start time ( start_time ), end time ( end_time ), bitrate ( bitrate ), resolution ( resolution ), number of videos ( num_records ), channels ( num_channels ), format ( format ), sampling rate ( sampling_rate ) |
| Text | Size, start/end time ( start_time , end_time ), record count ( num_records ), filters ( filter_array ), repeat interval ( repeat_interval ), timeout ( timeout ), breadth/depth ( max_breadth , max_depth ), retries ( retries ) |
| Location | Radius ( radius ), start position ( start_position ), end position ( end_position ), waypoints ( waypoints ), precision ( precision ) |
| Human | Number of users ( num_users ) |
| Category | Metric | Mean Std |
| Modality | Accuracy | 0.9868 0.0018 |
| Precision | 0.9879 0.0016 | |
| Recall | 0.9868 0.0018 | |
| F1-Score | 0.9872 0.0017 | |
| Operation | Accuracy | 0.9740 0.0013 |
| Precision | 0.9743 0.0015 |
| Metric | Without Aegis | With Aegis |
|---|---|---|
| Total Load | 200 | 200 |
| Successful | 4 | 200 |
| Failed | 196 | 0 |
| Throughput (req/s) | 1.34 | 30.03 |
| Min Latency (ms) | 1064.84 | 469.79 |
| Median Latency (ms) | 15380.94 | 2366.13 |
AI Agent Security
Artificial intelligence agent security studies attacks and safeguards for tool-using, persistent, and collaborative systems across digital and physical settings.
See all 510 papers