mcp-netmiko
An MCP server that enables LLMs interacting with your network devices
claude mcp add --transport stdio upa-mcp-netmiko-server uv run --with mcp[cli] --with netmiko [PATH TO]/mcp-netmiko-server/main.py [PATH TO]/YOUR-DEVICE.toml
How to use
The mcp-netmiko server enables large language models to interact with network devices over SSH by leveraging Netmiko. It exposes a small set of MCP tools that let you list configured devices, send commands to a device and retrieve the output, and push configuration commands with an option to commit or save. To use it, provide a TOML file describing your devices (with default credentials at the [default] section) and run the server via UV in CLI mode. You can then invoke the available tools through the MCP interface to perform common network automation tasks, such as collecting device output, onboarding new devices, or applying configurations in a controlled way. If you want real-time updates, you can run the server in SSE mode to stream responses to clients.
How to install
Prerequisites:
- Python 3.8+ and uvicorn-compatible environment (UV is used to run the server with the MCP CLI integration).
- Netmiko-compatible SSH access to your devices.
- A TOML file describing your devices (including a [default] section for credentials).
Install steps:
- Clone the repository: git clone https://github.com/upa/mcp-netmiko-server cd mcp-netmiko-server
- Ensure you have uv installed (if not, install via pip): pip install uv
- Prepare your device TOML file, e.g. my-devices.network.toml, with device definitions and defaults in a [default] section.
- Run the MCP server (example with UV and MCP CLI integration): uv run --with "mcp[cli]" --with netmiko main.py my-devices.network.toml
- Optional: run the server as SSE for streaming responses: uv run --with "mcp[cli]" --with netmiko main.py my-devices.network.toml --sse
Additional notes
Notes and tips:
- The server reads device definitions from a TOML file; each device inherits defaults from the [default] section when fields are omitted.
- Supported tools: get_network_device_list (list devices and types), send_command_and_get_output (execute a command and return output), set_config_commands_and_commit_or_save (apply configuration commands and optionally commit or save).
- Ensure network devices are reachable over SSH and that the credentials provided in the TOML file are correct.
- If you want to use the SSE endpoint, run the server with the --sse flag and access the provided URL (e.g., http://localhost:10000/sse).
- For troubleshooting, verify the TOML syntax and ensure the path to the main.py and device TOML file is correct in your run command.
- Environment variables can be used to customize defaults (e.g., SSH keys, timeouts) as needed by your deployment.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP