Let AI agents interact with serial devices β list ports, connect, send, and read.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A stateful serial port Model Context Protocol (MCP) server for developer tooling and AI agents. Works out of the box with Claude Code, VS Code with Copilot, and any MCP-compatible runtime. Communicates over stdio and uses pyserial for cross-platform serial on macOS, Windows, and Linux.
Example: Let Claude Code list available serial ports, connect to your microcontroller, reset it via DTR, and read the boot banner from your hardware.
Video walkthrough β connecting to a serial device, sending commands, reading responses, and creating plugins.
If youβve ever copy-pasted commands into screen or minicom, guessed baud rates, toggled DTR to kick a bootloader, and re-run the same test sequence 20 times β this is for you.
You have a serial device. You want an AI agent to talk to it β open a port, send commands, read responses, debug protocols. This server makes that possible.
It gives any MCP-compatible agent a full set of serial tools: listing ports, opening connections, reading, writing, line-oriented I/O, control line manipulation β plus protocol specs and device plugins, so the agent can reason about higher-level device behavior instead of just raw bytes.
The agent calls these tools, gets structured JSON back, and reasons about what to do next β without you manually typing commands into a terminal for every step.
What agents can do with it:
Then in Claude Code, try:
"List available serial ports and connect to the one on /dev/ttyUSB0 at 115200 baud."

Once connected, the agent has full serial capabilities:
The agent can coordinate multi-step flows automatically β e.g., toggle reset, wait for prompt, send init sequence, stream output.
At a high level:
Raw Serial β Protocol Spec β Plugin
You can start with raw serial tools, then move up the stack as your device protocol becomes understood and repeatable.
MCP is a protocol β this server works with any MCP-compatible client. Below are setup instructions for the most common ones.
Add to your project's .vscode/mcp.json (or create it):
Adjust env to match your needs β set SERIAL_MCP_PLUGINS to specific plugin names, or add SERIAL_MCP_MIRROR for PTY mirroring.
Add to your project's .cursor/mcp.json (or create it). Cursor does not support dots in tool names, so SERIAL_MCP_TOOL_SEPARATOR must be set to _:
| Variable | Default | Description |
|---|---|---|
SERIAL_MCP_MAX_CONNECTIONS | 10 | Maximum simultaneous open serial connections. |
SERIAL_MCP_PLUGINS | disabled | Plugin policy: all to allow all, or name1,name2 to allow specific plugins. Unset = disabled. |
SERIAL_MCP_MIRROR | off | PTY mirror mode: off, ro (read-only), or rw (read-write). macOS and Linux only. |
SERIAL_MCP_MIRROR_LINK | /tmp/serial-mcp | Base path for PTY symlinks. Connections get numbered: /tmp/serial-mcp0, /tmp/serial-mcp1, etc. |
SERIAL_MCP_LOG_LEVEL | WARNING | Python log level (DEBUG, INFO, WARNING, ERROR). Logs go to stderr. |
SERIAL_MCP_TRACE | enabled | JSONL tracing of every tool call. Set to 0, false, or no to disable. |
SERIAL_MCP_TRACE_PAYLOADS | disabled | Include write data in traced args (stripped by default). |
SERIAL_MCP_TRACE_MAX_BYTES | 16384 | Max payload chars before truncation (only applies when TRACE_PAYLOADS is on). |
SERIAL_MCP_TOOL_SEPARATOR | . | Character used to separate tool name segments. Set to _ for MCP clients that reject dots in tool names (e.g. Cursor). |
| Category | Tools |
|---|---|
| Serial Core | serial.list_ports, serial.open, serial.close, serial.connection_status, serial.read, serial.write, serial.readline, serial.read_until, serial.flush, serial.set_dtr, serial.set_rts, serial.pulse_dtr, serial.pulse_rts |
| Introspection | serial.connections.list |
| Protocol Specs | serial.spec.template, serial.spec.register, serial.spec.list, serial.spec.attach, serial.spec.get, serial.spec.read, serial.spec.search |
| Tracing | serial.trace.status, serial.trace.tail |
| Plugins | serial.plugin.template, serial.plugin.list, serial.plugin.reload, serial.plugin.load |
Specs are markdown files that describe a serial device's protocol β connection settings, message format, commands, and multi-step flows. They live in .serial_mcp/specs/ and teach the agent what the byte stream means.
Without a spec, the agent can still open a port and exchange data. With a spec, it knows what commands to send, what responses to expect, and what the data means.
You can create specs by telling the agent about your device β paste a datasheet, describe the protocol, or just let it explore and document what it finds. The agent generates the spec file, registers it, and references it in future sessions. You can also write specs by hand.
Plugins add device-specific shortcut tools to the server. Instead of the agent composing raw read/write sequences, a plugin provides high-level operations like mydevice.read_temp or ota.upload_firmware.
The agent can also generate Python plugins (with your approval). It explores a device, writes a plugin based on what it learns, and future sessions get shortcut tools β no manual coding required.
To enable plugins:
Editing an already-loaded plugin only requires serial.plugin.reload β no restart needed.
Every tool call is traced to .serial_mcp/traces/trace.jsonl and an in-memory ring buffer (last 2000 events). Tracing is on by default β set SERIAL_MCP_TRACE=0 to disable.
Two events per tool call:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/serial-mcp-server)<a href="https://allmcps.com/mcp/serial-mcp-server"><img src="https://allmcps.com/api/badge/serial-mcp-server?style=directory" alt="Serial MCP Server on AllMCPs" /></a>