Device Context Protocol

v1.0.0Developer Toolsstable

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.

agentarduinobridgecbordevice-control
Share:
25
Stars
0
Downloads
0
Weekly
0/5

What is Device Context Protocol?

Device Context Protocol is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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.

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.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Device Context Protocol — bridge LLM agents to physical devi

Use Cases

Physical device bridge for LLM agents
Embedded system control
Hardware integration
LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx dcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Device Context Protocol

Device Context Protocol (DCP) is a lightweight protocol and Python MCP bridge that connects LLM agents to physical hardware — microcontrollers, IoT devices, and embedded systems — using sub-50-byte binary frames and a minimal (<16KB) MCU footprint. Device capabilities are declared in YAML manifests and automatically exposed as MCP tools that AI assistants can call, with capability-scoped tokens controlling what each agent is allowed to do. Embedded developers and IoT builders use it to let Claude or other AI agents control ESP32, Arduino, and similar hardware over Serial, MQTT, or BLE without writing custom server code.

Prerequisites

  • Python 3.10+ and pip
  • pydcp package (the PyPI name for DCP) with appropriate transport extras
  • Target hardware: ESP32, Arduino, or compatible microcontroller flashed with DCP firmware
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • A device manifest YAML file describing the hardware capabilities
1

Install pydcp with your required transports

Install the pydcp package from PyPI. Choose the extras matching your hardware connection: serial for USB/UART, mqtt for network-connected devices, ble for Bluetooth Low Energy. The mcp extra is always required.

# Basic install (serial + MCP bridge)
pip install "pydcp[mcp,serial]"

# All transports
pip install "pydcp[mcp,serial,mqtt,ble]"
2

Create or obtain a device manifest

DCP devices are described by YAML manifests that declare capabilities (intents) with their parameters, types, and access modes. The project ships example manifests in the examples/ directory. You can also use the built-in simulator to test without hardware.

# Inspect an example manifest
dcp inspect examples/lamp_manifest.yaml

# Run with simulator (no hardware needed)
dcp serve examples/lamp_manifest.yaml --simulator
3

Generate and mint capability tokens

DCP uses scoped capability tokens to control what an LLM agent can do. Generate a secret, then mint tokens with specific capability scopes and optional TTLs.

# Generate a secret (store this securely)
export DCP_SECRET=$(dcp token keygen)

# Mint a token with specific capabilities and 1-hour TTL
dcp token mint --caps lamp.write,lamp.read --ttl 3600
4

Connect to your hardware and serve via MCP

Run dcp serve with the manifest and the appropriate transport flag. DCP translates between the MCP protocol and the compact DCP wire format, bridging your AI assistant to the physical device.

# Serial (USB) connection
dcp serve examples/lamp_manifest.yaml --serial /dev/ttyUSB0

# MQTT connection
dcp serve examples/lamp_manifest.yaml --mqtt broker.lan:1883 --mqtt-prefix dcp/lamp

# BLE connection
dcp serve examples/lamp_manifest.yaml --ble AA:BB:CC:DD:EE:FF
5

Add the DCP bridge to your MCP client configuration

Open claude_desktop_config.json and add a DCP server entry. Use --simulator for testing without hardware, then switch to --serial or --mqtt for production.

{
  "mcpServers": {
    "smart-lamp": {
      "command": "dcp",
      "args": ["serve", "/path/to/lamp_manifest.yaml", "--simulator"]
    }
  }
}

Device Context Protocol Examples

Client configuration (simulator mode)

claude_desktop_config.json entry running DCP in simulator mode for testing without physical hardware. Replace with --serial, --mqtt, or --ble and the appropriate address for real hardware.

{
  "mcpServers": {
    "smart-lamp": {
      "command": "dcp",
      "args": ["serve", "/Users/yourname/dcp/examples/lamp_manifest.yaml", "--simulator"]
    }
  }
}

Prompts to try

Example prompts for controlling a DCP-connected smart lamp device. Actual tool names depend on the intents defined in your manifest.

- "Set the lamp brightness to 75% with a 2-second fade"
- "Read the current brightness level of the lamp"
- "Turn the lamp off gradually over 5 seconds"
- "What capabilities does the connected device have?"
- "Set brightness to 100% immediately"

Troubleshooting Device Context Protocol

dcp command not found after pip install

Ensure the Python scripts directory is on your PATH. On macOS/Linux: add `export PATH="$HOME/.local/bin:$PATH"` to your shell profile. On Windows: add the Python Scripts directory to the system PATH. Verify with `python -m dcp --version` as an alternative.

Serial connection fails with 'Permission denied' on Linux

Add your user to the dialout group to access serial ports: `sudo usermod -aG dialout $USER`. Log out and back in for the change to take effect. Verify port access with `ls -la /dev/ttyUSB0`.

Capability token validation errors when calling device intents

Ensure DCP_SECRET is set to the same value used when minting the token. Tokens are capability-scoped — if the tool calls lamp.write but the minted token only has lamp.read, access will be denied. Mint a new token with the required capability scope using `dcp token mint --caps lamp.write,lamp.read`.

Frequently Asked Questions about Device Context Protocol

What is Device Context Protocol?

Device Context Protocol is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Device Context Protocol?

Follow the installation instructions on the Device Context Protocol GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Device Context Protocol?

Device Context Protocol works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Device Context Protocol free to use?

Yes, Device Context Protocol is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "dcp": { "command": "npx", "args": ["-y", "dcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Device Context Protocol?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides