AegisMCP: Online Graph Intrusion Detection for Tool-Augmented LLMs on Edge Devices
Zhonghao Zhan, Amir Al Sadi, Krinos Li, Hamed Haddadi
TL;DR
AegisMCP tackles the security gap created by MCP-driven LLM agents in smart homes by reframing agent-tool orchestration as a streaming heterogeneous temporal graph. The authors introduce NEBULA-Schema to capture protocol-level activity (install, invoke, net_out) and design a CPU-efficient GraphSAGE-based detector that fuses edge behavior, session-DAG structure, and novelty signals for near-real-time inference on edge hardware. Their evaluation on emulated and physical testbeds shows sub-second per-window latency with high detection performance (AUROC ≈ 0.985, AP ≈ 0.947) and favorable energy profiles, outperforming traditional traffic-only baselines and certain graph baselines. The work demonstrates that protocol-aware, structure-driven monitoring can robustly detect zero-day misuse of sanctioned MCP capabilities, providing a practical, privacy-conscious defense for home environments, with open-source artifacts to support reproducibility and extension.
Abstract
In this work, we study security of Model Context Protocol (MCP) agent toolchains and their applications in smart homes. We introduce AegisMCP, a protocol-level intrusion detector. Our contributions are: (i) a minimal attack suite spanning instruction-driven escalation, chain-of-tool exfiltration, malicious MCP server registration, and persistence; (ii) NEBULA-Schema (Network-Edge Behavioral Learning for Untrusted LLM Agents), a reusable protocol-level instrumentation that represents MCP activity as a streaming heterogeneous temporal graph over agents, MCP servers, tools, devices, remotes, and sessions; and (iii) a CPU-only streaming detector that fuses novelty, session-DAG structure, and attribute cues for near-real-time edge inference, with optional fusion of local prompt-guardrail signals. On an emulated smart-home testbed spanning multiple MCP stacks and a physical bench, AegisMCP achieves sub-second per-window model inference and end-to-end alerting. The latency of AegisMCP is consistently sub-second on Intel N150-class edge hardware, while outperforming traffic-only and sequence baselines; ablations confirm the importance of DAG and install/permission signals. We release code, schemas, and generators for reproducible evaluation.
