Skip to main content
Glama

UART MCP Server

English | 中文

为 AI 助手提供串口通信能力的 MCP Server。

Python MCP License

功能特性

  • 串口管理 - 枚举、打开、关闭和配置串口设备

  • 数据通信 - 支持文本和二进制模式的数据收发

  • 终端会话 - 创建交互式终端会话,支持命令发送和输出读取

  • 热配置 - 支持在不关闭串口的情况下修改配置参数

  • 自动重连 - 设备断开后自动尝试重新连接

Related MCP server: Serial MCP Server

快速开始

提示词配置

为了让 AI 助手优先使用 UART 工具操作串口,建议在项目提示词文件中添加以下内容:

始终使用 uart MCP 工具进行串口操作,包括列出串口、打开/关闭串口、发送/接收数据等。

不同工具的提示词文件位置:

工具

提示词文件

Claude Code

CLAUDE.md.claude/settings.json

Factory Droid

AGENTS.md.factory/droids/

Cursor

.cursor/rules/

Windsurf

.windsurfrules

Claude Code

claude mcp add uart -- uvx --from git+https://github.com/donnel666/uart-mcp.git uart-mcp

Codex CLI

~/.codex/config.toml 中添加:

[mcp_servers.uart]
type = "stdio"
command = "uvx"
args = ["--from", "git+https://github.com/donnel666/uart-mcp.git", "uart-mcp"]

Factory Droid

在项目 .factory/settings.json 或全局 ~/.factory/settings.json 中添加:

{
  "mcpServers": {
    "uart": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/donnel666/uart-mcp.git", "uart-mcp"]
    }
  }
}

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "uart": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/donnel666/uart-mcp.git", "uart-mcp"]
    }
  }
}

可用工具

串口管理

工具

描述

list_ports

列出所有可用串口设备

open_port

打开指定串口(支持配置波特率、数据位、校验位等)

close_port

关闭指定串口

set_config

修改已打开串口的配置(热更新)

get_status

获取串口当前状态和配置信息

数据通信

工具

描述

send_data

向串口发送数据(支持文本/二进制模式)

read_data

从串口读取数据(支持文本/二进制模式)

终端会话

工具

描述

create_session

创建终端会话(支持配置换行符、本地回显)

close_session

关闭终端会话

send_command

向终端发送命令

read_output

读取终端输出缓冲区

list_sessions

列出所有活动会话

get_session_info

获取会话详细信息

clear_buffer

清空会话输出缓冲区

串口权限

请确保本工具有权限访问串口设备:

Linux:

# 方法1:临时赋予权限
sudo chmod 777 /dev/ttyUSB0

# 方法2:将用户加入 dialout 组(推荐,重新登录后生效)
sudo usermod -aG dialout $USER

macOS:

# 将用户加入 wheel 组
sudo dseditgroup -o edit -a $USER -t user wheel

Windows: 通常无需额外配置,COM 端口默认可访问。

使用示例

基础串口通信

  1. 使用 list_ports 查看可用串口

  2. 使用 open_port 打开串口,如 /dev/ttyUSB0COM1

  3. 使用 send_data 发送数据

  4. 使用 read_data 读取响应

  5. 使用 close_port 关闭串口

终端会话模式

  1. 使用 open_port 打开串口

  2. 使用 create_session 创建终端会话

  3. 使用 send_command 发送命令

  4. 使用 read_output 读取命令输出

  5. 使用 close_session 关闭会话

串口配置参数

参数

默认值

可选值

波特率

115200

300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600

数据位

8

5, 6, 7, 8

校验位

N (无)

N (无), E (偶), O (奇), M (标记), S (空格)

停止位

1

1, 1.5, 2

流控制

none

none, xonxoff, rtscts, dsrdtr

配置文件

UART MCP 的配置文件位于:

  • Linux/macOS: ~/.uart-mcp/

  • Windows: %APPDATA%\.uart-mcp\

配置文件说明

文件

说明

config.toml

全局配置(波特率、超时、流控等默认参数)

blacklist.conf

串口黑名单(支持精确匹配和正则表达式)

config.toml 示例

[serial]
baudrate = 115200
bytesize = 8
parity = "N"
stopbits = 1.0

[timeout]
read_timeout = 1000
write_timeout = 1000

[flow_control]
xonxoff = false
rtscts = false
dsrdtr = false

[reconnect]
auto_reconnect = true
reconnect_interval = 5000

[logging]
log_level = "INFO"

blacklist.conf 示例

# 黑名单配置(每行一个规则)
# 支持精确匹配和正则表达式

# 精确匹配
/dev/ttyS0

# 正则表达式匹配所有 COM 端口
COM[0-9]+

注意: 配置文件权限应为 600(仅所有者可读写),否则会报权限错误。

本地开发

# 克隆仓库
git clone https://github.com/donnel666/uart-mcp.git
cd uart-mcp

# 安装依赖
uv sync --dev

# 运行服务器
uv run uart-mcp

# 运行测试
uv run pytest

# 代码检查
uv run ruff check src/
uv run mypy src/

系统要求

  • Python 3.13+

  • 支持的操作系统: Linux, macOS, Windows

许可证

MIT License

Available Tools

14 tools
clear_bufferA

清空指定终端会话的输出缓冲区

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYes会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1

TDQS

A3.9/5.0
Behavior3/5

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

Discloses the action (clear buffer) but does not specify prerequisites (e.g., session must be open) or side effects (e.g., discarding unread data). Since no annotations exist, description should provide more context.

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?

Single phrase, no unnecessary words. Information is front-loaded and efficient.

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

Completeness5/5

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

For a simple tool with one parameter and no output schema, the description fully covers purpose and parameter meaning. No additional context needed.

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?

Schema coverage is 100%; description adds meaning by mapping session_id to 'serial port path' with examples (/dev/ttyUSB0, COM1), exceeding the schema's basic description.

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?

Description clearly states the verb '清空' (clear) and the resource '输出缓冲区' (output buffer) for a specific session, distinguishing it from siblings like read_data or send_command.

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 on when to use this tool or when to avoid it. Does not mention prerequisites or alternatives among sibling tools.

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

close_portB

关闭指定串口连接

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径

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 states the action without detailing side effects (e.g., resource release), error states (e.g., closing already closed port), or required permissions.

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, concise phrase that hits the key point. It is front-loaded and does not waste words, though it could benefit from slightly more structure for clarity.

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?

Given the low complexity (one parameter, no output schema), the description is minimally complete. However, it lacks information on return values, error handling, and usage context, leaving gaps for the agent.

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 covers 100% of parameters, and the description adds no extra meaning beyond the parameter descriptions. The baseline score of 3 is appropriate as the schema already provides necessary details.

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 specifies the action 'close' and the resource 'specified serial port connection', clearly stating the tool's function. It distinguishes itself from sibling tools like 'open_port' and 'close_session' due to its explicit reference to serial port connection.

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 on when to use this tool versus alternatives like 'close_session' for sessions. No prerequisites or conditions for use are mentioned, leaving the agent without context for appropriate invocation.

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

close_sessionB

关闭指定的终端会话

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYes会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided. The description only states the action 'close' without detailing side effects, resource release, or error conditions. The agent is left uninformed about the tool's behavior beyond the basic action.

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, efficient sentence with no wasted words. It is front-loaded and direct.

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?

Given the simplicity of the tool (one required parameter, no output schema), the description is marginally complete but lacks details on expected outcomes or prerequisites for closing a session.

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?

Input schema has 100% description coverage for the only parameter 'session_id'. The description adds no extra meaning beyond the schema, so baseline of 3 is appropriate.

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 closes a specific terminal session. It is a specific verb+resource combination, but does not differentiate from sibling tool 'close_port' which may have similar functionality.

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 like 'close_port' or 'close_session'. The description lacks context for appropriate usage scenarios.

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

create_sessionB

在已打开串口上创建终端会话,支持配置换行符和本地回显

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径,如 /dev/ttyUSB0 或 COM1
line_endingNo换行符类型:CR(回车)、LF(换行)、CRLF(回车换行)CRLF
local_echoNo是否本地回显发送的命令
buffer_sizeNo输出缓冲区大小(字节),默认 64KB

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as side effects, error conditions, or what happens if the port is not open. The description only lists configuration options without explaining the creation behavior.

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 concisely captures the tool's main action and configuration options. It is front-loaded with the essential purpose and contains no redundant or extraneous information.

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 4 parameters, no output schema, and no annotations, the description is too brief. It does not explain what a 'session' entails, how to interact with it after creation, or how it relates to sibling tools like send_command or read_data. An agent may lack sufficient context to use it correctly.

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 for all parameters. The description merely reiterates the line ending and echo configurations already present in the schema, adding no new semantic meaning or usage context beyond what the schema provides.

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 explicitly states it creates a terminal session on an already opened serial port and supports configuring line endings and local echo. This clearly differentiates it from sibling tools like open_port (which opens the port) and list_sessions (which lists existing sessions).

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 that the serial port must be opened first, but it does not explicitly state when to use this tool versus alternatives or provide any conditions on when not to use it. No guidance on prerequisites or error handling is given.

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

get_session_infoB

获取指定终端会话的详细信息

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYes会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1

TDQS

B3.3/5.0
Behavior2/5

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

No annotations exist, and the description only says 'get detailed info' without disclosing what fields are returned, whether it reads volatile state, or any side effects. The agent lacks behavioral context.

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?

A single, concise sentence with no extraneous information. Every word is meaningful.

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?

Given the tool's simplicity (one param, no output schema), the description is adequate but lacks detail on what 'detailed info' includes, leaving some ambiguity for the agent.

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 description coverage is 100% (session_id with examples). The tool description adds no extra meaning beyond the schema, so a baseline 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 clearly states the verb 'get' and the resource 'detailed information of terminal session', distinguishing it from siblings like list_sessions (list) and close_session (close).

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 on when to use this tool versus alternatives like list_sessions or get_status. Usage is implied but not explicitly clarified.

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

get_statusA

获取已打开串口的当前状态和配置信息

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径

TDQS

A3.9/5.0
Behavior3/5

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

No annotations provided, so the description bears full burden. It mentions 'status and configuration' but does not disclose behavioral traits like read-only nature, failure modes (e.g., if port not open), or idempotency. Adequate 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?

Single sentence, no unnecessary words. The structure is efficient and front-loaded with the key action and resource.

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?

No output schema, so the description should hint at what the response contains. It does not. For a tool with one parameter, it is moderately complete but lacks details on the return value. Sibling context is diverse, so more guidance on output would help.

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?

Schema coverage is 100% (one parameter described as '串口路径'). The description adds that the port must be already open, which is not in the schema. This adds meaningful context beyond the parameter description.

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 indicates the action (获取, get) and the resource (已打开串口的当前状态和配置信息, current status and configuration of opened serial port). It distinguishes from sibling tools like list_ports, open_port, etc., which have distinct purposes.

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 the tool is for opened ports ('已打开串口'), but it does not explicitly state when to use this versus alternatives, nor does it mention prerequisites (e.g., port must be open). Usage guidance is only implied.

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

list_portsA

列出所有可用串口设备,返回设备路径、描述信息和硬件ID

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/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 states the action and return values, but does not mention whether it is read-only, any permissions required, or potential side effects. For a list operation, minimal disclosure is acceptable, but the lack of any behavioral context limits transparency.

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 concise sentence that immediately conveys the purpose and output. No unnecessary words or information.

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 list tool with no parameters and no output schema, the description sufficiently covers what the tool does and returns (device path, description, hardware ID). It lacks performance or error details, but is complete enough for an agent to use correctly.

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 input schema has no parameters and 100% coverage. The description adds meaning by indicating that all available ports are listed (no filtering), which clarifies the parameterless behavior beyond the schema.

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 ('列出所有可用串口设备' - list all available serial port devices) and the resource (serial port devices), and specifies the returned information (device path, description, hardware ID). It distinguishes from sibling tools like open_port or clear_buffer, which operate on specific ports or sessions.

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 does not provide any guidance on when to use this tool versus alternatives, such as before opening a port or when needing port details. It lacks explicit context for usage or exclusions.

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

list_sessionsA

列出所有活动的终端会话

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are present, so the description is the sole source of behavioral info. It only states the tool lists active sessions, without disclosing if it is read-only, what happens if no sessions exist, or any side effects. This is insufficient for a tool with no annotations.

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, concise sentence that immediately communicates the tool's purpose. No redundancy or unnecessary information.

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?

Given the tool is simple (no parameters, no output schema), the description adequately states what it does but does not mention what information is returned (e.g., session IDs, status). This omission leaves some ambiguity for an agent.

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 input schema is empty, so baseline for 0 parameters is 4. The description adds value by specifying the scope ('active terminal sessions'), clarifying the tool's focus beyond the empty schema.

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 verb (list) and the resource (active terminal sessions). It distinguishes from sibling tools like get_session_info or create_session, which focus on individual sessions or creation.

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 usage guidance is provided. The description does not indicate when to use list_sessions versus alternatives such as get_session_info for details, or any prerequisites or contextual conditions.

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

open_portB

打开指定串口,支持自定义配置参数

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径,如 /dev/ttyUSB0 或 COM1
baudrateNo波特率,支持的值:[300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600]
bytesizeNo数据位,支持的值:[5, 6, 7, 8]
parityNo校验位,支持的值:['N', 'E', 'O', 'M', 'S']N
stopbitsNo停止位,支持的值:[1.0, 1.5, 2.0]
flow_controlNo流控制,支持的值:['none', 'hardware', 'software']none
read_timeout_msNo读取超时(毫秒),范围 0-60000
write_timeout_msNo写入超时(毫秒),范围 0-60000
auto_reconnectNo是否启用自动重连

TDQS

B3/5.0
Behavior2/5

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

No annotations provided; the description does not disclose behavioral traits such as blocking behavior, whether reusing a port fails, or permission requirements. The description only restates the obvious.

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

Conciseness3/5

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

The description is a single sentence, concise but overly terse. It could benefit from additional context without becoming verbose.

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 9 parameters and no output schema, the description is insufficient. It lacks information about return values, error conditions, or the effect on port state, leaving gaps for the agent.

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 description coverage is 100%, so the schema already fully documents each parameter. The description adds no extra meaning beyond the schema, meeting the baseline.

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 ('打开' meaning open) and resource ('指定串口' meaning specified serial port), and is distinct from siblings like close_port or read_data.

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 on when to use this tool vs alternatives, no prerequisites or exclusions mentioned. For example, it doesn't advise checking available ports with list_ports first.

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

read_dataB

从已打开的串口读取数据,支持文本和二进制模式

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径,如 /dev/ttyUSB0 或 COM1
sizeNo读取字节数,不指定则读取所有可用数据
timeout_msNo读取超时(毫秒),不指定则使用串口配置的超时
is_binaryNo是否为二进制模式,True 时返回 Base64 编码

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description adds context about text/binary modes and the prerequisite of an open port. However, it lacks details on error handling, blocking behavior, or what happens if data is unavailable, leaving 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.

Conciseness4/5

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

The description is a single concise sentence with no fluff. It could benefit from structuring (e.g., prerequisites, modes) but is efficient for the information provided.

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?

Without an output schema, the description should explain what the tool returns (e.g., string or Base64). It also fails to contrast with similar sibling tools like read_output, making the overall context incomplete for an agent.

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 description coverage is 100%, so the description adds no new insight beyond what is already documented for parameters. The note about text/binary mode is redundant with the is_binary parameter description.

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 ('读取数据' read data) and resource ('从已打开的串口' from opened serial port), and specifies support for text and binary modes. However, it does not differentiate from sibling tool 'read_output', which may serve a similar purpose.

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 implies the port must be already opened but provides no explicit guidance on when to use this tool versus alternatives like send_command or read_output. No 'when-not' or alternative tool mentions are present.

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

read_outputC

读取终端输出缓冲区的内容

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYes会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1
clearNo读取后是否清空缓冲区

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 the full burden. It does not disclose whether the operation is non-destructive when clear is false, what the return format is, or whether it blocks. Minimal behavioral context.

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 efficiently conveys the core purpose without unnecessary words. Appropriately sized for a simple tool.

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 description lacks details about return values (no output schema), and does not differentiate from siblings like 'read_data' or 'clear_buffer'. For a tool that reads buffer content, more context on output format and usage scenario is needed.

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 descriptions for both parameters. The tool description adds little beyond the schema: it merely restates the clear parameter's effect. Baseline score applies.

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 states the verb 'read' and the resource 'terminal output buffer content', making the tool's purpose clear. However, it does not explicitly differentiate from siblings like 'read_data' or 'clear_buffer'.

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. With siblings like 'read_data' and 'clear_buffer', the description should clarify that this tool reads buffered output, not raw data, and that 'clear' can optionally clear the buffer.

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

send_commandC

向终端发送命令,可选择是否自动添加换行符

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYes会话ID(即串口路径),如 /dev/ttyUSB0 或 COM1
commandYes要发送的命令内容
add_line_endingNo是否自动添加换行符

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It mentions the line-ending option but omits details like whether commands are executed, what happens on error, or if a response is returned.

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?

A single, efficient sentence with no redundancy. Essential information is front-loaded.

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 description lacks information about return values, side effects, or error handling. For a tool with 3 parameters and no output schema, the description is too minimal to fully guide an agent.

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% and parameter descriptions are present. The tool description adds little beyond the schema, merely restating the line-ending option. Baseline score of 3 is appropriate.

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 it sends commands to a terminal with an option for line endings. It uses a specific verb and resource, but does not explicitly differentiate from sibling tools like send_data or read_data.

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 like send_data or create_session. It only describes what the tool does without context about prerequisites or exclusions.

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

send_dataB

向已打开的串口发送数据,支持文本和二进制模式

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径,如 /dev/ttyUSB0 或 COM1
dataYes要发送的数据(文本为UTF-8,二进制为Base64)
is_binaryNo是否为二进制模式,True 时 data 为 Base64 编码

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description only implies the port must be open, but fails to disclose side effects, success/failure behavior, or state changes beyond sending.

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?

A single, clear sentence with zero wasted words. Efficiently conveys core purpose and mode support.

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?

No output schema exists. The description covers basic operation but omits return value or error behavior, leaving the agent uncertain about outcome.

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 descriptions for all params. The description adds 'text is UTF-8' (not in schema) but overall adds marginal value beyond schema.

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 sends data to an opened serial port with text/binary modes, using specific verb and resource. It distinguishes from siblings like read_data but does not explicitly contrast.

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 gives no guidance on when to use this tool vs alternatives (e.g., send_command), nor any prerequisites or exclusions.

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

set_configA

修改已打开串口的配置(热更新,无需关闭重开)

ParametersJSON Schema
NameRequiredDescriptionDefault
portYes串口路径
baudrateNo波特率,支持的值:[300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600]
bytesizeNo数据位,支持的值:[5, 6, 7, 8]
parityNo校验位,支持的值:['N', 'E', 'O', 'M', 'S']
stopbitsNo停止位,支持的值:[1.0, 1.5, 2.0]
flow_controlNo流控制,支持的值:['none', 'hardware', 'software']
read_timeout_msNo读取超时(毫秒),范围 0-60000
write_timeout_msNo写入超时(毫秒),范围 0-60000

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses the key behavior: hot update without closing the port. It does not cover error conditions or prerequisites but adds meaningful behavioral context beyond the schema.

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 immediately conveys the action. It is front-loaded with the verb and resource, and there is no redundant information.

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 8 parameters with full schema descriptions, the one-line description adequately communicates the tool's purpose. It specifies that the port must be open, which is critical. It does not explain error handling or return values, but these are not required given the tool's simplicity and lack of output schema.

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 description coverage is 100%, so baseline is 3. The description does not add any extra meaning to parameters; it only states the overall purpose. No additional context is provided beyond what the schema already defines.

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 tool modifies the configuration of an already opened serial port with hot update capability. It uses specific verb-resource phrasing and distinguishes from sibling tools like open_port, close_port, and send_data.

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 implies usage context: only for already opened ports, and mentions hot update (no need to close). However, it does not explicitly state when not to use or mention alternative tools.

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. Dates show when Glama detected each change.

  1. 14 tool updates
    • First observedclear_buffer
    • First observedclose_port
    • First observedclose_session
    • First observedcreate_session
    • First observedget_session_info
    • First observedget_status
    • First observedlist_ports
    • First observedlist_sessions
    • First observedopen_port
    • First observedread_data
    • First observedread_output
    • First observedsend_command
    • First observedsend_data
    • First observedset_config

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with no overlap. read_data vs read_output and send_command vs send_data are differentiated by their descriptions (serial port vs terminal buffer/command).

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with underscores, e.g., open_port, send_data, clear_buffer. No mixing of conventions.

Tool Count5/5

14 tools is well-scoped for a UART server, covering port management, session handling, data transfer, and configuration without being excessive or insufficient.

Completeness5/5

The tool set covers the full lifecycle: opening/closing ports, creating/managing sessions, reading/writing data (text and binary), sending commands, clearing buffers, and retrieving status/info. No obvious gaps.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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 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
    D
    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
    18
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to communicate with UART/serial devices, offering tools for port management, data read/write, and protocol handling.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/donnel666/uart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server