console-switch-mcp
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., "@console-switch-mcpconnect to COM3 and show version"
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.
Console Switch MCP
通过串口 Console 口(RS-232/USB-to-Serial)控制网络交换机的 MCP Server。支持华为、H3C、思科等主流品牌交换机。
功能
Tool | 说明 |
| 列出计算机所有可用串口(COM口) |
| 通过 Console 口连接交换机 |
| 发送单条命令并获取返回结果 |
| 批量发送配置命令 |
| 断开 Console 连接 |
| 查看当前连接状态 |
支持的设备
华为 (Huawei) — 自动识别
<Huawei>/[Huawei]提示符H3C — 自动识别
<H3C>/[H3C]提示符思科 (Cisco) — 自动识别
Router>/Router#提示符其他支持标准串口 Console 的网络设备
前置条件
硬件:Console 线(USB 转 RJ45/RS-232),常见芯片:FTDI、CH340、PL2303
驱动:安装对应 USB 转串口芯片的驱动程序
Node.js:>= 18.0.0
安装
1. 克隆项目
git clone https://github.com/yangyu2729/console-switch-mcp.git
cd console-switch-mcp2. 安装依赖并构建
npm install
npm run build3. 配置 MCP
WorkBuddy
编辑 ~/.workbuddy/mcp.json,添加:
{
"mcpServers": {
"console-switch-mcp": {
"command": "node",
"args": ["/你的路径/console-switch-mcp/build/index.js"],
"disabled": false
}
}
}Windows 路径示例:
C:/Users/你的用户名/console-switch-mcp/build/index.jsmacOS/Linux 路径示例:/home/你的用户名/console-switch-mcp/build/index.js
Claude Desktop
编辑配置文件:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"console-switch-mcp": {
"command": "node",
"args": ["/绝对路径/console-switch-mcp/build/index.js"]
}
}
}配置完成后重启 WorkBuddy / Claude Desktop 即可生效。
使用
在 AI 对话中直接使用自然语言操作:
"列出电脑上可用的串口"
"用 COM3 连接华为交换机,波特率 9600"
"查看交换机版本信息"
"查看 VLAN 配置"
"进入系统视图,配置端口"
"断开连接"
常用华为交换机命令
display version 查看设备版本
display current-configuration 查看当前配置
display vlan 查看 VLAN 信息
display interface brief 查看接口概要
display arp 查看 ARP 表
display mac-address 查看 MAC 地址表
display ip routing-table 查看路由表
display cpu-usage 查看 CPU 使用率
display logbuffer 查看日志缓冲
system-view 进入系统视图
ping 192.168.1.1 测试网络连通性串口参数
参数 | 默认值 | 说明 |
baudRate | 9600 | 华为/H3C 默认 9600,部分设备用 115200 |
dataBits | 8 | 数据位 |
stopBits | 1 | 停止位 |
parity | none | 校验位 |
项目结构
console-switch-mcp/
├── src/
│ ├── index.ts # MCP Server 入口
│ └── serial-console.ts # 串口通信核心模块
├── build/ # 编译输出
├── package.json
└── tsconfig.jsonLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/yangyu2729/console-switch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server