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识别与过滤
📊 结构化日志与健康检查
🧪 完整的测试覆盖
快速开始
安装依赖
npm install开发模式
npm run dev构建项目
npm run build运行测试
npm test项目结构
mcp2serial/
├── src/ # 源代码
│ ├── core/ # 核心引擎层
│ ├── adapters/ # 硬件适配层
│ ├── services/ # 业务服务层
│ ├── mcp/ # MCP协议层
│ ├── utils/ # 工具模块
│ └── types/ # 类型定义
├── config/ # 配置文件
├── tests/ # 测试代码
├── docs/ # 文档
└── examples/ # 示例配置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严格模式,请确保代码符合规范:
npm run lint
npm run lint:fix测试
# 运行所有测试
npm test
# 监视模式
npm run test:watch
# 覆盖率报告
npm run test:coverage许可证
MIT License
贡献
欢迎提交Issue和Pull Request!
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.