Beta. The Device SDK is live for design partners: Dopl issues your project's keys while the developer portal is being built, and @dopl/sdk is available on request. Agents that act for one signed in Dopl user can use the hosted MCP server instead.
The project MCP server ships with @dopl/sdk and runs over stdio with one project secret key, so an agent connected to it acts for your product and your end users rather than for one Dopl account.
Tools
| Tool | Inputs | What it does |
|---|---|---|
deliver | external_user_id, intent, text, blocks, options, urgency, target, idempotency_key | Deliver by intent, routed by Dopl, like Deliver. The result carries the delivery and the user's context |
context | external_user_id | Read a user's active device, posture, available devices and profile, like Get context |
actions | action_id, or device_id, capability, args and idempotency_key | Read an action by ID, or run one capability on one device like Run a device action |
Three tools instead of one per device or capability keep the tool definitions small, so connecting Dopl costs your agent very little context. Because deliver returns the user's context with every result, the agent always knows which device it just wrote for. A failed call returns the error shape as a tool error.
Run it
Set DOPL_API_KEY to a secret key, and optionally DOPL_BASE_URL. The dopl-sdk-mcp command refuses to start without a key or with a publishable one. In a project where @dopl/sdk is installed, add it to your MCP host:
{
"mcpServers": {
"dopl": {
"command": "npx",
"args": [
"dopl-sdk-mcp"
],
"env": {
"DOPL_API_KEY": "sk_test_…"
}
}
}
}To run it inside your own process instead, pass a client to createProjectMcpServer:
import { Dopl } from "@dopl/sdk";
import { createProjectMcpServer } from "@dopl/sdk/mcp";
const server = createProjectMcpServer(new Dopl({ apiKey: process.env.DOPL_API_KEY! }));The hosted MCP server for individual Dopl users is a separate server and stays as it is.