MCP ExplorerExplorer

Mcp Netmiko Server

@upaon 9 months ago
5 MIT
FreeCommunity
AI Systems
An MCP server that eanbles LLMs interacting with your network devices

Overview

What is Mcp Netmiko Server

mcp-netmiko-server is an MCP server that enables large language models (LLMs) to interact with network devices via SSH using the Netmiko library.

Use cases

Use cases include automating network configurations, retrieving device statuses, and integrating network management tasks within larger automation frameworks.

How to use

To use mcp-netmiko-server, clone the repository, create a TOML file listing your network devices, and run the main script with the appropriate commands. Ensure you have the required dependencies installed.

Key features

Key features include listing network devices, sending commands to devices and retrieving their output, and sending configuration commands that can be committed or saved automatically.

Where to use

mcp-netmiko-server can be used in network management, automation, and monitoring, particularly in environments where interaction with multiple network devices is required.

Content

mcp-netmiko-server

An MCP server that enables LLMs interacting with your network devices
via SSH (netmiko).

Tool Description
get_network_device_list Return list of network device names and types defined in a TOML file.
send_command_and_get_output Send a command to a device and returns its output.
set_config_commands_and_commit_or_save Send configuration commands to a device and commit or save automatically.
mcp-netmiko-demo

How to use

  • Install
git clone https://github.com/upa/mcp-netmiko-server
cd mcp-netmiko-server

# Write your toml file that lists your devices
vim my-devices.network.toml

# Run via stdio
uv run --with "mcp[cli]" --with netmiko main.py my-devices.network.toml

# Run as an SSE server: URL is http://localhost:10000/sse in this case
uv run --with "mcp[cli]" --with netmiko main.py my-devices.network.toml --sse
  • Configuration

List your network devices in a toml file like sample.network.toml:

[default]

username = "rouser"
password = "rouserpassword"

[qfx1]

hostname = "172.16.0.40"
device_type = "juniper_junos"

[nexus1]

hostname = "nexus1.lab"
device_type = "cisco_nxos"

[default] is a special section that defines the default values such
as username and password. Devices inherit the default values if
not defined on their sections.

For device_type values, see netmiko Supported
Platforms
.

  • claude desktop config json:
{
  "mcpServers": {
    "netmiko server": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "netmiko",
        "[PATH TO]/mcp-netmiko-server/main.py",
        "[PATH TO]/YOUR-DEVICE.toml"
      ]
    }
  }
}

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers