plr-mcp
A Model Context Protocol server for PyLabRobot that exposes liquid handler, plate reader, thermocycler, and heater-shaker as MCP tools. It ships in simulation mode by default, allowing end-to-end testing without hardware.
README
plr-mcp
A Model Context Protocol server for PyLabRobot. It exposes a liquid handler, a plate reader, a thermocycler, and a heater-shaker as MCP tools, so any MCP client (Claude Desktop, Claude Code, or your own agent) can run lab-automation steps by calling tools instead of writing PyLabRobot code.
It ships in simulation mode by default. Every tool runs end to end against PyLabRobot's chatterbox backends with no instruments attached, so you can try the whole thing on a laptop. Point it at real hardware by setting one environment variable (see below).
Verified against PyLabRobot 0.2.1.
Why an MCP server (and not just tool-use)
Driving PyLabRobot from a Claude skill or direct tool-calls is tool-use inside one agent. An MCP server is a standalone process that speaks the Model Context Protocol over stdio, so any MCP client can discover and call these tools without knowing anything about PyLabRobot. This repo is the server.
Install
git clone https://github.com/di-omics/plr-mcp.git
cd plr-mcp
pip install -e .
This pulls in mcp and pylabrobot.
Prove it works (no hardware)
python examples/smoke_test.py
It drives every tool through the chatterbox backends and prints ALL OK when
the run succeeds.
Run the server
plr-mcp # stdio transport, chatterbox simulation
PLR_MCP_BACKEND=star plr-mcp # target a real Hamilton STAR instead
Tools
| Tool | What it does |
|---|---|
setup_deck |
Build the liquid handler for the chosen backend and, for the Hamilton family, place a tip rack and a 96-well plate. Call this first. |
deck_state |
List the resources on the deck and the run mode. |
pick_up_tips |
Pick up tips from the tip rack for a well range (for example A1:H1). |
drop_tips |
Return tips to the rack. |
aspirate |
Aspirate a volume from each plate well in a range. |
dispense |
Dispense a volume into each plate well in a range. |
transfer |
One head pass: pick up, aspirate, dispense, drop. |
read_plate |
Read absorbance, fluorescence, or luminescence. |
thermocycler |
Set block or lid temperature, open or close the lid, deactivate, status. |
heater_shaker |
Set temperature, shake, stop, deactivate, status. |
generate_analysis_pipeline |
Generate the fastq-to-analysis pipeline for FLASH-seq UMI scRNA-seq: a shell pipeline from bcl to a UMI count matrix (bcl2fastq, umi_tools, STAR, samtools, featureCounts), plus a scanpy script from counts to clusters. External tools are not bundled. |
Well ranges use PyLabRobot syntax: a single well A1, a column A1:H1, or a
partial column A1:D1.
Connect a client
Claude Code
claude mcp add plr -- plr-mcp
Claude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"plr": {
"command": "plr-mcp"
}
}
}
If plr-mcp is not on the client's PATH, use the absolute path to the console
script (which plr-mcp) or run it as python -m plr_mcp.server.
Backends
Pick the liquid-handling backend with PLR_MCP_BACKEND, or override it per
session in a setup_deck call (backend="star", etc.).
| Backend | PyLabRobot backend | Deck | Runs with no hardware |
|---|---|---|---|
chatterbox |
LiquidHandlerChatterboxBackend |
STARLet | yes (default) |
star |
STARBackend (Hamilton STAR) |
STARLet | no |
ot2 |
OpentronsOT2Backend (needs host) |
OTDeck | no |
evo |
EVOBackend (Tecan Freedom EVO) |
EVO150 | no |
Only chatterbox runs with no instrument. The other three construct the real
PyLabRobot backend (correct API for 0.2.1) and attempt to connect; if no
instrument is reachable, or a vendor extra such as pylabrobot[opentrons] is
not installed, setup_deck reports that in notes instead of crashing. The
Hamilton tip and plate auto-load only for chatterbox and star; ot2 and
evo use vendor-specific labware, so load your own.
For ot2, pass the robot IP:
PLR_MCP_BACKEND=ot2 PLR_MCP_OT2_HOST=169.254.1.1 plr-mcp
The non-liquid-handling instruments (plate reader, thermocycler, heater-shaker)
run on chatterbox simulation and expose real hardware backends as clearly
marked extension points in plr_mcp/lab.py (the _ensure_* methods). Wire in
your own (for example an Inheco ODTC thermocycler or a BioTek reader) and
validate on your deck before trusting a run.
Layout
plr_mcp/
lab.py stateful PyLabRobot wrapper (all the real calls live here)
server.py FastMCP server, one thin tool per Lab method
tests/
test_lab.py pytest suite, runs on chatterbox (no hardware)
examples/
smoke_test.py end-to-end run with no hardware
Development
pip install -e '.[dev]'
ruff check plr_mcp tests # lint
ruff format --check plr_mcp tests
mypy plr_mcp --check-untyped-defs
pytest -q
CI runs all four on Python 3.10 through 3.13 for every push and pull request.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。