Skip to main content

🔌 serial-mcp

MCP server for serial port communication. Provides tools to open, read, write, and manage serial ports through the Model Context Protocol.

🤖 Written by and for AI.

✨ Features

  • 📋 List available serial ports on the system
  • ⚙️ Open ports with configurable baud rate, parity, stop bits, and flow control
  • 📖 Read data by byte count, terminator character, or duration
  • ✍️ Write string or hex data
  • 💥 Send BREAK signals
  • 📊 Monitor port status and control line states

📦 Prerequisites

  • Python 3.10+
  • uv package manager

🚀 Installation

Via PyPI

uvx serial-mcp@latest

Local Clone

git clone https://github.com/davidalo/serial-mcp.git
cd serial-mcp
uvx --from "$(pwd)" serial-mcp

🔗 Integration

Via PyPI

# Claude Code
claude mcp add serial -- uvx serial-mcp@latest

# Codex CLI
codex mcp add serial -- uvx serial-mcp@latest

Local Clone

git clone https://github.com/davidalo/serial-mcp.git
cd serial-mcp

# Claude Code
claude mcp add serial -- uvx --from "$(pwd)" serial-mcp

# Codex CLI
codex mcp add serial -- uvx --from "$(pwd)" serial-mcp

🛠️ Tools

Tool Description
list_ports List available system serial ports
open_port Open a serial port with configuration (baud rate, parity, stop bits, etc.)
close_port Close an open port
write_data Write string or hex data to a port
read_bytes Read N bytes with timeout
read_until Read until a terminator character
read_for_duration Read continuously for N seconds
send_break Send a BREAK signal
get_port_status Get port status and control line states
list_open_ports List all currently managed ports

🧪 Testing with Virtual Ports

Use socat to create virtual serial port pairs for testing:

# Create virtual port pair
socat -d -d pty,raw,echo=0,link=/tmp/ttyV0 pty,raw,echo=0,link=/tmp/ttyV1

Then open /tmp/ttyV0 with the MCP server and /tmp/ttyV1 with another terminal program to test communication.

📄 License

MIT

Metadata

Release files for serial-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for serial-mcp 0.3.0
File Size Uploaded Provenance
serial_mcp-0.3.0.tar.gz 6.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for serial-mcp 0.3.0
File Interpreter ABI Platform
serial_mcp-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / serial_mcp-0.3.0.tar.gz

Download URL serial_mcp-0.3.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
49ddcc8ad13dcad23ea112ef526f85ddba0ae3420b6e553afaaed6510074a46e
BLAKE2b-256 checksum
How to use checksums
ff152f8690ea977c2e4232935a8793c3e6232ad13cf6ce0ddc9a06d806548873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / serial_mcp-0.3.0-py3-none-any.whl

Download URL serial_mcp-0.3.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
985c532f85e64104a47ab298e52a38ca2d876b70bc306d720771e43b2d2a07ec
BLAKE2b-256 checksum
How to use checksums
6d5b8fb80feafdad72f813f37b6999eb0da5b5e54d5fddcd8c5948c926fdab2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for serial-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page