# Repository Briefing: jerry-token/serialbot
> Source: https://repoforai.com/repo/jerry-token/serialbot (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/jerry-token/serialbot
- **Official Docs / Website**: http://serialbot.aiany.cc/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Rust
- **License**: GPL-3.0
- **Engineering Health**: B (63/100 · Maintenance 35/35 · Adoption 6/25 · Releases 11/20 · License 11/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: MCP, Self-Hosted
- **Momentum**: 25 ★ total (+2 24h / +11 7d) · 1 forks
- **Topics**: `ai-agent`, `arduino`, `claude-code`, `cross-platform`, `embedded`, `esp32`, `iot`, `mcp`, `mcu`, `minicom`, `model-context-protocol`, `rust`
- **When to Use**: Best for: Embedded teams that want a coding agent to verify firmware on a locally attached board, with operator-visible actions and repeatable serial assertions. Skip if: A basic terminal or existing test harness already covers the workflow, or deployment requires a stable release, encrypted multi-user remote access, or a built-in AI assistant.

## Overview
```text
### Architecture & Core Mechanics
SerialBot is a Rust 2024 workspace with separate core, decode, jobs, MCP, and system crates. A Tauri desktop app in `app/src-tauri` and `serialbot-cli` share the same engine with the MCP server. The manifest lists `serialport` 4.10 for serial I/O and `encoding_rs` 0.8 for text encodings. Test sequences, command groups, and protocol files are reusable across the desktop, CLI, and MCP interfaces; custom wire formats are defined in TOML.

In the desktop workflow, the MCP client acts on the sessions the operator sees. The server handles read cursors, pattern matching, and timed waits locally instead of sending each byte to the model for interpretation. HTTP connects directly to the app, while the desktop executable's stdio entry point bridges to an already-running instance. Board-specific instructions and firmware semantics belong in the project; SerialBot provides transport and test primitives, not model inference or board knowledge.

### Key Capabilities & Differentiators
SerialBot handles concurrent serial sessions as well as TCP client, multi-client TCP server, and UDP connections. The desktop can show millisecond timestamps, text or HEX, ANSI colors, and splits based on inter-frame gaps. It also provides terminal emulation, live numeric plots, and search and filtering. Operators can control DTR and RTS, send BREAK, and schedule reset sequences. For flashing, the app releases the port to an external tool and reopens it afterward; it is not itself a board-specific programmer.

Modbus RTU, SLCAN, and custom TOML definitions cover frame decoding and construction, and send-and-expect sequences can be repeated with a result summary. The MCP waits and queries are useful when the agent needs a particular signal rather than a transcript: in a simulated 401-line boot test, `io.wait_for` returned 52 bytes in one call versus 28,143 bytes across three calls for `io.read`. Structured output has the opposite cost when the full sample is needed: 20 Modbus polls occupied 4 KB as HEX and 23 KB decoded.

### Trade-offs & Limitations
Compared with a minicom-style terminal, SerialBot earns its place when an agent and an operator need to inspect the same session or run repeatable board checks without manually copying logs. The extra setup is less compelling for an occasional console session or a bench that already has reliable scripted verification. Its tests are only as meaningful as their assertions: a `boot ok` match proves that the marker appeared, not that peripherals or timing behaved correctly. Approvals make mutations visible, but broad per-session approval reduces oversight of individual writes.

The local-first design limits default exposure, but opting into LAN access puts the endpoint on unencrypted HTTP with a bearer token as its only documented protection. Keep it on loopback unless the network and hardware access are deliberately controlled, and assess the external model client's data handling separately. Treat high-baud capture as a host-and-adapter acceptance test rather than a guarantee. The GPL-3.0-only license also matters if modified binaries or an appliance will be distributed.

### Hardware & Deployment Guide
Run the desktop app on the machine with access to the adapter, or install the separately packaged CLI for SSH, scripts, and CI. Desktop downloads include a Windows x64 installer and portable executable, a universal macOS build for macOS 11+, and Linux x64 and arm64 DEB or AppImage packages. Source builds require Rust 1.90. Linux users may need serial-device group access, and real-time read priority requires a separate permission. Verify beta artifacts and their provenance before making any exception for macOS notarization or Windows publisher warnings.

The serial tooling can run offline without an account or a local model. For agent access, enable MCP explicitly and configure the client with the default `127.0.0.1:9633/mcp` endpoint and bearer token, or use the stdio bridge to the app. Do not treat LAN mode as a secure remote-access channel. The beta series is still undergoing adapter and macOS validation: beta.10 added `/frame` construction to the terminal interfaces, and beta.11 introduced raised-priority serial reads. Validate sustained capture on the actual host and adapter before relying on it for CI.
```

## Key Capabilities
```text
- Shared engine: The Tauri app, serialbot-cli, and MCP server reuse test sequences, command groups, and protocol definitions.
- Agent controls: MCP is disabled by default; per-session access, approval prompts for port changes and writes, and AI-tagged output distinguish agent activity from operator activity.
- Selective reads: io.wait_for returned 52 bytes versus 28,143 bytes for a full read in a simulated 401-line boot test; cursors allow incremental reads.
- Protocol tooling: Modbus RTU, SLCAN, and custom TOML definitions support frame decoding and field-based construction with automatic length and CRC where specified.
- Bench automation: The app hands the port to an external flasher and reclaims it afterward; the CLI can repeat send-and-expect scripts and report the results.
- Capture interfaces: Concurrent sessions support serial, TCP client/server, and UDP, with timestamped text or HEX views, terminal emulation, and live plots.
```

## Quick Start / Clone
```bash
cd app && npm ci && npm run tauri dev     # run the desktop app
cargo test --workspace                    # Rust tests
cd app && npm test                        # frontend tests
cargo run -p serialbot-cli -- mcp serve   # MCP server only, without a window
```
