REST API
Programs use the same devices as your AI: same rules, rate limits and activity log. Create a key under Apps and programs in your account, then send it as a Bearer token.
List devices
curl https://mcpdevices.app/api/v1/devices \
-H "Authorization: Bearer ahh_YOUR_KEY"
Each device has an id, class, online and the actions it supports with their argument schema.
Run an action
# print a test page or label
curl -X POST https://mcpdevices.app/api/v1/devices/DEVICE_ID/actions/test_print \
-H "Authorization: Bearer ahh_YOUR_KEY"
# print a document on an office printer (Markdown)
curl -X POST https://mcpdevices.app/api/v1/devices/DEVICE_ID/actions/print \
-H "Authorization: Bearer ahh_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"title":"Invoice 1042","text":"# Invoice 1042\n\n| Item | Qty |\n|---|---:|\n| Labels | 2 |"}'
# print raw ZPL on a label printer
curl -X POST https://mcpdevices.app/api/v1/devices/DEVICE_ID/actions/print \
-H "Authorization: Bearer ahh_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"zpl":"^XA^FO50,50^A0N,40,40^FDHello^FS^XZ","copies":1}'
Answer: {"ok":true,"result":{…}}. Errors: {"ok":false,"error":"…"} with status 400 (bad arguments), 401 (key), 403 (action needs approval), 404 (device or action), 429 (too many calls), 502 (device failed or offline).
MCP
AI agents connect to https://mcpdevices.app/mcp (OAuth). Claude: Settings → Connectors → Add custom connector.