Skip to main content
MCP server CX Codex

Modbus TCP/RTU Device — Claude Code MCP server: setup guide

MCP server connecting AI assistants to industrial hardware over Modbus TCP or RTU. It translates raw registers into named physical metrics and enforces point safety limits.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio modbus -- uvx labmcp-modbus
Open on GitHub

What Modbus TCP/RTU Device does

Instead of exposing raw memory addresses directly to an agent, the server relies on register maps in YAML or JSON. Each mapped point specifies data types like int16 or float32, byte order, multiplier scales, and engineering units. The assistant reads temperatures or status codes directly in units such as degrees Celsius or text states.

Every writable numeric field must define bounds. Out-of-bounds commands get rejected immediately before transmission, and the server blocks unmapped writes to protected addresses. After every write, it reads back the register to confirm the update. A dedicated safe-state routine can reset critical outputs even under read-only mode.

Developers can test workflows using an included thermal controller simulator without physical gear. The codebase currently holds simulated status, having passed checks against pymodbus software instances rather than verified physical machines.

What it helps with

  • control industrial instruments using human-readable tags
  • prevent invalid register values via automatic range validation
  • execute an emergency safe-state routine across multiple registers
  • test Modbus control logic against a simulated PID loop

Example prompts for the agent

  • Read the current temperature from the controller using labmcp-modbus
  • Set the setpoint to 45.0 degrees according to oven.yaml
  • Execute apply_safe_state to shut down active outputs

How to install Modbus TCP/RTU Device

Platform CLI

claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio modbus -- uvx labmcp-modbus

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-modbus <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Modbus TCP/RTU Device

How to install Modbus TCP/RTU Device in Claude Code?

Run claude mcp add labmcp-modbus -- uvx labmcp-modbus for standard setup. If you pass environment variables for network addressing or simulation flags, use `claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio modbus -- uvx labmcp-modbus`.

What does Modbus TCP/RTU Device do?

It allows language models to monitor and configure Modbus TCP and RTU hardware. By applying register maps, it translates binary memory words into scaled units and checks bounds before writing.

Can I test it without connecting physical hardware?

Yes, launching with --simulate spins up a simulated PID temperature loop. You can test register configurations and verify tool calls entirely on your local machine.

Similar MCP servers

All MCP servers for Automation and no-code: n8n, Zapier, Make →

From the same set28

NI-DAQmx DAQ Devices An MCP server that hands an AI agent control over National Instruments hardware through the NI-DAQmx driver: voltage and thermocouple reads, digital line reads, analog and digital writes. CX Codex +1 ★ 23repo stars New Era Syringe Pump Controls New Era NE-1000 syringe pumps through RS-232 serial commands. Useful for microfluidic dosing, liquid handling, and automated lab experiments with an AI agent. CX Codex +1 ★ 23repo stars LC-MS Worklist Builder Builds and checks LC-MS sample queues, then writes files for import into vendor software. Use it to prepare a run list without starting an acquisition. CX Codex +1 ★ 23repo stars Mass Spectrometry Data (mzML, Bruker TDF, vendor conversion) Lets an agent browse LC-MS runs, plot chromatograms, pull spectra, locate MS2 scans by precursor m/z and run a quick QC. CX Codex +1 ★ 23repo stars Micro-Manager Microscope This MCP server connects an agent to microscopes running Micro-Manager. Use it to capture images, adjust stage and focus, switch configuration groups, or collect image sequences. CX Codex +1 ★ 23repo stars Lake Shore Temperature Controller Connects Lake Shore 335, 336, and 350 temperature controllers to AI assistants. It monitors cryostat sensors, adjusts loop settings, and shuts off heaters. CX Codex +1 ★ 23repo stars LabJack T-series DAQ Connect an AI agent to LabJack T4, T7/T7-Pro, or T8 for input readings, thermocouple measurements, and waveform capture. Use it to inspect signals or control device outputs through chat. CX Codex +1 ★ 23repo stars Keithley SourceMeter SMU Lets an agent drive a SourceMeter SMU: set a source level with a compliance cap, take V and I readings, run stepped IV sweeps. Useful when the instrument sits on a bench. CX Codex +1 ★ 23repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor