A comprehensive MCP (Model Context Protocol) server for Cisco device management via SSH/Telnet. Execute commands and manage Cisco routers, switches, and firewalls through AI assistants like Claude and Amazon Q.
- 🔌 Dual Protocol Support: Connect via SSH or Telnet
- 🔄 Persistent Connections: Maintain long-lived connections for efficient command execution
- 🎯 Universal Command Execution: Execute any Cisco command through a single interface
- 🔐 Mode Management: Automatic switching between user, enable, and configuration modes
- 🌐 Multi-Device Support: Manage multiple Cisco devices simultaneously
- 🤖 AI-Friendly: Natural language command translation through AI assistants
- 📊 Connection Monitoring: Track active connections and their status
-
Clone and Install
git clone https://github.com/very99/cisco-mcp.git cd cisco-mcp npm install -
Build the Project
npm run build
-
Configure MCP Client
Add to your MCP configuration (e.g., Claude Desktop):
{ "mcpServers": { "cisco-mcp": { "command": "node", "args": ["/path/to/cisco-mcp/dist/index.js"] } } }
Establish a connection to a Cisco device.
Parameters:
host(required): IP address or hostnameusername(required): Authentication usernamepassword(required): Authentication passwordprotocol(optional): "ssh" or "telnet" (default: "ssh")port(optional): Custom port numberenable_password(optional): Enable password for privileged mode
Example:
{
"host": "192.168.1.1",
"username": "admin",
"password": "password123",
"protocol": "ssh",
"enable_password": "enable123"
}Execute a command on a connected Cisco device.
Parameters:
host(required): Target device IP/hostnamecommand(required): Cisco command to executemode(optional): "user", "enable", or "config" (default: "user")
Example:
{
"host": "192.168.1.1",
"command": "show version",
"mode": "user"
}Disconnect from a Cisco device.
Parameters:
host(required): Device IP/hostname to disconnect
List all active connections.
AI: "Connect to router 192.168.1.1 and show me the device information"
The AI will:
- Use
connect_cisco_deviceto establish connection - Use
execute_cisco_commandwith "show version"
AI: "Configure interface GigabitEthernet0/1 with IP 10.1.1.1/24"
The AI will:
- Use
execute_cisco_commandwith mode "config" - Execute: "interface GigabitEthernet0/1"
- Execute: "ip address 10.1.1.1 255.255.255.0"
AI: "Check the routing table and interface status on the core switch"
The AI will execute multiple commands:
- "show ip route"
- "show ip interface brief"
- "show interface status"
This MCP server supports all Cisco IOS commands, including but not limited to:
show version- Device informationshow running-config- Current configurationshow ip interface brief- Interface summaryshow ip route- Routing tableshow vlan brief- VLAN informationshow interface status- Interface statusshow cdp neighbors- CDP neighborsshow mac address-table- MAC address table
configure terminal- Enter configuration modeinterface <interface>- Configure interfaceip address <ip> <mask>- Set IP addressno shutdown- Enable interfacevlan <vlan-id>- Create/configure VLANrouter ospf <process-id>- Configure OSPF
ping <destination>- Test connectivitytraceroute <destination>- Trace routeshow tech-support- Technical support information
- This tool is designed for network automation and management
- Credentials are passed per connection and not stored
- Use appropriate network security practices
- Consider using SSH keys for enhanced security (future enhancement)
AI Assistant (Claude/Amazon Q)
↓ Natural Language
MCP Client
↓ Tool Calls
Cisco MCP Server
↓ SSH/Telnet
Cisco Devices (Routers/Switches/Firewalls)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
一个全面的MCP(模型上下文协议)服务器,用于通过SSH/Telnet管理Cisco设备。通过Claude和Amazon Q等AI助手执行命令并管理Cisco路由器、交换机和防火墙。
- 🔌 双协议支持: 支持SSH或Telnet连接
- 🔄 持久连接: 维护长连接以实现高效的命令执行
- 🎯 通用命令执行: 通过单一接口执行任何Cisco命令
- 🔐 模式管理: 自动在用户、特权和配置模式之间切换
- 🌐 多设备支持: 同时管理多个Cisco设备
- 🤖 AI友好: 通过AI助手进行自然语言命令转换
- 📊 连接监控: 跟踪活动连接及其状态
-
克隆并安装
git clone https://github.com/very99/cisco-mcp.git cd cisco-mcp npm install -
构建项目
npm run build
-
配置MCP客户端
添加到您的MCP配置中(例如Claude Desktop):
{ "mcpServers": { "cisco-mcp": { "command": "node", "args": ["/path/to/cisco-mcp/dist/index.js"] } } }
建立到Cisco设备的连接。
在已连接的Cisco设备上执行命令。
断开与Cisco设备的连接。
列出所有活动连接。
AI: "连接到路由器192.168.1.1并显示设备信息"
AI: "配置接口GigabitEthernet0/1的IP为10.1.1.1/24"
AI: "检查核心交换机的路由表和接口状态"
此MCP服务器支持所有Cisco IOS命令,包括但不限于:
- 显示命令(show commands)
- 配置命令(configuration commands)
- 诊断命令(diagnostic commands)
本项目采用MIT许可证 - 详见LICENSE文件。