Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Huawei

FreeNot checked

Huawei — Model Context Protocol server

GitHubEmbed

About

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

Installing Huawei

This server has no published package — it is built from source. Open the repository and follow its README.

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

FAQ

Is Huawei MCP free?

Yes, Huawei MCP is free — one-click install via Unyly at no cost.

Does Huawei need an API key?

No, Huawei runs without API keys or environment variables.

Is Huawei hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Huawei in Claude Desktop, Claude Code or Cursor?

Open Huawei on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Huawei with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs