
Opentrons
STDIOMCP server for Opentrons robot automation and API documentation with control capabilities
MCP server for Opentrons robot automation and API documentation with control capabilities
A Model Context Protocol (MCP) server for Opentrons robot automation and API documentation. This tool provides both comprehensive API documentation and direct robot control capabilities for Opentrons Flex and OT-2 robots.
npm install -g opentrons-mcp
git clone https://github.com/yerbymatey/opentrons-mcp.git cd opentrons-mcp npm install
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "opentrons": { "command": "opentrons-mcp", "args": [] } } }
If installed from source:
{ "mcpServers": { "opentrons": { "command": "node", "args": ["/path/to/opentrons-mcp/index.js"] } } }
Search Opentrons HTTP API endpoints by functionality, method, path, or keyword.
query
(required): Search termmethod
(optional): Filter by HTTP method (GET, POST, PUT, DELETE, PATCH)tag
(optional): Filter by API categoryinclude_deprecated
(optional): Include deprecated endpointsGet comprehensive details about a specific API endpoint.
method
(required): HTTP methodpath
(required): API endpoint pathList all endpoints in a specific functional category.
category
(required): API category (Health, Control, Protocol Management, etc.)Get high-level overview of the Opentrons HTTP API structure and capabilities.
Upload a protocol file to an Opentrons robot.
robot_ip
(required): Robot IP addressfile_path
(required): Path to protocol file (.py or .json)protocol_kind
(optional): "standard" or "quick-transfer" (default: "standard")key
(optional): Client tracking keyrun_time_parameters
(optional): Runtime parameter valuesList all protocols stored on the robot.
robot_ip
(required): Robot IP addressprotocol_kind
(optional): Filter by protocol typeCreate a new protocol run on the robot.
robot_ip
(required): Robot IP addressprotocol_id
(required): ID of protocol to runrun_time_parameters
(optional): Runtime parameter valuesControl run execution (play, pause, stop, resume).
robot_ip
(required): Robot IP addressrun_id
(required): Run ID to controlaction
(required): "play", "pause", "stop", or "resume-from-recovery"List all runs on the robot.
robot_ip
(required): Robot IP addressGet detailed status of a specific run.
robot_ip
(required): Robot IP addressrun_id
(required): Run ID to checkCheck robot health and connectivity.
robot_ip
(required): Robot IP addressTurn robot lights on or off.
robot_ip
(required): Robot IP addresson
(required): true to turn lights on, false to turn offHome robot axes or specific pipette.
robot_ip
(required): Robot IP addresstarget
(optional): "robot" for all axes, "pipette" for specific mountmount
(optional): "left" or "right" (required if target is "pipette")
Screenshot showing the Opentrons MCP server in action with Claude Desktop after asking for current protocols with opentrons for the Flex, give it the robot ip!
Once configured, you can use natural language to control your robot:
Upload a protocol:
Upload the protocol file at /path/to/my_protocol.py to my robot at 192.168.1.100
Check robot status:
Check if my robot at 192.168.1.100 is healthy and ready
Run a protocol:
List all protocols on my robot, then create and start a run for the latest one
Monitor progress:
Show me the status of run abc123 on my robot
import { Client } from "@modelcontextprotocol/sdk/client/index.js"; // Connect to MCP server const client = new Client(/* transport */); // Upload protocol await client.request({ method: "tools/call", params: { name: "upload_protocol", arguments: { robot_ip: "192.168.1.100", file_path: "/path/to/protocol.py", protocol_kind: "standard" } } });
Ensure your Opentrons robot is:
You can verify connectivity by visiting http://your-robot-ip:31950/health
in a browser.
This tool provides access to the complete Opentrons HTTP API, including:
For detailed API documentation, use the search and documentation tools provided by this MCP server.
Contributions are welcome! Please feel free to submit issues and pull requests.
No license go brazy