h3c-hcl-mcp
Enables AI agents to interact with local H3C Cloud Lab network simulation environments, allowing discovery of projects, devices, and links, as well as execution of Comware CLI commands.
README
HCL-Lab MCP Server
h3c-hcl-mcp is an open-source MCP (Model Context Protocol) Server that enables AI agents — including Claude Desktop, Claude Code, Cursor, ChatGPT MCP Client, Cline, Roo Code, and other MCP-compatible clients — to interact with local H3C Cloud Lab (HCL) network simulation environments.
⚠️ Important: This project is a community interoperability tool. It is not affiliated with, endorsed by, or sponsored by H3C. You must legally install HCL yourself; this repository does not contain, distribute, or download any HCL executables, images, or documentation.
What It Does
- Discover HCL projects, devices, and links on your local machine
- Connect to running H3C/Comware devices through HCL loopback Telnet console or SSH
- Execute controlled Comware CLI commands (
display, diagnostics) - Retrieve device facts, interfaces, configurations, and topology data
- Analyze lab topologies and assist with network experiments
- (Future) Provision configuration changes with plan → diff → approval → apply workflow
Quick Start
Prerequisites
- Windows with H3C Cloud Lab 5.10.x installed
- Python 3.12+
- uv (recommended) or pip
Installation
# Via uvx (recommended — no explicit install needed)
uvx h3c-hcl-mcp
# Or via pip
pip install h3c-hcl-mcp
h3c-hcl-mcp
MCP Client Configuration
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"h3c-hcl": {
"command": "uvx",
"args": [
"--from", "h3c-hcl-mcp==0.1.0",
"h3c-hcl-mcp",
"--config", "C:\\Users\\YOUR_NAME\\.config\\h3c-hcl-mcp\\config.yaml"
]
}
}
}
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"h3c-hcl": {
"command": "uvx",
"args": [
"--from", "h3c-hcl-mcp==0.1.0",
"h3c-hcl-mcp",
"--config", "C:\\Users\\YOUR_NAME\\.config\\h3c-hcl-mcp\\config.yaml"
]
}
}
}
Current Status
| Version | Stage | Description |
|---|---|---|
v0.0.1 |
Bootstrap | Repository governance, package skeleton, CI, ADR |
v0.1.0 |
Planned | Read-only MVP — HCL project discovery, console Telnet, device facts |
v1.0.0 |
Target | Stable API, full test coverage, multi-client verified |
Current version: v0.0.1 (pre-alpha) — development has just started. See docs/design.md for the full architecture.
Architecture
Any MCP Client (Claude, Cursor, ChatGPT, …)
│
MCP Protocol (stdio / Streamable HTTP)
│
HCL-Lab MCP Server
│
┌────┴────┐
│ │
HCL Layer Comware Layer
│ │
Topology CLI over
Discovery Telnet/SSH
The codebase follows Hexagonal Architecture with strict dependency direction:
mcp → application → ports ← adapters/infrastructure
domain
See docs/design.md for module boundaries, port interfaces, and tool schemas.
MCP Tools (v0.1)
| Tool | Status | Description |
|---|---|---|
server_health |
✅ Ready | Server version, config status, health checks |
hcl_list_projects |
✅ Ready | List local HCL projects |
hcl_get_topology |
✅ Ready | Devices, interfaces, links |
hcl_get_runtime |
✅ Ready | HCL process status, device runtime, console availability |
h3c_list_devices |
✅ Ready | Operable devices with transport capabilities |
h3c_get_facts |
✅ Ready | sysname, Comware version, uptime, model |
h3c_run_display |
✅ Ready | Execute whitelisted display commands |
h3c_get_config |
✅ Ready | Running/startup/snapshot config (redacted) |
h3c_get_interfaces |
Interface status, speed, description, addresses | |
h3c_ping |
Network reachability test | |
h3c_trace_route |
Path tracing | |
h3c_diff_config |
Config diff without writing to device |
Security
- Default: read-only. Write operations require explicit opt-in, plan approval, and audit.
- All device output is treated as untrusted data.
- Passwords are never logged or stored in plaintext.
- Commands go through whitelist validation — no shell injection, no
eval. - Only connects to
127.0.0.1for HCL console; no LAN scanning.
See SECURITY.md for the full security model.
Development
# Clone
git clone https://github.com/FlySun1116/HCL-Lab_mcp.git
cd HCL-Lab_mcp
# Create venv and install dev dependencies
uv sync --extra dev
# Lint & typecheck
uv run ruff check .
uv run ruff format --check .
uv run mypy src/
# Run tests
uv run pytest
# Build
uv build
# Run MCP Inspector
npx @modelcontextprotocol/inspector uv run h3c-hcl-mcp
See CONTRIBUTING.md for guidelines.
License
Apache-2.0. See LICENSE and NOTICE for details.
Disclaimer
This is a community interoperability project. H3C, HCL, Comware, and related trademarks are the property of their respective owners. Users must comply with HCL's license terms and install HCL legally. This repository does not include, redistribute, or reverse-engineer any HCL proprietary software.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。