Bench

io.github.seayniclabs由 GitHub 账号 seayniclabs 发布v0.4.3更新于 Oct 30, 2026

USB hardware discovery for AI tools: find maker boards, serial ports and chips.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

原生 macOS MCP 服务器,让 AI 助手发现 USB 开发板、识别芯片、读写串口,并在批准后烧录固件。

可以做什么
  • 发现与检查 USB 设备:枚举设备、识别开发板、读取描述符、集线器拓扑、供电信息、事件与快照
  • 操作串口:列出、打开、读取、写入、写入并等待预期响应、监视与关闭
  • 固件相关:检测芯片类型,并通过 esptool、dfu-util、avrdude 或 UF2 烧录固件
  • 收发原始 HID 报告,并把 ESP32 或 ARM 崩溃转储解析到源码行
  • 设备管理:复位端口、弹出设备、给设备打标签、运行诊断
  • 提供内置技能提示与资源,涵盖上手、串口调试、安全烧录与系统化调试
适用场景
适合在 Mac 上使用 Arduino、ESP32、Raspberry Pi Pico 等已连接开发板的开发者,希望助手识别开发板、找到串口、调试串口输出或崩溃,并烧录固件。
运行要求
本地 macOS 14 或更高版本(Apple Silicon 或 Intel);本版本不支持 Linux。可通过 MCP Bundle、Homebrew(需 Xcode 16.3 或更高版本)、固定版本源码构建或 Claude Code 插件安装。烧录固件需已安装 esptool、dfu-util、avrdude 或 UF2;崩溃解析使用 addr2line。可用 BENCH_MODULES、BENCH_DEBUG_ENABLED、BENCH_APPROVE_DEVICE_WRITES、BENCH_APPROVAL_LOG、BENCH_ADDR2LINE、BENCH_SKILLS_DIR 等环境变量配置。无需凭据或网络访问。
安装前请注意
多个工具会改动硬件:serial_write、serial_write_and_expect、flash_firmware、port_reset、eject_device、chip_detect 以及非读取类 hid_send 需要客户端批准,模型自带的 confirm 标志不算数。设置 BENCH_APPROVE_DEVICE_WRITES=1 会取消该提示,仅在完全信任 AI 客户端的每次工具调用时才这样做。tag_device、snapshot_state、serial_open、serial_close 无需批准即可执行。它会在本地写入批准日志和设备标签文件;二进制为临时签名而非公证,下载后请核对校验值。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Bench,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Bench]

Bench

Made by Seaynic Labs. Need tools like this built around your own systems? We do that.

USB hardware discovery for your AI tools.

Bench is a native macOS MCP server for developers who work with boards plugged into their Mac: Arduino, ESP32, Raspberry Pi Pico and other USB boards. It names the board, finds its serial port, reads and writes that port, detects the chip, decodes crash dumps, and flashes firmware with your approval. Bench is free and open source, made by Seaynic Labs.

Security card
NetworkNone. Bench makes no network calls and sends no telemetry.
FilesReads the skills folder beside the binary. Writes the approval log (~/.local/state/bench/approvals.jsonl, arguments redacted; BENCH_APPROVAL_LOG moves it). Tags only: ~/.bench/device-tags.json (tag_device). Nothing else is written.
SecretsBench stores no credentials and needs none. Its settings are environment variables only, and it never returns them to the model.
Read-only tools13: ping, list_usb_devices, get_device_info, identify_device, list_serial_ports, hub_topology, power_info, monitor_events, diagnose_device, device_descriptors, serial_read, serial_monitor, bench_modules
Needs your approval7: eject_device, port_reset, flash_firmware, chip_detect, hid_send, serial_write, serial_write_and_expect. The client shows each call; the model's own confirm flag does not count. hid_send needs approval except for its read actions.
Changes without approvaltag_device, snapshot_state, serial_open, serial_close: open or close a port, or change Bench's own tag and snapshot data. No device write.
Startup costabout 6,000 tokens (24 tools, 5 skill prompts)
ChangesTool and prompt text is locked by hash (tool-manifest.lock.json); CI fails if it changes without the lock.

First five minutes

  1. Install it: brew install seayniclabs/tap/bench (see Install).
  2. Run bench --doctor. It prints one line per check and a FIX line for each problem.
  3. Connect your AI client (see Connect your AI client).
  4. Ask it to call bench_modules. It lists the modules that are on and their tools.
  5. Plug in a board and ask: "Which boards are connected, and which serial port is each one on?"

Audience and modules

Bench is for developers working with connected hardware. It is one server made of modules. You switch modules on or off. Every module that shipped before 0.4.0 is on by default. A module added in a later release ships off, so you choose to turn it on.

ModuleStatusWhat it does
coreReady (always on)Health check and module discovery
usbReadyEnumerate, identify and inspect USB devices; hub tree; power; events; snapshots; port reset; eject
serialReadyList serial ports; open, read, write, write-and-expect, monitor and close them
firmwareReady (needs the flashing tool installed)Detect chip type; flash with esptool, dfu-util, avrdude or UF2
hidReadySend and read raw HID reports
debugReady, off by default (new in 0.4.0)Decode ESP32 Guru Meditation and ARM HardFault dumps into source lines with addr2line

Linux is not in this release. It is planned behind the same tools.

Skills

Skills are short, tested guides for the jobs Bench does. Any app that speaks MCP gets them as prompts (one per skill) and resources (every file in the skill). Apps that read Agent Skills directly load the same skills/ folder.

SkillUse it for
getting-startedSetting up Bench, switching modules, reading approvals and errors
board-bring-upTaking a new board from USB to a working serial round trip
serial-debuggingGarbled, silent, looping or unresponsive serial output, and crash dumps
safe-flashingFlashing firmware: checking the target and the file, then the approved write
systematic-debuggingFinding the cause of a bug before changing code (credited, see CREDITS.md)

Tools

25 tools in total. 24 are on by default; decode_crash needs the debug module.

core: ping, bench_modules

usb: list_usb_devices, get_device_info, identify_device, eject_device, hub_topology, tag_device, port_reset, power_info, monitor_events, snapshot_state, diagnose_device, device_descriptors

serial: list_serial_ports, serial_open, serial_read, serial_write, serial_write_and_expect, serial_close, serial_monitor

firmware: chip_detect, flash_firmware

hid: hid_send

debug: decode_crash

Call bench_modules first to see what is on and how to change it.

Settings

All settings are environment variables. Bench starts with an empty environment, and a tool call tells you which variable is missing.

VariableDefaultEffect
BENCH_MODULESthe defaultsComma list of modules to enable, for example usb,serial. core is always on.
BENCH_<MODULE>_ENABLEDper module1 or 0 to switch one module on or off, for example BENCH_DEBUG_ENABLED=1. Overrides BENCH_MODULES.
BENCH_APPROVE_DEVICE_WRITESoff1 pre-approves device-changing calls so they run without a prompt. See Safety.
BENCH_APPROVAL_LOG~/.local/state/bench/approvals.jsonlWhere the approval log is written.
BENCH_ADDR2LINEfound on PATHFull path to the addr2line that decode_crash runs.
BENCH_SKILLS_DIRfound next to the binaryFolder of skills to serve, when it is not beside the binary.

Safety

Bench can change hardware, so some calls are gated.

  • Device writes need approval. serial_write, serial_write_and_expect, flash_firmware, port_reset, eject_device, chip_detect (it resets the chip into its bootloader), and hid_send with an action other than get_report or list_reports change a device or its state. Your client asks you through its approval prompt, and the prompt shows the full arguments. A flag from the model, such as confirm: true, does not count as approval.
  • Clients that cannot show a prompt are refused. Set BENCH_APPROVE_DEVICE_WRITES=1 in the server's environment to allow writes without a prompt. Only do this when you trust every tool call your AI client makes.
  • Every approval is logged. Each request, grant, decline and refusal goes to the approval log. Payloads and file contents are not written there.
  • Reads are not gated. Discovery, monitoring, serial reads and serial_monitor, diagnose_device, and crash decoding run without a prompt.
  • Local only. Bench makes no network calls and needs no root. Serial access on Linux (future) will need the dialout group, not sudo.

See SECURITY.md for the reporting policy and the list of what Bench touches.

Errors

Every error reads bench.<module>.<code>: <message> Fix: <hint>, for example:

bench.serial.write_not_approved: serial_write changes a device and no approval was given. ... Fix: Set BENCH_APPROVE_DEVICE_WRITES=1 in the server's environment and restart it, or use a client that supports MCP elicitation.

Every tool result also has structuredContent with ok, module, tool and text.

Install

Claude Desktop (MCP Bundle)

Download bench-<version>-darwin-universal.mcpb from the latest release and open it: Claude Desktop shows the install dialog. The bundle carries the binary (Apple Silicon and Intel, macOS 14 or later) and the skills, so it needs neither Homebrew nor Xcode. The binary is ad-hoc signed, not notarized. Check the download against the .sha256 file next to it in the release.

Homebrew

bash
brew install seayniclabs/tap/benchbench --doctor

The formula builds from source with Swift, so it needs Xcode 16.3 or later. It installs the binary as bench and the skills to share/bench/skills, next to it.

Pinned install

Use this when you want exactly the 0.4.3 source, not whatever the formula points at:

bash
git clone --branch v0.4.3 https://github.com/seayniclabs/bench.gitcd benchswift build -c releasecodesign --force --sign - --entitlements Sources/Bench/Bench.entitlements .build/release/Bench.build/release/Bench --doctor

The skills are read from skills/ in the checkout, because the build directory sits inside it.

Claude Code plugin

The repository also packages Bench as a Claude Code plugin (.claude-plugin/plugin.json and .mcp.json): the server and its skills in one install. The plugin runs the bench binary from your PATH, so install Bench with Homebrew first. Then add the Seaynic Labs marketplace and install the plugin:

/plugin marketplace add seayniclabs/plugins/plugin install bench@seayniclabs

Connect your AI client

Bench speaks plain MCP over stdio. Use the full path to the binary in each snippet.

Claude Code

bash
claude mcp add bench -- $(which bench)

Claude Desktop (claude_desktop_config.json)

json
{  "mcpServers": {    "bench": {      "command": "/absolute/path/to/bench",      "args": []    }  }}

Cursor (~/.cursor/mcp.json)

json
{  "mcpServers": {    "bench": {      "command": "/absolute/path/to/bench",      "args": []    }  }}

VS Code (.vscode/mcp.json)

json
{  "servers": {    "bench": {      "type": "stdio",      "command": "/absolute/path/to/bench",      "args": []    }  }}

To set a variable, add an env object next to args, for example "env": { "BENCH_DEBUG_ENABLED": "1" }.

Try these

  • "Which boards are connected to this Mac, and which serial port is each one on?"
  • "Identify the board on /dev/cu.usbserial-2120 and tell me its exact chip."
  • "Bring up my ESP32: confirm the chip, read its boot output, and check it answers ping."
  • "My ESP32 keeps rebooting. Decode the crash in this log against build/firmware.elf."
  • "Flash build/firmware.bin onto the board with serial number ABC123. Ask me to approve it first."

How it works

Bench uses Apple's IOKit framework to enumerate USB devices. It adds serial port detection (/dev/cu.*), storage details from diskutil, and a built-in database of known maker boards. It talks to your AI tool over stdio using the Model Context Protocol.

AI client  --stdio/JSON-RPC-->  Bench  --IOKit-->      USB device tree                                       --diskutil-->   storage info                                       --/dev/cu.*-->  serial ports                                       --device DB-->  board recognition                                       --addr2line-->  crash decoding (debug module)

Build and test

bash
swift build             # debug buildswift build -c release  # release buildswift test              # unit tests and stdio tests

Bench requires Swift 6.1 or later and targets macOS 14 or later. The tests start the built binary with an empty environment, so run swift build before swift test if you change the server.

The checks that CI and release runs use:

bash
python3 scripts/check_skills.py           # every skill has license, source and credit; no site links in bodiespython3 scripts/tool_lock.py --check      # tool, prompt and instruction text matches the lockpython3 scripts/security_card.py --check  # the security card above is currentpython3 scripts/mcpb_manifest.py --check  # manifest.json lists the tools and prompts the binary servesscripts/pack_mcpb.sh .build/release/Bench dist  # pack the MCP Bundle and check it unpackedpython3 scripts/scan_identifiers.py .     # no private identifiers in the tree

After you change a tool, prompt or the instructions, run python3 scripts/tool_lock.py and python3 scripts/mcpb_manifest.py, and add a changelog line in the same change. After you change the card's inputs, run python3 scripts/security_card.py and paste its output between the card markers.

Changelog

See CHANGELOG.md.

License

MIT. Published by Seaynic Labs. Third-party material is listed in CREDITS.md.


Built by Seaynic Labs. We build tools like this around a business's own systems: local-first, with a person approving every change. See custom integrations.

来源:README.md,提交 fa81668

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:该软件包类型无法在沙箱中运行。

版本历史

1
  1. v0.4.3最新Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分