UM

upa/mcp-netmiko-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

35 stars 8 forks 品質 41 トレンド 12

LLM がネットワークデバイスとやり取りできる MCP サーバー

概要

LLM が SSH (netmiko) 経由でネットワークデバイスとやり取りできる MCP サーバー。 サンプル.network.toml のような toml ファイルにネットワーク デバイスをリストします。 [default] は、ユーザー名やパスワードなどのデフォルト値を定義する特別なセクションです。 デバイスは、セクションで定義されていない場合、デフォルト値を継承します。 device type の値については、netmiko がサポートされているプラットフォームを参照してください.

概要(AI 翻訳)

LLM がネットワークデバイスとやり取りできる MCP サーバー SSH(netmiko)経由で。

| ツール | 概要 | |:------------------------------------------------------------------------------------------------------------------------------------------------------------ | get network device list | TOMLファイルで定義されているネットワークデバイス名とタイプの一覧に戻る | | send command and get output | コマンドをデバイスに送信し、出力を返します。 | | set config commands and commit or save | 設定コマンドをデバイスに送信し、自動的に保存します。 |

使い方

  • インストール

*構成

サンプル.network.toml のような toml ファイルにネットワーク デバイスをリストします。

[[default] は、このようなデフォルト値を定義する特別なセクションです。 [username と password のように。 デバイスはデフォルト値を継承します。 セクションで定義されていない。

[device_type] の値については、netmiko がサポートされているを参照してください。 プラットフォーム

  • claudeデスクトップの設定 json:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

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.

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"
      ]
    }
  }
}
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

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