Token导航 LogoToken导航TokenDH.com
Netmiko MCP Server logo
AI代理stdio官方级别未说明来源级核验

Netmiko MCP Server

MCP Server

Netmiko MCP服务器是一个用于自动化网络设备管理的工具,通过SSH与Cisco设备交互,并支持与Claude Desktop等LLM客户端集成。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
命令行工具PythonClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Owen123-lang

提供方

Owen123-lang

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv venv

详细介绍

Netmiko MCP Server

MCP (Model Context Protocol) Server untuk automasi jaringan Cisco menggunakan Netmiko. Server ini mengekspos tools untuk berinteraksi dengan perangkat Cisco melalui SSH, dan dapat diakses oleh LLM clients seperti Claude Desktop.

Yang baru dibuat

  • Get Interfaces: Ambil daftar semua interface dan statusnya
  • Get Device Status: Ambil informasi device (version, uptime, dll)
  • Get Running Config: Ambil konfigurasi yang sedang berjalan
  • Interface Details: Ambil detail spesifik untuk interface tertentu
  • Resource Monitoring: Monitor CPU dan memory usage
  • sambungin ke claude desktop: Komunikasi dengan router menggunakan bahasa natural melalui Claude Desktop

harus punya....

  • Python 3.8 atau lebih baru
  • Akses ke Cisco DevNet Sandbox (gratis) atau perangkat Cisco lainnya
  • Koneksi internet untuk DevNet Sandbox
  • Claude Desktop (untuk LLM integration)

instalasi

1. navigasi ke folder projek

cd netmiko_mcp_server

2. Buat virtual environment (optional)

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/Mac
python3 -m venv venv
source venv/bin/activate

3. install requriements

pip install -r requirements.txt

Konfigurasi utama untuk device

Menggunakan Cisco DevNet Sandbox - Catalyst 8000 Always-On

File config.py perlu dikonfigurasi dengan kredensial dari DevNet Sandbox:

  1. Login ke DevNet Sandbox: https://devnetsandbox.cisco.com/
  2. Pilih "Catalyst 8000 Always-On Sandbox"
  3. Launch sandbox untuk mendapatkan kredensial unik
  4. Copy kredensial dari Quick Access Tab
  5. Update config.py:
DEVNET_DEVICE = {
    "device_type": "cisco_ios",
    "host": "devnetsandboxiosxec8k.cisco.com",
    "port": 22,
    "username": "your_username",      # Dari DevNet Sandbox
    "password": "your_password",       # Dari DevNet Sandbox
    "secret": "your_password",
    "timeout": 30,
}

Penting:

  • Setiap user mendapat kredensial unik
  • Password case-sensitive (perhatikan angka 0 vs huruf O)
  • Sandbox ini VPN-less (tidak perlu VPN)

Menggunakan Device Sendiri

Edit config.py dan ganti dengan kredensial device fisiknya nanti:

DEVNET_DEVICE = {
    "device_type": "cisco_ios",  # atau cisco_xe, cisco_xr, dll
    "host": "192.168.1.1",       # IP router/switch Anda
    "port": 22,
    "username": "admin",
    "password": "your_password",
    "secret": "your_enable_password",
    "timeout": 30,
}

Cara Pake

Testing Individual Tools

Setiap tool bisa ditest secara sendiri/individu:

# Test get interfaces
python tools/get_interfaces.py

# Test device status
python tools/get_device_status.py

# Test running config
python tools/get_running_config.py

Menjalankan MCP Server

python mcp_server.py

Server akan berjalan dan menunggu koneksi dari MCP client (seperti Claude Desktop).

Tools yang Tersedia

1. get_interfaces

Mendapatkan daftar semua interface dari device.

2. get_interface_detail

Mendapatkan detail spesifik untuk satu interface.

Parameters:

  • interface_name (required): Nama interface (contoh: "GigabitEthernet1")

Output: show interface

3. get_device_status

Mendapatkan informasi umum device (version, model, uptime).

Output: show version dan hostname

4. get_device_uptime

Mendapatkan informasi uptime device.

Output: Uptime dari show version

5. get_resource_usage

Mendapatkan informasi CPU dan memory usage.

Output: CPU dan memory statistics

6. get_running_config

Mendapatkan running configuration.

Parameters:

  • filter_keyword (optional): Filter konfigurasi (contoh: "interface", "ip")

Output: show running-config (filtered atau full)

7. get_interface_config

Mendapatkan konfigurasi untuk interface spesifik.

Parameters:

  • interface_name (required): Nama interface

Output: show running-config interface

8. get_startup_config

Mendapatkan startup configuration (saved config).

Output: show startup-config

Testing

Test Koneksi ke DevNet Sandbox

Jalankan script test yang sudah disediakan:

python test_connection.py

Hasil Testing (progress day week 1)

Test 1: Connection Test

command: python test_connection.py

untuk test koneksi dasar ke cisco device, verifikasi kredensial, dan informasi umum seperti version, hostname, dan interfaces.

output:

Test 2: Get Interfaces

command: python tools/get_interfaces.py

deskripsi: Test tool untuk mendapatkan daftar semua interface dan statusnya (output dari show ip interface brief).

Test 3: Get Device Status

command: python tools/get_device_status.py

deskripsi: Test tool untuk mendapatkan informasi device (IOS version, hostname, uptime, CPU/memory).

Test 4: Get Running Config

command: python tools/get_running_config.py

deskripsi:Test tool untuk mendapatkan running configuration. Script ini akan menjalankan 2 test:

Test 1: Filtered config dengan keyword "interface" Test 2: Config untuk specific interface (GigabitEthernet1)

Test 4a: Filtered Config (interface) command: python test_connection.py

Test 5: MCP Server

Command: python mcp_server.py

deskripsi: Menjalankan MCP server yang akan menunggu koneksi dari Claude Desktop.

Setting buat Claude Desktop

1. Lokasi File Konfigurasi Claude Desktop

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Linux:

~/.config/Claude/claude_desktop_config.json

2. Edit Konfigurasi

Tambahkan MCP server Anda ke dalam file konfigurasi:

{
  "mcpServers": {
    "netmiko-cisco": {
      "command": "python",
      "args": [
        "C:\\Life\\kuliah\\RISET_ASET\\netmiko_mcp_server\\mcp_server.py"
      ],
      "env": {}
    }
  }
}

3. Restart Claude Desktop

4. Verifikasi

Di Claude Desktop, coba perintah seperti:

Get the list of interfaces from the Cisco router

atau

What is the hostname and version of the Cisco device?

Claude akan menggunakan tools MCP untuk mengeksekusi perintah di router.

目录标签

目录标签

命令行工具PythonClaude网络自动化本地部署Cisco设备管理SSH工具LLM集成

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Python

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosessionremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP