Skip to main content
Glama
mcp-uart

mcp-uart

by SamyiHu

mcp-uart

Serial console and MCP server for AI agents — talk to UART devices, and watch every byte while the agent does it.

中文说明

What it is

  • MCP server — three grouped tools for any MCP client (Claude Code, Cline, Cursor, …)

  • DSH plugin — a serial panel, floating orb and status strip inside DeepSeek Harness

  • HTTP hub — the same session over HTTP/SSE, so the panel and the agent share one port

The runtime is a native Rust daemon (uartd); the Node sources stay for the HTTP API and as a fallback.

Related MCP server: UART MCP Server

Install

npm install -g mcp-uart

The daemon ships as one small package per platform (optionalDependencies), so nothing is compiled on install.

Platform

Package

Windows x64

mcp-uart-uartd-win32-x64

Linux x64 / arm64 (static)

mcp-uart-uartd-linux-*

macOS Intel / Apple silicon

mcp-uart-uartd-darwin-*

From source: npm install && npm run build && npm run build:rust.

Linux needs serial permission: sudo usermod -aG dialout $USER, then log in again.

Use it from an MCP client

{
  "mcpServers": {
    "uart": { "command": "mcp-uart", "args": [] }
  }
}

Web console without an MCP client:

mcp-uart-hub --port 8787     # open http://127.0.0.1:8787

Tools

Three tools, each taking an action:

Tool

Actions

Covers

uart_serial

18

ports, open/close, write/read, capture, timeline, wait, extract, monitors, signals, encodings, protocols

uart_orchestrator

7

profile-driven testing: list, connect, run, sequence, smoke, status

uart_view

6

panel status, frames, history, ports, HTML reports

Capture: one call, timed result

Reads stop on a condition instead of polling:

{
  "action": "capture",
  "send": { "data": "READ?\r\n" },
  "filter": { "direction": "rx" },
  "stop": { "untilHex": "0D0A", "timeoutMs": 2000 },
  "startHex": "AA"
}

Stop conditions: bytes, frames, untilHex, untilText, silenceMs, timeoutMs. Every frame comes back with tMs relative to the send.

Timeline: the agent declares a plan

Agent round trips are seconds; serial timing is milliseconds. A timeline runs on the daemon's clock instead:

{
  "action": "timeline",
  "steps": [
    { "atMs": 0,   "send": { "data": "AT+RST\r\n" } },
    { "atMs": 200, "mark": "boot" },
    { "atMs": 250, "send": { "hex": "AA55" } },
    { "atMs": 300, "wait": { "untilText": "OK", "timeoutMs": 500 } }
  ],
  "tailMs": 200
}

Returns per-step plannedMs → actualMs with jitterMs, plus the frames and which step each followed.

DSH plugin

One bundle, two rows on the plugin page: the panel and the agent tools. The panel has three placements — sidebar, floating orb, or a strip under the composer — and is switchable from the plugin settings.

While an MCP bridge row is active the tool row steps aside, so the model never sees two copies of the same tools.

HTTP API

/api/health, /api/ports, /api/status, /api/frames, /api/history, /api/connect, /api/write, /api/config, /api/signals, /api/capture, /api/timeline, /api/monitor/*, /api/visualize, /api/orchestrator/*.

Development

npm run build      # TypeScript + assets + DSH client bundle
npm run build:rust # native daemon
npm test           # desensitisation guard, Node suite, UI suite, parity checks
cargo test --manifest-path rust/Cargo.toml
npm run pack:platform     # build this platform's npm package

Chip-specific test profiles stay on your machine: only frame-demo.json and text-console.json are tracked, everything else under src/orchestrator/profiles/ is ignored. npm run hooks:install adds a pre-commit check that refuses commits containing a chip model, a personal path or a credential; npm run check:desensitized runs the same check by hand.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to interact with physical serial port devices across platforms (Windows COM/Linux tty) with support for asynchronous communication, URC pattern recognition, and structured logging.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to communicate with serial port devices, supporting port management, data transmission in text/binary modes, interactive terminal sessions, and automatic reconnection.
      14
      12
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables LLMs to communicate with hardware devices via serial ports. Provides tools for listing ports, opening/closing connections, reading/writing data, and controlling serial signals.
      8
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Allows AI agents to interact with serial devices via RS232/UART, enabling port listing, connection, read/write, control line manipulation, and protocol specification for automated debugging and testing.
      27
      90 PyPI
      27
      MIT