Serial-Agent-MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Serial-Agent-MCP
版本号: V1.3 项目代号: Serial-Agent-MCP
基于 MCP (Model Context Protocol) 的智能串口交互工具,作为大语言模型与物理硬件之间的桥梁。
项目背景
传统串口助手只能进行机械的收发,无法理解协议逻辑。本项目旨在开发一个基于 Model Context Protocol (MCP) 的串口工具,作为大语言模型(LLM)的物理接口。工具本体不硬编码任何 AT 指令集或特定协议解析逻辑,由 LLM 在运行时决定发送什么、怎么接收、何时超时。
Related MCP server: UART MCP Server
工具用途
智能数据分流: 自动区分同步响应和异步消息
多协议支持: 兼顾 AT 指令(文本行)与 纯数据传输(HEX/二进制)
智能收发接口: 支持多种模式的智能数据收发
零数据丢失: 确保所有数据被正确处理
实时交互: 与大语言模型无缝集成进行实时串口操作
核心功能
list_ports: 列出当前系统所有可用的串口设备
无输入参数
返回设备列表(端口、描述、硬件ID)
configure_connection: 打开或关闭串口,配置参数
输入: port(端口), baudrate(波特率), action(操作类型)
返回: 连接状态信息
send_data: 发送数据并根据策略获取响应
输入: payload(发送内容), encoding(编码格式), wait_policy(等待策略), stop_pattern(停止模式), timeout_ms(超时时间)
支持多种等待策略: keyword(关键字模式), timeout(超时模式), none(射后不理)
返回: 发送结果和响应数据
read_async_messages: 读取后台缓冲区中积累的异步消息
无输入参数
返回: 异步消息列表
安装和配置
环境要求
Python 3.8+
Windows/Linux/macOS 操作系统
可用串口设备
依赖安装
pip install -r requirements.txtMCP 服务器配置
在使用此MCP服务器时,需要在MCP客户端配置中添加如下配置:
{
"mcpServers": {
"serial-agent-mcp": {
"command": "python",
"args": [
"-m",
"serial2mcp.main"
],
"env": {
"PYTHONPATH": "D:\\niusulong\\serial2mcp--1\\src",
"SERIAL2MCP_LOG_LEVEL": "INFO"
}
}
}
}使用方法
1. 启动 MCP 服务器
python -m serial2mcp.main2. 与大语言模型集成
将工具接口定义提供给大语言模型,模型即可通过MCP协议调用串口功能。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Give the physical world an API: cameras become typed endpoints your agent can read and act on.
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Connect your AI to your own devices, 3D printers, factory tools and a shared agent task pool.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables 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-
- AlicenseAqualityDmaintenanceEnables AI assistants to communicate with serial port devices, supporting port management, data transmission in text/binary modes, interactive terminal sessions, and automatic reconnection.1412MIT
- AlicenseAqualityDmaintenanceEnables LLMs to communicate with hardware devices via serial ports. Provides tools for listing ports, opening/closing connections, reading/writing data, and controlling serial signals.8MIT
- AlicenseAqualityCmaintenanceAllows 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.2778 PyPI27MIT