mhs_demo_server
mhs-demo
A demo agent that operates simulated lab hardware (a CO2 incubator and a centrifuge) through an MCP server, in the pattern described by Anthropic's Model Hardware Standard (MHS) research preview.
This is not Anthropic's real MHS SDK. As of this writing MHS is a gated
research preview — no public spec, package, or sample code has been released.
This repo reimplements the pattern from that announcement (device
discovery + read/write primitives + natural-language safety-limit
metadata) against two simulated instruments, so the agent-loop shape is ready
to swap onto real MHS drivers once they ship.
What's here
mhs_demo_server.py— an MCP server exposing three tools over stdio:list_devices— discover devices, parameters, units, and safety limitsread— get a parameter's current valuewrite— set a parameter; rejected if unwritable or outside safety limits (includes a cross-parameter interlock example: the centrifuge door can't unlock while it's spinning)
mhs_demo_agent.py— a Claude agentic loop that discovers the MCP server's tools, converts them to Anthropic tool schemas, and calls them to satisfy a user request end to end.
Simulated devices:
Device | Parameters |
|
|
|
|
Setup
pip install -r requirements.txt
export ANTHROPIC_API_KEY=sk-ant-... # or create a .env file with this lineRun
python mhs_demo_agent.py
# or with a custom prompt:
python mhs_demo_agent.py "Set the incubator to 39C and spin the centrifuge at 20000 RPM"The agent spawns mhs_demo_server.py as a subprocess over stdio, discovers
its tools, and runs a tool-use loop with Claude until the model returns a
final answer.
Model
Uses claude-opus-4-6 via the Anthropic SDK.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sidman76/mhs-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server