Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Serial Port Toollist available serial ports"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP串口工具 (MCP Serial Port Tool)
基于MCP(Model Context Protocol)协议的串口工具,为AI助手提供与物理串口设备交互的能力。
功能特性
🔄 基于MCP协议的标准化接口
🔌 跨平台串口支持(Windows COM / Linux tty)
⚡ 异步事件驱动架构
🔒 写入互斥锁保证数据完整性
🎯 配置化URC识别与过滤
📊 结构化日志与健康检查
🧪 完整的测试覆盖
快速开始
安装依赖
开发模式
构建项目
运行测试
项目结构
API接口
串口操作
serial.open- 打开串口serial.close- 关闭串口serial.write- 写入数据并读取响应serial.list- 获取可用串口列表serial.status- 查询串口状态
通知
serial.report- 异步事件通知(URC、错误、状态变化)
健康检查
health.status- 获取系统健康状态health.metrics- 获取性能指标
日志
trace.get_log- 获取日志记录
配置说明
主要配置文件位于 config/ 目录:
default.yaml- 默认配置urc-patterns.yaml- URC模式配置
详细配置说明请参考 配置文档
开发指南
代码规范
项目使用ESLint和TypeScript严格模式,请确保代码符合规范:
测试
许可证
MIT License
贡献
欢迎提交Issue和Pull Request!