AE5VG

Product · MIT

serial-console-mcp

serial-console-mcp lets an assistant such as Claude configure telecommunication equipment through the console port the equipment already has. It connects to the serial console of the equipment that runs networks and radio stations, and of anything else with a serial port. You do not need to know any programming. Once it is installed, you talk to Claude normally.

Version…
Released…
LicenseMIT
Ships as.mcpb bundle · PyPI

What it does

It is not tied to radio. On Juniper (Junos) and Cisco (IOS, IOS-XE) routers and switches, it uses the console and craft ports. There it can log in, read state, and change configuration with a safety net (commit confirmed on Junos, reload in on IOS). When it is done, it leaves the console the way it found it. It talks to Icom and Xiegu transceivers over CI-V, and to Kenwood, Yaesu and Elecraft over their text CAT protocols. On a rig it can identify the model and read and set frequency and mode. On antenna rotators it speaks Yaesu GS-232, which many other controllers also use, to read the heading, turn and stop. It also works with anything else that has a serial port: IoT gateways, alarm and access-control panels, UPS and PDU menus, lab instruments, industrial controllers, Linux and BIOS consoles, and microcontrollers.

You say what you want in plain language. The assistant drives the console through this server, and Claude Desktop asks you to approve each step. Operating skills that come with the server teach the assistant the Junos and IOS basics. They cover which mode a prompt means, how to get in and out of each mode, and which show commands answer everyday questions.

Verified on this bench

Juniper support is verified on a real EX2200 console. Cisco, CI-V, CAT and rotator support follows the vendors' protocol references, but I have not yet tested it on real hardware here. The other device types use the generic tools, not device-specific helpers.

Features and benefits

FeatureWhat it gives you
Background reader, read until promptAs soon as a port is open, a reader drains it into a buffer. Sending only writes. Reading until a prompt then captures the whole reply without cutting it off. For streaming output, you read whatever is waiting. minicom and expect work the same way.
Several ports at oncePorts are opened by name ("rig", "rotator"). Tools default to the most recently used port. status shows every open port and the state of its control lines.
Remembered connectionsreconnect_last reopens a port with the settings it had last time, by name, across sessions.
Presets per device familyTwelve presets load the usual baud, framing, flow control, line ending and prompt: Cisco, Juniper and Linux consoles, Kenwood, Elecraft and Yaesu CAT, Icom and Xiegu CI-V, the Yaesu rotator, Arduino, NMEA GPS, and a full-screen console. Anything you say explicitly overrides the preset.
Terminal modesdumb (raw bytes, the default), ansi (colors and escape sequences stripped, overwrites applied, prompts matched on the line as displayed), or xterm/vt100 (a real screen you can read with screen, for BIOS, BMC and menu consoles).
Keys by namesend_keys presses Ctrl-C, Esc, Tab, the arrow keys and F-keys, encoded the way an xterm sends them. You can interrupt a ping, complete a command or walk through a menu.
Expect scriptsRuns a list of send-and-wait steps in one call, such as a login or a sequence of commands. auto_reply pages through --More--.
Configuration with a safety netThe Junos and IOS skills change configuration behind commit confirmed on Junos and reload in on IOS. They leave the console the way they found it.
Control lines and BREAKDrive DTR and RTS (PTT, Arduino reset), pulse a line, send BREAK.
Capture and transcriptLog a session to a file, raw or as timestamped TX/RX. You can also re-read the rolling transcript.
Port and baud diagnosticsport_in_use_by names the program holding a port. detect_baud finds the baud rate that produces readable text.
CAT, CI-V and GS-232 helpersBuild and parse Kenwood, Elecraft and Yaesu ; commands, Icom CI-V frames, and GS-232 rotator commands and replies.
Read-only modeWith SERIAL_CONSOLE_READ_ONLY=1, the server refuses all writes except read-style commands, and refuses control-line changes. Named keys are allowed. Literal text is refused.
Idle auto-closeSERIAL_CONSOLE_IDLE_MINUTES closes a port that has sat idle, so a connection you forgot about does not keep blocking WSJT-X. It is off by default.
Bounded memoryThe receive buffer is capped at 4 MB per port. If a device streams for hours and nothing reads it, the oldest bytes are dropped and status says how many.
Desktop extensionA single .mcpb file installs in Claude Desktop like the other connectors. It has a settings form for read-only mode and the idle timeout. If you install from PyPI, serial-console-mcp configure writes the Claude Desktop entry instead, and --remove undoes it.
Three skillsserial-console, junos-operating and ios-operating teach the discipline, the modes and the everyday commands.

How it works

send read until prompt buffer background reader device TX · write only reply, whole
Send only writes to the device. The background reader drains the port into the buffer. Read until prompt returns the complete reply.

A serial console does more than answer questions. It echoes what you type, prints messages nobody asked for, and can dump pages of output. So as soon as a port is open, a background reader drains it into a buffer. The assistant sends a command, then reads until a prompt appears (# , > , login:) to capture the whole reply. For streaming output, it reads whatever is waiting.

Ports are opened by name ("rig", "rotator"), and tools default to the most recently used port. Several ports can be open at once. The receive buffer is capped at 4 MB per port. If a device streams for hours and nothing reads it, the oldest bytes are dropped and status says how many.

Ask it

What serial ports do you see? list_serial_ports, with descriptions and USB hardware ids Connect to COM4 at 9600 baud. connect; defaults 9600 8N1, or load a preset Log in as admin and run show interfaces terse, then show me all of it. one expect call: return, login, password, command, read until prompt What is the TS-590 tuned to? query_text("FA;"), then cat_parse Turn the rotator to 45 degrees and confirm. rotator_build, query_text, rotator_parse

Tools

ToolWhat it does
list_serial_portsEnumerate ports with description and USB hardware id; marks ones open here
list_presetsUsual settings per device family: Cisco/Juniper/Linux consoles, Kenwood/Elecraft/Yaesu CAT, Icom CI-V, rotators, Arduino, NMEA GPS
connect / reconnect_last / disconnectOpen a port by name. Defaults 9600 8N1, no flow control; baud, data bits, parity, stop bits, RTS/CTS, XON/XOFF, line ending and prompt are all settable, or loaded from a preset. Several ports at once
send_keys / screenPress Ctrl-C, Esc, Tab, arrows, F-keys by name; view the VT100/xterm screen of a full-screen console (BIOS, BMC, menu switches, vi)
send_text / send_hexWrite an ASCII line (CR / LF / CRLF / none) or raw hex bytes. Write-only
read_until_promptReturn buffered output up to a literal or regex prompt, leaving the rest; auto_reply pages through --More--
read_availableReturn whatever has arrived, as text and hex
query_textClear, send, then read until the prompt or until the line goes idle
expectA scripted list of send-and-wait steps in one call: logins, command sequences
set_lines / pulse_line / send_breakDrive DTR and RTS (PTT, Arduino reset), send BREAK
capture_start / capture_stop / get_transcriptLog a session to a file (raw or timestamped TX/RX); re-read the rolling transcript
port_in_use_by / detect_baudWhich program holds a port; which baud rate produces readable text
cat_build / cat_parseKenwood, Elecraft and Yaesu ; commands: build a frequency set, decode ID, FA, MD, IF and error replies
civ_build / civ_parse / civ_freqIcom CI-V frames: build, decode (echo vs reply, BCD frequency, mode, PTT), convert
rotator_build / rotator_parseGS-232 rotator commands (read, move, stop, speed) and position replies
clear_buffer / statusHousekeeping; status shows every open port with control-line states

Settings

VariableEffect
SERIAL_CONSOLE_READ_ONLY=1Refuse writes except read-style commands (show, ID;, CI-V reads) and refuse control-line changes
SERIAL_CONSOLE_ALLOW=<regex>Override the read-only allowlist
SERIAL_CONSOLE_IDLE_MINUTES=15Auto-close a port idle that long (default: never)

Set them in the server's entry in claude_desktop_config.json under env.

Safety

A console can reconfigure, reboot, or transmit

These tools send what you ask Claude to send, to whatever device is on the cable. Claude Desktop asks you to approve each tool call, so you see every command before it runs. Read it. This server does not try to guess which commands are dangerous. If something looks wrong, decline it. Keep a real terminal handy for anything you would not want an assistant to type. For a cautious first run on a production console, set SERIAL_CONSOLE_READ_ONLY=1. The server then refuses anything but read-style commands and refuses control-line changes, so it cannot key PTT from RTS or DTR.

Documents