Netmiko MCP Server
Click on "Deploy 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., "@Netmiko MCP Serverrun show version on core-rtr-01"
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.
Netmiko MCP Server
An MCP (Model Context Protocol) server for managing network devices via SSH using Netmiko. Features connection pooling, multi-vendor support, and concurrent operations.
Features
Command Execution: Run CLI commands on single or multiple devices
Configuration Management: Push configuration changes with optional save/rollback
Device Inventory: YAML-based device inventory with groups and tags
Connection Pooling: Efficient connection reuse with health checks
Multi-Vendor Support: Works with any device type supported by Netmiko
Concurrent Operations: Execute commands on multiple devices in parallel
TextFSM Parsing: Optional structured output parsing
Related MCP server: mcp-netmiko-server
Installation
From Source
git clone https://github.com/ntunes/netmiko-mcp-server.git
cd netmiko-mcp-server
pip install -e .With Docker
docker build -t netmiko-mcp .Configuration
Device Inventory
Create a config/devices.yaml file with your device inventory:
defaults:
timeout: 30
fast_cli: true
credentials:
production:
username: "${NETMIKO_USERNAME}"
password: "${NETMIKO_PASSWORD}"
secret: "${NETMIKO_SECRET}"
groups:
core_routers:
- core-rtr-01
- core-rtr-02
devices:
core-rtr-01:
host: "192.168.1.1"
device_type: "cisco_ios"
credential_profile: "production"
tags:
- core
- production
core-rtr-02:
host: "192.168.1.2"
device_type: "cisco_ios"
credential_profile: "production"
tags:
- core
- production
pool_settings:
max_connections_per_device: 3
connection_timeout: 300
health_check_interval: 60Environment Variables
Set credentials via environment variables:
export NETMIKO_USERNAME="admin"
export NETMIKO_PASSWORD="your_password"
export NETMIKO_SECRET="enable_secret"Optionally set config file location:
export NETMIKO_MCP_CONFIG="/path/to/devices.yaml"Usage
Running the Server
Stdio transport (for Claude Desktop):
python -m netmiko_mcpStreamable HTTP transport:
python -m netmiko_mcp --transport streamable-http --port 8339With Docker:
docker run -p 8339:8339 \
-e NETMIKO_USERNAME=admin \
-e NETMIKO_PASSWORD=secret \
-v ./config/devices.yaml:/app/config/devices.yaml:ro \
netmiko-mcpWith Docker Compose:
# Set credentials in .env or environment
export NETMIKO_USERNAME=admin
export NETMIKO_PASSWORD=secret
docker-compose up -dClaude Desktop Configuration
Add to your Claude Desktop configuration:
For stdio transport:
{
"mcpServers": {
"netmiko": {
"command": "python",
"args": ["-m", "netmiko_mcp", "--config", "/path/to/devices.yaml"]
}
}
}For HTTP transport:
{
"mcpServers": {
"netmiko": {
"url": "http://localhost:8339/mcp"
}
}
}MCP Tools
Command Execution
Tool | Description |
| Execute a single command on one device |
| Execute the same command on multiple devices concurrently |
| Execute multiple commands sequentially on one device |
Configuration
Tool | Description |
| Push configuration commands to one device |
| Push configuration to multiple devices concurrently |
Inventory & Discovery
Tool | Description |
| List all devices with optional tag/type filtering |
| Get detailed device information and connection status |
| List all device groups and their members |
| Test connectivity to a device |
| Get connection pool statistics |
| List all device types in inventory |
| List all tags used across devices |
Examples
Execute a command:
Use send_command on device "core-rtr-01" with command "show version"Execute on multiple devices:
Use send_command_parallel on devices ["@core_routers"] with command "show ip interface brief"Push configuration:
Use send_config on device "core-rtr-01" with config_commands ["interface Loopback0", "description Test"] and save_config trueSupported Device Types
Any device type supported by Netmiko, including:
cisco_ios- Cisco IOScisco_xe- Cisco IOS-XEcisco_xr- Cisco IOS-XRcisco_nxos- Cisco NX-OSarista_eos- Arista EOSjuniper_junos- Juniper JunOSpaloalto_panos- Palo Alto PAN-OShp_procurve- HP ProCurvelinux- Linux SSH
See Netmiko supported platforms for the full list.
Development
Install Development Dependencies
pip install -e ".[dev]"Run Tests
pytestRun Linting
ruff check src/ tests/
mypy src/License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
- emisarOAuthdev.emisar
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Cisco network devices through SSH using Netmiko. Supports retrieving device status, interface details, configurations, and resource monitoring through natural language commands in Claude Desktop.-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with network devices via SSH (netmiko), allowing command execution and configuration changes on routers and switches.35-
- AlicenseNot gradedqualityDmaintenanceEnables large language models to manage network devices (Cisco, Huawei, H3C, Ruijie) via Telnet/SSH, supporting command execution, configuration, and diagnostics.12MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to execute SSH commands on network devices using natural language, supporting multiple vendors and authentication methods for automated network management.-