论文精选72°

Device Context Protocol:面向受限设备的紧凑安全架构,LLM 控制微控制器

Device Context Protocol: A Compact, Safety-First Architecture for LLM-Driven Control of Constrained Devices

精选理由

做物联网或嵌入式 AI 的开发者终于有了一个能安全控制微控制器的协议——DCP 在 50 字节内实现了 MCP 无法提供的安全防护,建议直接看论文和开源实现。

AI 摘要

Device Context Protocol (DCP) 是一种专为微控制器设计的轻量级协议,典型帧小于 50 字节,支持能力范围检查、类型检查、试运行评估和单位即类型等安全原语。与 MCP 和 IoT-MCP 不同,DCP 在主机侧通过 Bridge 拒绝幻觉或提示注入的调用,确保物理设备安全。参考实现在 ESP32 上仅需 27.6 KB 闪存和 0.6 KB RAM。实验表明,DCP 能 100% 阻止能力升级攻击,78% 阻止提示注入攻击,而 MCP 和 IoT-MCP 的阻止率仅为 0-1%。DCP 填补了 MCP 与物理设备之间的空白,为 LLM 控制受限硬件提供了安全基础。

原文 · arXiv: DeepSeek

Device Context Protocol: A Compact, Safety-First Architecture for LLM-Driven Control of Constrained Devices

Large language models are increasingly used as orchestrators of external tools via the Model Context Protocol (MCP), but MCP is built for software services with megabytes of memory and does not descend to the microcontrollers that dominate the long tail of physical devices. Recent work (IoT-MCP) ports MCP to edge gateways at 74 KB peak memory; this still excludes the smallest commodity MCUs and, critically, does not address the safety problem of giving an unreliable caller (an LLM that may hallucinate or be prompt-injected) direct control of physical hardware. We present the Device Context Protocol (DCP): a sub-50-byte typical frame (6-byte header + CBOR payload + optional 16-byte HMAC), a manifest schema in which capability scoping, range and type checks, dry-run evaluation, and units-as-types are protocol-layer primitives, and a host-side Bridge that rejects malformed or hallucinated calls before any byte reaches the device. Reference firmware measures 27.6 KB flash / 0.6 KB RAM on ESP32; the Python Bridge, ESP32 firmware, and a language-neutral conformance suite are MIT-licensed and public. An empirical study -- 675 tool calls produced by five LLMs across four vendors (DeepSeek, Alibaba, Zhipu, MiniMax) against six categories of adversarial prompts, with the injection category instantiating AgentDojo's attack templates -- shows DCP rejects 100% of capability-escalation attempts and 78% of prompt-injection attempts, versus 0--1% for Raw MCP and IoT-MCP, matching the expressiveness of a well-formed OpenAPI 3 schema at three orders of magnitude less firmware footprint. We position DCP as the missing layer between MCP (which is moving toward enterprise SaaS connectivity) and the physical devices it does not reach.