Netmiko-mcp
June 11, 2025 ยท View on GitHub
A powerful, AI-assisted solution for automating Cisco network device configuration and management using Model Context Protocol (MCP).
๐ Overview
This application provides a sophisticated interface for interacting with Cisco network devices through an AI-powered automation layer. It leverages Claude AI's capabilities via the Model Context Protocol (MCP) to enable network engineers to manage Cisco devices with natural language processing.
โจ Key Features
- Show Command Execution: Execute show commands on Cisco devices with simplified syntax
- Configuration Management: Apply configuration changes to network devices safely
- Ping Testing: Perform network connectivity tests using Cisco ping commands
- Natural Language Processing: Interpret network commands through conversational language
- Claude Integration: Works as an MCP extension for Claude Desktop
๐ง System Requirements
- Python 3.10 or higher
- Cisco network device(s) accessible via SSH or you can use CML Cisco sandbox
- Windows/Linux/macOS compatible
๐ Quick Start
Environment Setup with UV
This project leverages UV for efficient Python environment and package management:
# Install UV
pip install uv
or
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" #Windows
# curl -LsSf https://astral.sh/uv/install.sh | sh # Linux/macOS
# Create and activate virtual environment
cd MCP_Network_automator
uv venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/macOS
# Install dependencies
uv sync
Installation
-
Clone the repository:
git clone <repository-url> cd MCP_Network_automator -
Install project and dependencies:
uv venv .venv\Scripts\activate uv pip install -e .
Claude Desktop Integration
-
Install the MCP server to your Claude Desktop:
mcp install mcp_cisco_server.py -
Inspect your mcp server:
mcp dev mcp_cisco_server.py
You can test if this tool works correctly or not.
-
Configure Claude Desktop by adding this to your
claude_desktop_config.json:{ "mcpServers": { "Cisco-IOS-config": { "command": "uv", "args": [ "run", "--with", "mcp[cli], netmiko", "mcp", "run", "C:\\Users\\<your-username>\\Documents\\MCP_Network_automator\\mcp_cisco_server.py" #Choose correct your path ] } } }Default location:
C:\Users\<your-username>\AppData\Roaming\Claude\claude_desktop_config.json
๐งฐ Core Components
- mcp_cisco_server.py: Main MCP server implementation for Cisco network automation tools
- agent_client/cisco_agent.py: Core connector for Cisco device interaction, handling SSH connections and command execution
๐ง Available Tools
The MCP Network Automator provides three main tools:
-
show_cisco_command: Execute show commands on Cisco devices
- Examples: "show running-config", "show interfaces", "show ip route"
-
config_cisco_command: Apply configuration changes to Cisco devices
- Automatically enters configuration mode
- Handles multi-line configuration commands
-
ping_cisco_device: Test network connectivity from Cisco devices
- Executes ping commands to verify network reachability
๐ฌ Example Usage
For this example, we use Cisco Modeling Labs (CML) on Cisco Sandbox to manage multiple network devices:

This case is for SSH, so you need to configure SSH for every device. By default, these devices use telnet.
The system processes natural language requests for network operations through Claude Desktop:

Example commands you can use:
"Show the running interfaces on the router R1"
"Configure interface GigabitEthernet0/1 with IP 192.168.1.1/24"
"Display the routing table"
"Ping 8.8.8.8 from router R1"
To use this tool, simply:
- Configure your Claude Desktop with the MCP server
- Open Claude Desktop and select the "Cisco-IOS-config" tool
- Provide the network device credentials when prompted (HOST, USERNAME, PASSWORD)
- Enter your network commands in natural language
๐ Technical Details
Technology Stack
- Netmiko: Powers SSH connections to Cisco devices
- MCP: Model Context Protocol for Claude integration
- Python-dotenv: Manages environment variables and secrets
- FastMCP: Provides the MCP server implementation
Dependency Management
# Update all dependencies
uv pip compile pyproject.toml -o requirements.txt
uv pip sync requirements.txt
# Check for outdated packages
uv pip list --outdated
๐ฆ Dependencies
Primary dependencies include:
- netmiko: Network device SSH connection management
- python-dotenv: Environment variable management
- mcp: Model Context Protocol for Claude integration
๐ Support
For questions or issues, please open an issue on our GitHub repository.