device-context-protocol

Device Context Protocol — bridge LLM agents to physical devices. Sub-50-byte frames, <16KB MCU footprint, capability-scoped and safe by design. Complementary to MCP.

23
0
89% credibility
Found May 19, 2026 at 24 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

DCP (Device Context Protocol) is an open-source project that enables AI assistants to safely control physical devices like smart lamps, motors, and sensors. It consists of a Python bridge that runs on your computer and small firmware that runs on microcontrollers. The bridge acts as a safety checkpoint—validating every command before it reaches hardware, preventing the AI from making dangerous mistakes like setting a brightness to 9999%. DCP works with AI tools that support the Model Context Protocol (like Claude Desktop), so you can control devices by simply asking in natural language. It supports multiple connection methods (USB, Bluetooth, WiFi/MQTT) and includes security features like capability tokens to ensure only authorized sessions can control your devices.

How It Works

1
💡 You discover a way to control devices with AI

You learn about DCP—a system that lets AI assistants safely interact with real hardware like lamps, motors, and sensors.

2
📦 You install the bridge software

You download and install the Python package on your computer, which becomes the bridge between your AI assistant and your devices.

3
🔌 You connect a smart device

You plug in a compatible device—like a smart lamp or ESP32 board—using USB, Bluetooth, or your local network.

4
🛡️ Safety checks happen automatically

Before any command reaches your device, the bridge validates it: checking that values are in safe ranges and that your session is authorized.

5
🤖 You ask your AI assistant to control the device

You open Claude Desktop (or another compatible AI tool) and say something like 'set the lamp to 60% brightness'—no technical setup needed.

6
Your command travels through the system
📡
Over USB cable

Your command travels through a serial connection directly to the device.

📻
Over Bluetooth

Your command is sent wirelessly to a BLE-enabled device.

🌐
Over your network

Your command goes through MQTT to reach a networked device.

Your device responds exactly as requested

The lamp dims, the motor spins, or the sensor reports back—and you get confirmation that everything worked.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 24 to 23 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is dcp?

DCP (Device Context Protocol) is a bridge between LLM agents and physical hardware. The Python implementation runs on your host machine as a bridge that translates between MCP (what Claude and other LLM tools understand) and a compact wire format that runs on microcontrollers. The C++ firmware side targets ESP32-class devices with as little as 32KB RAM - devices that simply cannot run a full MCP stack. It uses CBOR encoding for compact binary frames, HMAC-SHA256 tokens for capability scoping, and moves all safety enforcement to the host-side Bridge so devices stay simple.

Why is it gaining traction?

The hook is fitting LLM agent control onto dollar-class hardware. MCP assumes JSON-RPC over WebSocket - that's a non-starter on 32KB RAM. DCP keeps the mental model (manifest + tool calls) but compiles to sub-50-byte frames. The design rationale document is thorough - it explains why not MCP-on-MCU, why not WoT, why not Matter. Real hardware validation exists: 88 Python tests, 13 UART round-trip tests passing on actual ESP32-WROOM-32 hardware. The firmware cross-compiles cleanly across the entire ESP family including ESP8266.

Who should use this?

Embedded engineers building IoT products who want LLM-based control without cloud dependency. Developers integrating physical devices with Claude Desktop or Claude Code. If you're building a smart lamp, sensor array, or actuator that needs agentic control and your target hardware is an ESP32 or similar, DCP is purpose-built for this. Not for teams already invested in Matter or requiring multi-device atomic transactions.

Verdict

At 23 stars with a credibility score of 0.8999999761581421%, this is early-stage but technically grounded. The protocol design is sound, the hardware validation is real, and the documentation is unusually thorough for a project this size. Worth evaluating if your use case fits the constraints - but expect to engage with the source as the PyPI package matures.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.