Skip to main content
Glama

rs232-mcp

MCP server for RS232 serial communication with Cisco network equipment.

Lets AI assistants interact with Cisco routers and switches over serial console connections. Handles prompt detection, -- More -- pagination, and connection lifecycle management.

Supported platforms: macOS, Linux, and Windows.

Install

Codex

codex mcp add rs232 -- npx github:xnetcat/rs232-mcp

Claude Code

claude mcp add rs232 -- npx github:xnetcat/rs232-mcp

To add it to a specific project instead of globally:

claude mcp add --scope project rs232 -- npx github:xnetcat/rs232-mcp

Manual configuration

For any stdio MCP client, configure the server command like this:

{
  "mcpServers": {
    "rs232": {
      "command": "npx",
      "args": ["github:xnetcat/rs232-mcp"]
    }
  }
}

If your Windows client does not resolve npm shims correctly, use npx.cmd as the command instead of npx.

Related MCP server: UART MCP Server

Tools

Tool

Description

list_ports

List available serial ports on the system

open_port

Open a serial connection (path, baudRate, dataBits, stopBits, parity)

close_port

Close an open serial connection

send_command

Send a command and wait for Cisco prompt. Handles -- More -- pagination automatically

write_raw

Write raw string data to a port (no prompt waiting)

read_buffer

Read buffered data from a port (non-blocking)

get_connections

List all open connections and their settings

Example usage

Once configured, your AI assistant can:

> List serial ports
> Open /dev/tty.usbserial-110 at 9600 baud
> Open COM3 at 9600 baud
> Send "show version"
> Send "show running-config"
> Close the port

The send_command tool automatically:

  • Sends the command with CRLF

  • Waits for a Cisco prompt (Router#, Switch>, Router(config)#, etc.)

  • Presses space through -- More -- prompts

  • Strips the echoed command from output

  • Returns clean output

Default serial settings

Parameter

Default

Baud rate

9600

Data bits

8

Stop bits

1

Parity

none

Windows notes

  • Serial ports usually appear as COM3, COM4, COM10, and similar names.

  • list_ports returns the identifier to use with open_port, so you usually do not need any path conversion.

  • The runtime uses the serialport package directly, so Windows port handling follows the native COMx behavior provided by that library.

Development

git clone https://github.com/xnetcat/rs232-mcp.git
cd rs232-mcp
npm install
npm run build
npm test

License

MIT

Available Tools

7 tools
close_portA

Close an open serial connection

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesSerial port identifier/path to close (e.g. /dev/ttyUSB0 or COM3)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clearly states the core behavior (closing a connection) and implies a prerequisite (an open connection), but it does not disclose edge-case behavior such as what happens if the path is invalid or the port is already closed. This is acceptable but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler or redundant information. Every word earns its place, and it is perfectly sized for a simple tool with one parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a very simple tool with one parameter and no output schema, the description is complete enough. It states the action and resource clearly, and the schema handles the parameter semantics. It could mention error conditions, but the overall context is sufficiently covered for a close operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage of the single parameter (path) with a clear description and example. The tool description adds no additional semantic meaning beyond what the schema already provides, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Close') and a clear resource ('an open serial connection'), which unambiguously distinguishes it from sibling tools like open_port and list_ports. The purpose is immediately understandable and directly aligned with the tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (to close an open serial connection) but does not explicitly state when not to use it or mention alternatives. There is no contrast with sibling tools such as open_port or send_command, so the guidance is only implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_connectionsA

List all open serial connections and their settings

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of disclosing behavior. The word 'List' implies a read-only operation, but the description does not elaborate on side effects, required state, or error conditions. It is accurate but minimal, offering only basic transparency for a simple query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 8 words, with the action verb leading. It is extremely concise and contains no filler, perfectly matching the tool's simple functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, no output schema, no annotations), the description provides enough information for an agent to understand the basic purpose. It does not describe the output format, but for a simple list operation this is a minor gap. Overall, it is complete enough for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100% (vacuously). According to the rubric, 0 parameters warrants a baseline of 4. The description adds no parameter details because there are none to describe, so this score reflects the completeness of the schema and the lack of need for further explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and resource ('open serial connections and their settings'), clearly distinguishing this from sibling tools like list_ports (which likely lists available ports) and open_port (which establishes connections). It unambiguously states what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by naming the resource (open serial connections), but it does not explicitly state when to use this tool versus alternatives such as list_ports or read_buffer. No exclusions or prerequisites are provided, leaving the agent to infer the appropriate context from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_portsB

List available serial ports

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only restates the basic purpose and does not disclose return format, scanning behavior, permission requirements, or error conditions. For a listing operation, additional context like what information is returned would be expected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence — "List available serial ports" — with no wasted words. It is front-loaded with the verb and directly conveys the action. Every word contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter listing tool with no output schema, the description is minimally adequate: it conveys the essential purpose. However, since there is no output schema, the description could have disclosed return value details (e.g., port names, paths, metadata), which would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters (empty schema, 100% schema coverage), so the baseline is 4. The description does not need to add parameter meaning since there are none; 'available' offers a slight scope hint but no parameter documentation is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: "List available serial ports" — a specific verb ('List') with a specific resource ('available serial ports'). It distinguishes from siblings (open_port, close_port, send_command, etc.) since no other sibling tool lists ports, though it does so implicitly rather than explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, exclusions, or recommend alternatives from the sibling set. There is no stated context such as 'use before open_port' or 'use to discover available devices'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

open_portC

Open a serial connection to a device

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesSerial port identifier/path (e.g. /dev/ttyUSB0, /dev/tty.usbserial-110, or COM3)
parityNoParity (default: none)none
baudRateNoBaud rate (default: 9600)
dataBitsNoData bits (default: 8)
stopBitsNoStop bits (default: 1)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full behavioral burden. It does not disclose side effects, error handling (e.g., port not found), whether the connection blocks, or if it returns a handle. This is a significant transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is front-loaded and easy to parse. However, it is perhaps too brief to convey necessary context, though that is more a completeness issue than a conciseness one.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no output schema, and no annotations, the description is severely incomplete. It omits behavior on success/failure, connection lifecycle, and how it interacts with sibling tools like get_connections or send_command.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, providing clear meaning for all five parameters including defaults. The tool description itself adds no parameter semantics, but the schema already carries that weight, warranting the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (open) and the resource (serial connection to a device), distinguishing it from siblings like list_ports and close_port. However, it does not specify what 'open' entails (e.g., establishing a connection with parameters) or mention the return value.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as listing available ports first, or when to prefer close_port or send_command.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_bufferA

Read buffered data from a serial port (non-blocking)

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesSerial port identifier/path (e.g. /dev/ttyUSB0 or COM3)

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does add the useful behavioral trait 'non-blocking.' However, it does not disclose return format, behavior when the buffer is empty, or whether reading clears the buffer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the core action and uses a concise parenthetical for the non-blocking behavior. Every word adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter, but since there is no output schema, the description should state what data is returned. It also omits any prerequisite relationship with sibling tools like open_port, leaving operational gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully documents the only parameter 'path' with an example, and schema coverage is 100%. The description adds no additional parameter semantics, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Read') and resource ('buffered data from a serial port'), and the 'non-blocking' qualifier makes its scope clear. This distinguishes it from sibling tools like write_raw and send_command, which are write/send operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives, nor any mention of prerequisites such as the port needing to be open. The 'non-blocking' hint implies it is for immediate reads, but no exclusions or alternative tool references are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_commandA

Send a command to a Cisco device and wait for the prompt. Handles -- More -- pagination automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesSerial port identifier/path (e.g. /dev/ttyUSB0 or COM3)
commandYesCommand to send (e.g. 'show version')
timeoutNoTimeout in ms to wait for prompt (default: 10000)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the tool waits for the prompt and automatically handles pagination, which is useful. However, it does not mention what the tool returns (e.g., command output), whether an open connection is required, or error/timeout behavior, leaving significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no redundant words. The first sentence delivers the core purpose, the second adds a key behavioral trait. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description must explain return values, but it does not. It also omits prerequisites (e.g., an open port via open_port) and failure modes. While the description covers the happy path and pagination, it is insufficient for an agent to fully understand the tool's context within the serial-port workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds no parameter-specific meaning beyond the schema; it doesn't mention path, command, or timeout. The schema already documents these accurately, so no deduction is warranted, but no additional value is provided either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Send a command') and target ('to a Cisco device'), with specific behavior ('wait for the prompt', 'Handles -- More -- pagination automatically'). This distinguishes it from siblings like write_raw (raw bytes) and read_buffer (reading data), making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for command-line interaction with Cisco devices, but does not explicitly state when to use it over alternatives like write_raw or read_buffer. No exclusions or alternative tool references are provided, so the guidance is only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

write_rawA

Write raw string data to a serial port (no prompt waiting). Supports escape sequences: \r \n \t \x03 (Ctrl+C) etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYesRaw data to write. Use \r for CR, \n for LF, \x03 for Ctrl+C, \x1b for ESC
pathYesSerial port identifier/path (e.g. /dev/ttyUSB0 or COM3)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden. It discloses a key behavior (no prompt waiting) and escape sequence handling, which is valuable. However, it omits error behavior, prerequisites like having the port open, and return semantics, leaving gaps for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence with no filler. It front-loads the core action, then adds the critical qualifier and examples, making every word earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with no output schema, the description covers the core action, behavior, and escape sequences. It is reasonably complete for its complexity, though it could mention prerequisites like an already-open port or potential side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both parameters described (data with escape sequence details, path with examples). The description adds a small amount by listing escape sequences and 'etc.', but the schema already covers the essential semantics, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Write raw string data to a serial port' with a specific verb and resource. The parenthetical '(no prompt waiting)' differentiates it from sibling tools like send_command, and the mention of escape sequences further clarifies its raw, low-level nature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: this tool is for writing raw data without waiting for a prompt, implying use cases where low-level control is needed. However, it does not explicitly name alternatives or state when not to use it, so it stops short of full guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv1.0.0
    • First observedclose_port
    • First observedget_connections
    • First observedlist_ports
    • First observedopen_port
    • First observedread_buffer
    • First observedsend_command
    • First observedwrite_raw

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: enumerate ports, open/close connections, send command with prompt handling, write raw data, read buffered data, and list connections. No overlap between send_command and write_raw; they handle different interaction modes.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (e.g., list_ports, open_port, read_buffer). The convention is uniform and predictable.

Tool Count5/5

Seven tools is well-scoped for a serial port server, covering essential operations without redundancy or bloat. Each tool earns its place.

Completeness5/5

The surface covers the full serial port lifecycle: enumeration, open/close, command/raw writing, buffered reading, and connection monitoring. No obvious gaps for typical serial interaction workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

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
    C
    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
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with Cisco IOS-XE network devices over SSH using structured tools. Provides read and write capabilities for network management with built-in validation and security.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to execute SSH commands on network devices using natural language, supporting multiple vendors and authentication methods for automated network management.
    -