Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Huawei

БесплатноНе проверен

Huawei — Model Context Protocol server

GitHubEmbed

Описание

Huawei — Model Context Protocol server

README

This script provides a FastMCP server for interacting with Huawei routers using the Netmiko library. It allows you to execute commands, retrieve configurations, and manage router interfaces.

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
    
  2. Install the required Python libraries:

    pip install -r requirements.txt
    

Configuration

The server requires a JSON file (by default, devices.json) to define the Huawei routers it can connect to. This file should be in the same directory as the script.

devices.json example:

{
  "router1": {
    "ip": "192.168.1.1",
    "port": 22,
    "username": "admin",
    "password": "your_password",
    "type": "Huawei VRP",
    "mac": "00:1A:2B:3C:4D:5E",
    "software": "VRP (R) software, Version 8.191",
    "subnet": "192.168.1.0/24"
  },
  "router2": {
    "ip": "10.0.0.1",
    "port": 22,
    "username": "user",
    "auth": {
      "password": "another_password"
    },
    "type": "Huawei VRP",
    "mac": "00:1A:2B:3C:4D:5F",
    "software": "VRP (R) software, Version 8.191",
    "subnet": "10.0.0.0/24"
  }
}

Authentication Methods

The devices.json file supports two authentication methods:

  • Password: Provide the password directly in the password field or within an auth dictionary.
  • SSH Key: If you are using SSH key-based authentication, you can specify the path to your key file in the ssh_key field.

Usage

To start the HuaweiMCP server, run the HuaweiMCP_V3.py script with the following arguments:

python HuaweiMCP_V3.py [-f <device-mapping>] [-H <host>] [-p <port>] [-t <transport>]

Arguments

  • -f, --device-mapping: The name of the JSON file containing the device mapping. Default is devices.json.
  • -H, --host: The host for the Huawei MCP Server. Default is 0.0.0.0.
  • -p, --port: The port for the Huawei MCP Server. Default is 30030.
  • -t, --transport: The transport for the Huawei MCP Server. Default is streamable-http.

Example:

python HuaweiMCP_V3.py -f my_devices.json -H 127.0.0.1 -p 8080

Available Tools

The following tools are available through the FastMCP server:

  • execute_huawei_command(router_name: str, command: str, timeout: int = 360): Executes a command on the specified router.
  • get_huawei_config(router_name: str): Retrieves the current configuration from the specified router.
  • get_router_list(): Returns a comma-separated list of configured routers.
  • get_router_ip(): Returns a comma-separated list of configured routers and their IP addresses.
  • get_router_info(): Returns detailed information for each configured router, including type, MAC address, software version, and location (subnet).
  • configure_huawei_interface(router_name: str, interface_name: str, commands: list, timeout: int = 360): Configures a specified interface on a router with a list of commands.

from github.com/ishag74/huawei-mcp-server

Установка Huawei

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/ishag74/huawei-mcp-server

FAQ

Huawei MCP бесплатный?

Да, Huawei MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Huawei?

Нет, Huawei работает без API-ключей и переменных окружения.

Huawei — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Huawei в Claude Desktop, Claude Code или Cursor?

Открой Huawei на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Huawei with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development