Open Model Hardware Protocol · open source

Let your AI agent run the lab.

OpenMHP is an open protocol that connects AI agents to lab instruments. It is an ordinary MCP server, so any harness can speak to it — but a tool call ends the moment it returns, and physical work does not. OpenMHP holds a lease on the instrument, runs the work as a job that outlives the conversation, and streams back what the device reports until it is done.

Install npx openmhp-cli setupWorks with Claude Code, Codex, OpenClaw, Hermes, Claude Science, Open ScienceSits on top of OPC UA, ROS 2, SiLA 2, MADSci, PyLabRobot

If you know MCP, you already understand most of OpenMHP. MCP gave AI applications one standard way to reach software tools and data. OpenMHP does the same for hardware: an instrument that speaks OpenMHP can be used by any agent, and an agent that speaks OpenMHP can use any instrument, without someone writing an integration for each pair. What it adds on top is everything a request-and-response call has no way to express — a lease, a job, a live event stream, and a safety gate no model can talk its way past.

AI agents send intent through the OpenMHP MCP server and receive results. OpenMHP sends commands to physical devices and receives telemetry, with limits, interlocks, approvals and emergency stop enforced beside the hardware.
OpenMHP gives every agent the same small toolset, while each device keeps its existing control layer and enforces its own safety envelope.

MCP calls a tool. OpenMHP stays with the machine.

A software tool call is over when it returns. A thirty-cycle PCR runs for two hours, a plate arm is mid-move, an incubator has to be watched overnight. OpenMHP keeps the same MCP front door and adds the three things that gap needs: exclusive control while you have it, work that outlives the call, and a device that reports instead of waiting to be asked.

The same MCP wire, extended for work that takes minutes, hours or days.
The lease

One session at a time holds the right to write and invoke, renewed by a heartbeat. It is also a dead man's switch: on an instrument that declares a watchdog, going quiet for longer than the window makes the device stop itself, cancel its jobs and latch safe rather than assume all is well. Reads, job status and emergency stop are never blocked by it.

The job

Invoking an action returns a job id immediately, not a result. It moves through queued, running and then done, failed or cancelled, and can be paused, resumed or cancelled while it runs. A failed job reports an unknown outcome and holds the device in fault until someone verifies it, because a half-finished physical action is not a safe thing to guess about.

The live stream

The device pushes. Signal changes, job progress and completion, safety events, faults and requests for a human all arrive as notifications, and the bridge records them against the run as they land. An agent reads what came in and decides what to do next. Nothing in that path polls the instrument.

Each device loads like an Agent Skill

The second idea OpenMHP borrows is from Agent Skills rather than MCP: an instrument is packaged like knowledge, not like an API. A device package is the instrument owner's knowledge, split into layers. The agent sees a tiny card while searching, opens the operating guide when it chooses the device, and loads exact specs or tested procedures only when the task needs them.

Progressive disclosure keeps the context cost flat while the device package can hold everything an owner wants an agent to know.
The agent learns more only as its confidence narrows. The last word still belongs to the device-side safety gate.

What you can do with it

Here is what a day with OpenMHP looks like for a scientist. None of it involves writing code.

For people building agents or instruments, the same design gives you one integration for all hardware. The agent sees eleven tools whether the lab has two devices or two thousand, and its context stays small because devices load the way Agent Skills do: a short card in search results, the operating instructions when one is chosen, the full detail only when asked. In our test with 2,000 simulated devices, finding and opening the right one cost about 1,300 tokens. The full list is on the Features page.

Where to start

Why it matters, by role

Where OpenMHP came from

Anthropic solved the equivalent problem for software when it open-sourced the Model Context Protocol, and showed how to package procedural knowledge with Agent Skills. OpenMHP carries the same idea across to hardware: one open, shared way for any AI agent to connect to lab and factory instruments the way MCP connected agents to digital tools — and a small set of design principles that follow from it, like enforcing safety in the driver rather than trusting the agent, and treating an agent's context as a resource the protocol protects on purpose. The full reasoning, and what it means for a contribution, is on the Design principles page.

Common questions

Does it replace OPC UA, ROS 2 or SiLA 2? No. It sits on top of them. An adapter turns an OPC UA server, a ROS 2 node, a SiLA feature, a MADSci node or a PyLabRobot machine into an OpenMHP device in a few lines, and adds the safety envelope and the agent-facing description those layers do not carry.

Which AI model does it need? Any. OpenMHP is an ordinary MCP server, so the model is whatever your harness runs.

What stops an agent from doing something dangerous? The driver, not the agent. Limits, interlocks and approval levels are written into the device package by the owner and checked on the device side of the wire on every call. Changing a limit is a code review, not something an agent can do at run time.

Do I have to program to add my instrument? Usually not. The agent interviews you and writes the package. Hand-operated and USB-serial instruments need no code; instruments on the supported ecosystems need a few lines of bindings; only a vendor SDK or a binary protocol needs a short driver class.