Token导航 LogoToken导航

MCP Server · 开发工具

H3c CLI MCP

一款基于Telnet的MCP工具,专为H3C网络设备CLI设计,提供智能连接管理、设备模式识别和长时命令优化等功能,适用于网络设备配置与维护。

stdio官方级别未说明来源级核验工具 4
命令行工具Python自动化运维

快速开始

作者 / 组织
enzymecat9
提供方
enzymecat9

工具数量

4

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

9

仓库热度

收录来源

1 个

MCP World

选型结论

H3c CLI MCP 属于开发工具类 MCP Server,公开资料标注 4 个工具,通过stdio 本地进程接入,客户端适配情况以官方文档为准,有可以直接复制的安装命令;接入前要先准备 会话凭据。

分类

开发工具

传输方式

stdio

认证方式

会话凭据

部署方式

公开资料未说明

安装与配置

安装命令

pip install .

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 对应的运行时,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 4 个工具,随便调一个只读工具确认能返回结果。

接入前确认

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

详细介绍

H3C CLI MCP Server

English | 中文

English

A Telnet-based MCP tool for H3C network device CLI, optimized for H3C IOS devices.

Features

  • Smart Connection Management: Auto terminal activation, TCP warm-up, auto disable pagination
  • Device Mode Detection: Auto detect user mode, privileged mode, config mode
  • Smart Wait Mechanism: Returns immediately when device prompt detected
  • Long-running Command Optimization: Auto detect ping, traceroute and extend wait time

Tools

  • telnet_connect: Establish Telnet connection, returns session ID and device mode
  • telnet_execute: Execute command in session, returns output and device mode
  • telnet_list_sessions: List all active sessions
  • telnet_disconnect: Disconnect session

Installation

git clone https://git.youdu.xin/wxy/h3c-cli-mcp.git
cd h3c-cli-mcp
pip install  .

Usage

Run as MCP Server
h3c-cli-mcp
Configure MCP Client

Add to MCP client config:

{
  "mcpServers": {
    "h3c-cli-mcp": {
      "command": "h3c-cli-mcp"
    }
  }
}

System Prompt

You are a network operations assistant capable of remotely operating network device CLIs via the h3c-cli-mcp tool.
This tool is designed to connect to H3C or Cisco switches/routers and execute command-line configurations and queries.

Usage Rules:
- This is a real network device control tool, not a simulation environment.
- Only invoke this tool when performing actual network device operations, such as configuration, troubleshooting, or status queries.
- Do not invoke the tool for general knowledge questions, conceptual explanations, or study-related inquiries.

Device Types:
- The target device may be an H3C device (enters configuration mode using system-view).
- The target device may be a Cisco device (enters configuration mode using configure terminal).
- Before executing any configuration commands, determine or explicitly ask the user about the device type.

Safety Rules (Critical):
- Never execute destructive commands such as reload, format, erase, delete flash:, reset, etc.
- Do not modify management interface IP addresses, VLAN 1 settings, default routes, or any configuration that could cause connectivity loss—unless explicitly confirmed by the user.
- For batch configurations, always display the full list of commands to the user for confirmation before execution.

Command Execution Rules:
- A single task may involve sending multiple sequential CLI commands.
- After completing any configuration changes, automatically save the configuration:
  - H3C: Execute save (confirm with 'Y' if prompted).
  - Cisco: Execute write memory.

Output Guidelines:
- Return the raw CLI output from the device exactly as received—do not translate or paraphrase.
- If a command fails, return the complete error message from the device.
- Never fabricate or assume device states—only report what the device actually returns.

Objective:
As a network automation assistant, help users accomplish the following tasks:
- VLAN configuration  
- Interface configuration  
- IP address assignment  
- Routing configuration (static, OSPF, etc.)  
- ACL (Access Control List) setup  
- Viewing device status (interface status, routing table, MAC address table, etc.)

中文

一款基于 Telnet 的 MCP 工具,专为 H3C 网络设备 CLI 设计,针对 H3C Comware(类 IOS)设备进行了优化。

功能特性

智能连接管理:自动激活终端、TCP 预热、自动关闭分页显示 设备模式识别:自动检测用户模式、特权模式、配置模式 智能等待机制:检测到设备提示符后立即返回,无需等待超时 长时命令优化:自动识别 ping、traceroute 等命令并延长等待时间

工具列表

telnet_connect:建立 Telnet 连接,返回会话 ID 和设备当前模式 telnet_execute:在指定会话中执行命令,返回输出结果和设备模式 telnet_list_sessions:列出所有活跃会话 telnet_disconnect:断开指定会话

安装方法


git clone https://git.youdu.xin/wxy/h3c-cli-mcp.git
cd h3c-cli-mcp
pip install .

使用方式

作为 MCP 服务器运行


h3c-cli-mcp

在 MCP 客户端中配置

将以下内容添加到 MCP 客户端配置文件中:


{
  "mcpServers": {
    "h3c-cli-mcp": {
      "command": "h3c-cli-mcp"
    }
  }
}

系统提示词

你是一个网络运维助手,可以通过 h3c-cli-mcp 工具远程操作网络设备 CLI。
该工具用于连接 H3C 或 Cisco 交换机/路由器,并执行命令行配置与查询。
使用规则:
这是一个真实网络设备控制工具,不是模拟环境。
仅在涉及网络设备操作、配置、排错、状态查询时才调用该工具。
普通知识问答、原理解释、学习类问题,不要调用工具。
设备类型:
可能是 H3C 设备(使用 system-view)
可能是 Cisco 设备(使用 configure terminal)
在执行配置前,应先判断或询问设备类型
安全规则(非常重要):
不要执行 reload、format、erase、delete flash、reset 等破坏性命令
不要修改管理口 IP、VLAN1、默认路由等可能导致断连的配置,除非用户明确确认
批量配置前应先展示命令内容给用户确认
命令执行规则:
一次任务可以发送多条连续命令
配置完成后应自动执行保存配置操作
H3C: save
Cisco: write memory
输出规范:
设备回显是原始 CLI 输出,不需要翻译
如命令执行失败,应把错误信息完整返回
不要编造设备状态
目标:
作为网络自动化助手,帮助用户完成:
VLAN 配置
接口配置
IP 地址配置
路由配置
ACL 配置
查看设备状态(接口、路由表、MAC 表等)

工具与能力

工具数量

4

资源数量

0

提示词数量

0

能力标签

网络设备管理Python本地部署CLI工具Telnet自动化运维H3C

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 4 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 需要自备会话凭据,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到会话凭据的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
H3c CLI MCP

MCP World · 本页

4stdio有1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

H3c CLI MCP 怎么安装?

公开资料给出的安装命令是 pip install .,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

H3c CLI MCP 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

H3c CLI MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

H3c CLI MCP 需要 API Key 吗?

公开资料标注的认证方式是会话凭据,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

H3c CLI MCP 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP