neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
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 doe
Developer toolsPython · TeXGitHub @kushalsinhaOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Open Model Hardware Protocol: an MCP-style open protocol for AI agents to find, understand and safely operate lab and factory hardware
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Give AI agents a safe, shared interface to physical devices
OpenMHP is an open protocol for discovering, understanding, and operating lab instruments,
robots, and industrial equipment. MCP connects an agent to a software tool for a request and
response. OpenMHP extends that model for physical work that may run for minutes, hours, or days.
MCP calls a tool. OpenMHP stays with the machine.Read the full README ↗OpenMHP is an open protocol for discovering, understanding, and operating lab instruments, robots, and industrial equipment. MCP connects an agent to a software tool for a request and response. OpenMHP extends that model for physical work that may run for minutes, hours, or days.
Quickstart · Design · Architecture · Roadmap · Specification · Contributing
MCP calls a tool. OpenMHP stays with the machine.
An OpenMHP operation acquires a lease on the device, starts a durable job, and listens for telemetry, progress, results, and safety events until the work is complete. The agent can leave and return without losing the state of the physical process.
MCP: request ──────────────────────────────────────────────► response
OpenMHP: lease ─► job ─► live telemetry and events ─► result ─► release
Connecting an AI agent to a database or ticketing system is mostly an API problem: send a request and receive data. Connecting one to a centrifuge, robot arm, microscope, or PLC is a long-horizon coordination problem:
OpenMHP gives these devices a common agent-facing layer without replacing the control systems already underneath them. The job records what the instrument is doing, the lease prevents a second agent from interleaving commands, and the event stream keeps the agent informed without making it continuously poll the device.
The design follows a few rules:
An agent may propose an action. The device server decides whether it is allowed to run. OpenMHP complements hardwired e-stops, light curtains, PLC safety logic, and normal lab procedures; it does not replace them.
You need Node.js 18+ and Python 3.10+.
Open Claude Code or Codex and ask your agent:
Install OpenMHP for me by running `npx openmhp-cli setup`, then tell me when it is ready.
The agent will run:
npx openmhp-cli setup
The launcher installs an isolated runtime under ~/.openmhp, installs the bundled Agent
Skills, and registers the MCP server with Claude Code and Codex. Restart the agent after setup
if it does not immediately show the OpenMHP tools.
For another MCP client, use:
{
"mcpServers": {
"openmhp": {
"command": "npx",
"args": ["-y", "openmhp-cli"]
}
}
}
Prefer Python directly? Install the runtime with:
pip install "openmhp[all]"
npx openmhp-cli demo
npx openmhp-cli list
This adds a simulated thermocycler and plate-handling arm. They use the same discovery, description, safety, job, and event paths as real devices.
Find a thermocycler, show me its operating instructions, and rehearse a
3-cycle PCR at 95/58/72 °C before running it.
The normal operating loop is:
Try asking for a 200 °C thermocycler setpoint. The driver should refuse it and return the allowed range.
Talk to the agent in terms of the work you want done:
| You ask | OpenMHP does |
|---|---|
| “Find the instruments on my network.” | Scans mDNS and known hosts for OpenMHP devices and returns compact device cards. |
| “Onboard my hotplate.” | Interviews the owner, writes and validates a device package, and produces a safety card for review. |
| “Run a 30-cycle PCR and hold at 4 °C.” | Finds a compatible device or recipe, rehearses the procedure, runs it as a job, and reports measured results. |
| “Watch the incubator overnight.” | Runs a background monitor and stores readings and alerts with the run. |
| “Which GC method should I use for ethanol?” | Searches versioned methods associated with the device and project. |
| “Stop everything now.” | Requests e-stop for every device touched by the session. |
You can use the same protocol without an agent:
mhp http://localhost:18921 describe summary
mhp http://localhost:18921 read block_temperature lid_closed
mhp http://localhost:18921 write target_temperature 95 --dry-run
mhp http://localhost:18921 invoke run_protocol \
'{"steps":[{"temp":95,"hold_s":5}],"cycles":3}' --wait
mhp http://localhost:18921 estop "operator requested stop"
An OpenMHP deployment has three parts:
agent harness
│
│ MCP: find, describe, read, write, invoke, job, run, data, lab, method, estop
▼
OpenMHP bridge ───── directory of compact device cards
│
│ MHP over stdio or HTTP/SSE
▼
device server / lab node
│
│ vendor SDK, serial, OPC UA, ROS 2, SiLA 2, MQTT, ...
▼
physical instrument
Labs have invested years in control systems such as ROS 2, OPC UA, SiLA 2, MADSci, PyLabRobot, and MQTT. OpenMHP does not ask them to replace that work. It adds a common agent-facing layer above it:
The adapter translates each technology into the same discovery, job, lease, telemetry, and safety contract. The agent gets one way to interact with the lab while the lab keeps its existing drivers, orchestration, and operational knowledge. See the adapter guide for the supported mappings.
Read the rationale in the design principles, see the components in the architecture guide, and use SPEC.md as the normative protocol contract.
OpenMHP treats each device package the way Anthropic's Agent Skills treat procedural knowledge: the agent loads more detail only as the task narrows. The package can hold everything the instrument owner wants an agent to know without placing all of it in the model's context at once.
The package loads in three levels:
This progressive disclosure keeps context small as the lab grows. In the included 2,000-device scale demo, finding five candidates, opening one device, and loading the two items used takes about 1,270 tokens, compared with about 1.22 million tokens for loading every descriptor up front.
A package keeps human guidance and machine-enforced behavior together:
devices/hotplate-01/
├── DEVICE.md searchable card + operating instructions
├── descriptor.yaml signals, settings, actions, limits, interlocks, safety
├── driver.py native driver, BoundDriver, or adapter
├── sim.py simulated twin (recommended)
├── references/ SOPs, manual excerpts, calibration notes
├── scripts/ tested end-to-end procedures
└── methods/ optional versioned methods for named procedures
DEVICE.md is readable by people and agents. descriptor.yaml contains the parts the runtime
can validate and enforce. The driver implements the hardware-specific hooks while the base
driver supplies the common protocol, job handling, notifications, and safety gates.
The model's context helps it reason; it is not the safety boundary. The driver remains beside the hardware and checks limits, interlocks, approvals, leases, and device state on every call, whether or not those rules are currently in the model's context.
Because the package is the rulebook, changing one is not the agent's to do either. The lab records
which package files were accepted for each device, refuses to operate a device whose files are not
those, and puts any change to a limit, interlock, or approval level to the owner with the exact diff
before it is enforced. mhp lab accept <id> is the owner's own way to accept one.
supported-devices holds ready-made packages for instruments that talk to
OpenMHP directly: a driver, a simulated twin, operating instructions and a setup note each. Add
one to a lab with mhp lab add github:kushalsinha/openmhp/supported-devices/<name> (append
--sim for the twin), then set the limits to your own rig. The
list says, per device, whether the driver has been run on real
hardware or only against its twin.
A package carries the instrument's capabilities; the limits, interlocks and procedures are your
lab's. Keep your edited copies, your recipes and your SOPs in your lab's repository, review limit
changes like code, and deploy them to the bench computers that serve those devices. The packages
in openmhp/devices are simulated reference devices for learning and testing
the protocol.
Start with the route that matches the hardware:
| Instrument today | Recommended route |
|---|---|
| Already exposes OpenMHP | Scan and add its URL |
| Operated by a person | Use the manual driver so it can join procedures while preserving operator steps |
| Uses serial/USB text commands | Declare the commands in descriptor.yaml; no custom protocol code is needed |
| Already uses OPC UA, ROS 2, SiLA 2, MADSci, PyLabRobot, or MQTT | Use the matching adapter |
| Has a vendor Python SDK or another API | Subclass Driver or bind existing Python callables with BoundDriver |
From an agent, say:
Onboard my IKA hotplate. I have the manual and can confirm its limits and stop procedure.
To serve packages from the bench computer attached to the instruments:
npx openmhp-node setup
Or use Python directly:
mhp node ~/instruments --http 18900
mhp node ~/instruments --http 18900 --install-service
A node serves other machines, so it generates a token the first time it starts
(~/.openmhp/device_token) and requires Authorization: Bearer <token> on /rpc and /events.
Copy it to the machine running the bridge (export OPENMHP_DEVICE_TOKEN=...); discovery stays
open, so mhp lab scan still finds the devices. --host 127.0.0.1 keeps a node to its own
machine and needs no token; --no-auth serves the network without one, and callers from off the
machine can then no longer confirm approval-gated operations.
Before real operation, have the instrument owner review DEVICE.md, verify limits and
interlocks against the manual, prove out-of-range requests are refused, test e-stop and loss of
contact behavior, and keep the manufacturer's safety systems in place. OpenMHP is currently an
experimental preview tested primarily with simulators and fake vendor clients; supervise real
hardware deployments.
The full walkthrough is Add an instrument. For a lab with many existing devices, see Adapters and Lab nodes.
OpenMHP is developed like a protocol project. Contributions should make the protocol clearer,
more interoperable, easier to implement, or better tested. A package for an instrument others
also own is welcome in supported-devices; lab-specific limits, private
SOPs, and recipes belong in the lab's own repository rather than upstream.
Useful contributions include:
Before starting a substantial change, open an issue describing the protocol problem, the affected implementations, and the behavior you propose. This gives the design discussion a place to happen before code fixes one interpretation into the reference implementation.
git clone https://github.com/kushalsinha/openmhp.git
cd openmhp
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[all]"
Run the test suite:
python tests/test_adapters.py
python tests/test_runs.py
python tests/test_safety_gates.py
python tests/test_inclusion.py
python tests/test_methods.py
Read CONTRIBUTING.md for proposal and pull-request expectations. Protocol questions, roadmap work, interoperability gaps, bugs, and design proposals belong in GitHub Issues.
| Path | Purpose |
|---|---|
openmhp/driver.py | Driver base class, state machine, jobs, safety gates, and notifications |
openmhp/package.py | Device-package loading and progressive description tiers |
openmhp/mcp_bridge.py | Fixed MCP tool surface over a lab or directory |
openmhp/client.py | Python client and multi-device Lab API |
openmhp/runs.py | Plans, background runs, logs, and run artifacts |
openmhp/methods.py | Versioned instrument methods and project history |
openmhp/adapters/ | OPC UA, ROS 2, SiLA 2, MADSci, PyLabRobot, MQTT, and callable bindings |
openmhp/devices/ | Bundled reference devices and simulated twins |
openmhp/recipes/ | Reusable multi-step procedures |
supported-devices/ | Ready-made device packages for specific instruments, each with a simulated twin |
tests/ | Simulator and fake-client coverage |
OpenMHP is a pre-1.0 experimental protocol. Expect breaking changes between minor versions. The roadmap tracks what is implemented and what remains out of scope. Use real hardware only with qualified supervision and independent safety controls.
Apache License 2.0. See LICENSE.
OpenMHP is an independent, community-driven project. It is not affiliated with, endorsed by, or sponsored by Anthropic, the OPC Foundation, Open Robotics, the SiLA Consortium, MADSci, PyLabRobot, or any instrument vendor. Names are used only to describe compatibility.