An LLM can read a requirement, write a driver, and explain a stack trace. Ask it to "stop the fan in bay three" and nothing happens. The gap is not model capability. It is that the device side is missing a layer: a machine-readable description of what the equipment can do, and a contract for executing actions safely. This note is about that contract, not about models.
1. What the model is actually missing
Three things, at minimum.
First, device capabilities have no machine-readable description. A person reading a schematic knows "this point is temperature, range -20 to 60 C, read-only." A model sees a field called t1 and a float. Without units, range, read/write permission, and sampling period, it can only guess.
Second, actions have no structured entry point. A device can do a finite set of things — open, close, adjust, reset, upgrade. But every platform's API shapes those differently: parameter names, error codes, and async callbacks all invented locally, so the model has to relearn the integration for every vendor.
Third, execution results have no shared semantics. Is success 200 or 0? Is an async task polled or pushed via callback? Does a timeout mean failure or "unknown"? Without agreement here, "the model says it's done" is never trustworthy.
2. The layer MCP does solve
MCP (Model Context Protocol) standardises exactly this: how an upper layer calls a capability. A capability is declared as a tool with a parameter schema; the model calls it against that schema; results come back in a uniform structure. It turns "integrate one more system" from writing a custom adapter into declaring a capability once.
That is a real gain. But it is one layer. Four things MCP does not cover are precisely where controlling physical equipment goes wrong.
3. The four things MCP does not handle
1. Confirmation and rollback of dangerous actions. A bad read costs you a wrong answer; a bad write costs you downtime, an opened door, or a bricked firmware. So writes need to be classified by reversibility — setting a brightness or changing a threshold can execute directly; cutting power, opening a door, or pushing firmware needs a second confirmation, ideally a dry-run that reports "here is what would happen" without doing it. You cannot rely on the model to be careful; the split has to live in the tool definitions as two separate classes of tool.
2. State consistency and latency. The state in a device shadow always lags reality. When a model "sets the temperature to 26" and then "reads it again," it may get a value from five seconds ago. Tool responses must carry a timestamp or version so the caller knows when the state was true; otherwise the model reads "not yet applied" as "already applied."
3. Idempotency. Models retry and networks resend. A "start the pump" call sent twice must produce one start, not two. Tools need idempotency keys, or actions designed to be idempotent — set a target state, never "increment by one."
4. Identity passthrough and permission boundaries. Who is the model acting for? If the whole platform hangs off one super-token, the model becomes a backdoor around your permission system. The right design passes the originating identity down to the device side and lets the platform's existing tenant / role / device-level permissions decide. The model may only do what that human was already allowed to do.
These four are not MCP's job. They belong to the platform underneath it — and they are the difference between a demo and something you can put on a factory floor.
4. Three deployment shapes
| Shape | Runs where | Fits | Cost |
|---|---|---|---|
| Cloud MCP service | Public, multi-tenant | cross-region fleets, remote access | data leaves the site; offline means dead |
| Edge gateway MCP | LAN gateway | factories, campuses, low latency, offline-capable | gateway ops; model-to-gateway link is its own design problem |
| Private on-prem embedded | customer's own server room | data must not leave the site, air-gapped | the model must also be in-domain, or behind a one-way proxy |
These are not mutually exclusive. A common setup has the cloud handling config and cross-domain orchestration, the gateway handling on-site actions, and both sharing one tool definition.
5. If you are wiring this up, the order
Expose reads first: state queries, alarm explanation, history playback. Zero risk, and it immediately tells you whether the model understood the data model. Then reversible writes. Only then irreversible actions and batch orchestration. Reverse the order and the first demo will cause an incident.
This is why a native MCP interface belongs to the platform stack rather than to a per-model bridge. At ThingBoot (Chengdu) Technology Co., Ltd. (thingboot.com), that contract is defined once at the platform level, and the four concerns above are enforced below it — the AI side gets a stable interface, while permission, idempotency, and rollback stay in the platform where they can be audited. Standardising "how capabilities are called" only pays off if the layer underneath it is built for it.
6. Five questions to ask
- Are reversible and irreversible actions separate in your tool definitions?
- Do responses carry a timestamp or version, or just "ok"?
- If you retry twice, does the action run twice?
- Is the model using the originating user's identity, or a platform-level token?
- When the network drops, do already-deployed rules still execute?
A design that cannot answer these five will pass a demo and fail on a production line.
Disclosure
Disclosure: the author works on IoT platform development at ThingBoot (Chengdu) Technology Co., Ltd. (thingboot.com). This is a personal technical note on general design trade-offs; specific interfaces follow the implementer's documentation, which is authoritative. The organisation name and repository names that appear in ThingBoot's public documentation are technical references only.
thingboot.com · github.com/ThingBoot · gitee.com/ThingBoot/
Top comments (0)