Skip to main content
Glama
kkst1

Board Terminal Skill

by kkst1
README.md
# Board Terminal Skill

MCP server exposing one tool, `board_terminal`, for running shell commands on a Linux development board through a controlled executor.

The first backend is UART serial. SSH is represented by a placeholder interface so it can be added without changing the MCP tool contract.

## Tool

Input:

```json
{
  "command": "cat /proc/cpuinfo"
}
```

Output:

```json
{
  "success": true,
  "stdout": "processor : 0\n...",
  "stderr": "",
  "exit_code": 0,
  "elapsed_ms": 135
}
```

For serial shells there is no reliable process exit status unless the command wrapper reports it. This implementation wraps every command and captures a marker containing `$?`, so `exit_code` is the command exit code when the shell supports standard POSIX syntax. If the marker cannot be parsed but the prompt returns, `exit_code` defaults to `0`.

## Configuration

Environment variables:

| Variable | Default | Description |
| --- | --- | --- |
| `BOARD_BACKEND` | `serial` | Backend name. Currently only `serial` is implemented. |
| `BOARD_SERIAL_PORT` | `COM3` | Serial device path, for example `COM3` or `/dev/ttyUSB0`. |
| `BOARD_SERIAL_BAUDRATE` | `115200` | UART baud rate. |
| `BOARD_SERIAL_TIMEOUT` | `0.2` | Per-read timeout in seconds. |
| `BOARD_COMMAND_TIMEOUT` | `15.0` | Command completion timeout in seconds. |
| `BOARD_PROMPT` | `<<<PROMPT>>> ` | Stable shell prompt used to detect completion. |
| `BOARD_ENCODING` | `utf-8` | Serial text encoding. |

## Run

Install dependencies:

```bash
python3 -m pip install -e .
```

Start the MCP server over stdio:

```bash
board-terminal-skill
```

Example MCP client configuration:

```json
{
  "mcpServers": {
    "board-terminal": {
      "command": "board-terminal-skill",
      "env": {
        "BOARD_SERIAL_PORT": "/dev/ttyUSB0",
        "BOARD_SERIAL_BAUDRATE": "115200"
      }
    }
  }
}
```

TDQS

B3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap, so disambiguation is perfect.

Naming Consistency5/5

The single tool name 'board_terminal' is clear and follows a consistent style, making it predictable.

Tool Count3/5

One tool is minimal but appropriate for a focused 'Board Terminal Skill' that only needs to run shell commands. However, it is on the thin side.

Completeness4/5

The tool fully covers the stated purpose of running shell commands on a board, with no obvious missing operations for that narrow scope.

Maintenance

ActivityStale
ResponsivenessNo issues