UART serial port MCP server: expose local serial ports to AI assistants as standard MCP tools(串口转 MCP 服务器,以最适合 AI 的方式提供串口读写支持)
View on GitHub ↗UART 串口 MCP 服务器:把本地串口设备封装成标准的 MCP (Model Context Protocol) 工具,让 AI 助手(Claude Desktop、Cursor 及任何 MCP 客户端)直接读写串口。
- 9 个 MCP 工具:枚举端口、打开、运行时重配置、写、读、写+读、状态、清缓冲、关闭 - 完善的串口参数配置:波特率 / 数据位(5-8) / 校验位(none/even/odd) / 停止位(1,2) / 流控(none/software/hardware) / 读超时,均可在 uartopen / uartconfigure 中指定 - 内部参数可配置:环形缓冲大小 buffersize(默认 1 MiB)、空闲判定 idlems、单次拉取上限 maxbytes、总超时 timeoutms、读线程超时 readtimeoutms(默认 500ms,仅作读安全上限,不影响延迟) - 事件驱动/非阻塞读线程(平台适配层):Unix(Linux/macOS)用 poll(2) + 自建管道事件驱动;Windows 用 1ms 轮询 + bytestoread() 门控 + timeBeginPeriod(1),仅在数据就绪时 read(),读写延迟不再受读超时参数影响 - 上行数据不丢不堵:事件驱动/非阻塞读线程持续把串口数据囤积进环形缓冲;写满后覆盖最旧数据并累计溢出计数,返回值带 overflowdelta / overflowtotal,数据缺口可检测 - 二进制安全:数据以 hex 字符串传递(如 "41 54 0D 0A"),mode="text" 可切换 UTF-8 文本 - 单二进制交付:cargo build --release 产出单个可执行文件,Windows / Linux / macOS 均无需额外运行时
也可以直接从 Releases 下载对应平台的预编译二进制(Windows / Linux / macOS)。
验证安装成功:注册后调用 uartlistports 应返回本机串口列表(可能为空数组);若有 TX-RX 回环硬件,调用 uartexchange 发送的数据应原样返回。
Linux 用户注意:serialport 枚举 USB 端口信息依赖 libudev,编译前需先安装 Debian/Ubuntu:sudo apt-get install -y libudev-dev
MCP 客户端以 stdio 方式启动 server 子进程。通用配置(.mcp.json / Claude Desktop 等):
Windows 示例:"command": "C:\\tools\\ser2mcp.exe"。
Install the ser2mcp plugin package from https://github.com/woooooooooolf/ser2mcp. Use installsource with kind="auto" (or "plugin").
仓库根目录的 reasonix-plugin.json 将 ser2mcp 声明为标准 MCP 服务器(bin/ 内含 Windows / Linux / macOS 三平台预编译二进制与跨平台启动脚本):
1. 在 Reasonix 中执行 installsource:源填仓库 URL https://github.com/woooooooooolf/ser2mcp,kind 用 auto(自动识别为插件包)或显式 plugin,scope 默认 global 2. Reasonix 把整个仓库复制到自己的全局插件目录(Windows 为 %APPDATA%\reasonix\plugins\ser2mcp)
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/woooooooooolf--ser2mcp.html)
Turn serial devices into reusable, auditable tools for coding agents — discover, decode, visualize, capture, and replay.
do-md/homekbLocal-first personal Markdown knowledge base with semantic search, AI Q&A, MCP, desktop/web clients, and a self-hostable zero-data-at-rest relay.
liangyou09/lyshellAI-native terminal & SSH client — built-in DeepSeek Harness to launch agents in TUI or embedded Web UI, plus SFTP, serial/Telnet and MCP server.
mrpulor-gh/nuphus-mcpDesktop automation MCP server — computer use for any AI agent: control screen, windows, mouse/keyboard, and Chrome via Model Context Protocol (stdio)
omaekumiko2-create/kruLocal-first MCP password and credential manager for AI agents. Use passwords, API keys, SSH identities, and TOTP without exposing hidden plaintext to the model.
naw103/foremergeCatch intent conflicts before code conflicts. The open-source coordination protocol for coding agents, built above Git.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.