
adancurusul/serial-mcp-server 是从 https://github.com/adancurusul/serial-mcp-server. 导入的 MCP 服务器候选
概览
adancurusul/serial-mcp-server 是从 https://github.com/adancurusul/serial-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
serial-mcp-server 为 AI 工作流程提供了两种形式的串口访问:
- 支持 MCP 工具的客户端的 MCP 标准服务器。
- 可脚本化的CLI,用于直接使用、CI和代理技能,无需设置MCP。
当前释放目标:0.3.0。
语言版本:英文 |中文
0.3.0 更新简报
- 增加了JSON宏DSL自动化,支持可重复串行过程。
- 增加了CLI宏命令:
macro validate、macro list、macro plan和macro run。 - 新增了用于运行时内存包加载/列表/卸载、规划和运行的MCP宏工具。
- 新增了显式无硬件模拟功能,用于宏验证、规划和执行器烟雾测试。
- 将Quick排除在公共API之外。Quick风格的用例应以宏表示。
宏自动化
当串行工作流程超过单次读写时,使用宏。许多设备要求定时顺序:发送命令,等待几毫秒,读取直到出现提示或确认,然后发送下一个命令。宏包将过程记录为 JSON 格式,以便人工、CLI 脚本或 AI 代理验证、检查计划、无硬件模拟,并在连接设备时对真实端口运行。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Serial MCP Server
serial-mcp-server provides serial port access for AI workflows in two forms:
- MCP stdio server for clients that support MCP tools.
- Scriptable CLI for direct use, CI, and agent skills without MCP setup.
Current release target: 0.3.0.
Language versions: English | Chinese
0.3.0 Update Brief
- Added JSON Macro DSL automation for repeatable serial procedures.
- Added CLI macro commands:
macro validate,macro list,macro plan, andmacro run. - Added MCP macro tools for runtime in-memory pack load/list/unload, plan, and run.
- Added explicit no-hardware simulation for macro validation, planning, and executor smoke tests.
- Kept Quick out of the public API. Quick-style use cases should be represented as macros.
Macro Automation
Use macros when a serial workflow is more than a single read or write. Many devices require a timed sequence: send a command, wait a few milliseconds, read until a prompt or acknowledgement appears, then send the next command. A macro pack records that procedure as JSON so a human, CLI script, or AI agent can validate it, inspect the plan, simulate it without hardware, and run it against a real port when a device is attached.
Typical macro use cases:
- Boot or provisioning flows that need ordered commands and delays.
- Protocol handshakes that must wait for
OK,READY,PONG, prompts, or other expected responses. - Regression smoke tests where the same serial procedure should run repeatedly.
- AI-assisted debugging where the agent should review the full send/delay/expect plan before touching hardware.
The v0.3 DSL is intentionally small:
send: write UTF-8, hex, or base64 bytes.delay: wait for a fixed number of milliseconds.expect: read until the response contains or equals expected bytes.assembly: compose named macros into a longer workflow.
AI agents can discover macro support from this README, from the bundled skills/serial-debug skill, by running serial-mcp-server macro --help, or through MCP tool discovery when the server is configured. Agents that do not use MCP can still use the CLI plus the skill docs.
Requirements
- Rust 1.74 or newer.
- A serial device or USB-to-serial adapter when running hardware operations.
- Device drivers and OS permissions for the selected serial port.
Install From Source
git clone https://github.com/adancurusul/serial-mcp-server.git
cd serial-mcp-server
cargo build --release
The binary is built at:
target/release/serial-mcp-server
To install the CLI onto your PATH from a checkout:
cargo install --path . --locked
CLI Usage
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"serial": {
"command": "/path/to/serial-mcp-server/target/release/serial-mcp-server",
"args": ["serve"],
"env": {
"RUST_LOG": "info"
}
}
}
}