serial
A comprehensive MCP server for serial port communication
claude mcp add --transport stdio adancurusul-serial-mcp-server docker run -i adancurusul/serial-mcp-server:latest \ --env RUST_LOG="info"
How to use
This MCP server provides a production-ready serial port controller environment that exposes five serial tools (list_ports, open, write, read, close) via the MCP protocol. It integrates with Claude/AI assistants and supports cross-platform serial port discovery, connection management, and data encoding (UTF-8, Hex, Binary) with configurable timeouts. Once running, clients can request the available serial ports, open a chosen port with specific settings, send data, read responses with timeouts, and close the connection. The server is designed to work with real hardware such as STM32, Arduino, and ESP32 devices, and can be controlled through the MCP protocol by sending the standard tool commands to the server and receiving structured responses.
How to install
Prerequisites:
- Docker installed and running (recommended for the Docker-based setup below)
- Optional: Access to a host with serial hardware connected for testing
-
Install Docker (if not already installed)
-
Run the MCP server (Docker)
- This pulls and runs the latest serial MCP server image and exposes the MCP endpoint via the container
docker run -i adancurusul/serial-mcp-server:latest
-
Verify the server starts correctly
- Check the container logs for startup messages indicating MCP is listening
- If you need to customize logging, pass an environment variable like RUST_LOG=info when running the container
-
If you prefer building from source locally (Rust/Cargo)
- Prerequisites: Rust 1.70+ and cargo
git clone https://github.com/adancurusul/serial-mcp-server.git cd serial-mcp-server cargo build --release
./target/release/serial-mcp-server
-
Connect a client using MCP protocol
- Use the MCP tooling to configure the server endpoint and start issuing commands to list ports, open a port, write data, read responses, and close the connection
Additional notes
Tips and notes:
- If you encounter port detection issues, ensure the serial device is connected and has appropriate permissions (on Linux/macOS, you may need to add your user to the dialout or uucp groups).
- Timeouts are configurable when using the read tool; adjust the timeout to match device response times.
- For debugging, enable verbose logs by setting RUST_LOG=info (or higher) in the environment.
- The 5 tools (list_ports, open, write, read, close) are validated against real hardware; ensure your device is powered and configured (baud rate, parity, stop bits) as expected by your application.
- If running under Docker, you may need to pass through the host's serial devices (e.g., --device /dev/ttyUSB0:/dev/ttyUSB0) depending on your container runtime and OS to access physical ports.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key