Skip to main content
Glama
Huawei DCS MCP
by key-well

Huawei DCS Skill + MCP

独立的华为云 DCS 只读排障工具,提供 Agent Skill、轻量 Python stdio MCP 服务,以及 Cursor、Claude Code、OpenCode、Codex 的安装/卸载脚本。

这是 key-well 维护的社区项目,非华为云官方发布。复用 LTS 项目的安装和适配实现,工具绑定使用华为云官方 Python SDK,无需克隆整套上游 MCP 工程。来源与许可证见 NOTICE。

能力

华为云 Redis 实例、配置、慢日志、连接和复制状态排查,共 28 个只读查询工具。完整清单见 references/tools.md。

不提供 Redis 命令执行、key 内容读取/删除、密码修改、白名单修改、扩容、重启或新建扫描任务。

Related MCP server: redis-mcp

安装

要求 macOS/Linux、Git、Python 3.10+、uv 和至少一个受支持客户端。

git clone https://github.com/key-well/huawei-dcs-skill.git
cd huawei-dcs-skill
./install.sh --platforms codex
# 可选:cursor / claude / opencode,逗号分隔;不指定则安装所有客户端
# ./install.sh --platforms cursor,claude
# 自定义运行目录必须为绝对路径或 ~/ 开头
# ./install.sh --platforms codex --install-dir ~/tools/huawei-dcs-skill

默认运行目录:~/.local/share/huawei-dcs-skill。安装在独立 .venv 中运行,合并本服务的 MCP 项并备份已有客户端配置;不同服务分别安装,不覆盖其他 MCP 项。不会调用 sudo,也不会自动安装 uv。

客户端

Skill 目录

MCP 配置

Codex

~/.agents/skills/huawei-dcs

~/.codex/config.toml

Claude Code

~/.claude/skills/huawei-dcs

~/.claude.json

Cursor

~/.cursor/skills/huawei-dcs

~/.cursor/mcp.json

OpenCode

~/.config/opencode/skills/huawei-dcs

~/.config/opencode/opencode.json

安装后,在本地配置里将下列占位符替换为自己的值,再重启客户端。不要把真实 AK/SK 发到聊天或提交到仓库。

HUAWEI_ACCESS_KEY=REPLACE_WITH_YOUR_AK
HUAWEI_SECRET_KEY=REPLACE_WITH_YOUR_SK
HUAWEI_REGION=REPLACE_WITH_YOUR_REGION
HUAWEI_PROJECT_ID=REPLACE_WITH_YOUR_PROJECT_ID

地域/项目也可由工具调用 region / project_id 覆盖,优先级高于环境默认值。运行时要求二者完整,不自动跨项目查询。此版本不支持 STS 临时凭证。

建议使用专用、最小只读 IAM 权限;工具白名单限制不替代云端权限管理。安装脚本重复执行会重写本服务的 MCP 项为占位配置,请妥善保留自己的本地配置并重新填入,不要将配置备份提交 Git。

使用

  • 查询指定地域的 Redis 实例,按状态列出异常实例。

  • 排查实例 INSTANCE_ID 最近 30 分钟慢请求,只查已有日志和诊断结果。

  • 检查实例 INSTANCE_ID 的复制状态、分片和节点信息。

Skill 中包含服务专属的排查路线和数据边界。CES 监控或 LTS 日志跨服务关联需要分别安装相应 MCP,不会自动连接。

卸载

./uninstall.sh --platforms codex
# 自定义运行目录时传入与安装时一致的 --install-dir

仅卸载本安装拥有的配置和 Skill,恢复安装前记录的条目;仍有客户端使用时保留运行目录。先前配置备份可能含有本地凭证,请自行安全保管。

开发与验证

uv sync --frozen --extra dev
uv run pytest
uv run python scripts/generate_tools.py --check
bash -n install.sh uninstall.sh

references/operations.json 是显式工具白名单;生成脚本验证 SDK 请求类、方法和 HTTP 方式,并生成已提交的完整 inputSchema。升级依赖后运行 --write 更新目录,并审查差异。拒绝未登记操作、未知字段、缺失必填字段和类型不匹配的请求。

测试使用假客户端和临时 HOME,不需要云凭证,不会更改真实客户端配置。包含安装/卸载、参数转换、版本路由及 stdio 协议检查。离线测试通过不等于云端验收通过;首次使用仍需以自己的只读账号验证地域、权限与实际返回字段。

许可证

主体代码 MIT;保留 LTS 上游版权声明。官方操作清单衍生部分遵守 Apache-2.0,详见 NOTICE、LTS-LICENSE 和 licenses/iaas-mcp-server-LICENSE。

Available Tools

28 tools
BatchShowNodesInformationBatchShowNodesInformationB
Read-onlyIdempotent

批量查询实例节点信息(只读查询)

Inputs: limit, offset, region, project_id.

ListAvailableZonesListAvailableZonesC
Read-onlyIdempotent

查询可用区信息(只读查询)

Inputs: region, project_id.

ListBackgroundTaskListBackgroundTaskC
Read-onlyIdempotent

查询后台任务列表(只读查询)

Inputs: instance_id (required), limit, offset, region, +3 more.

ListBigkeyScanTasksListBigkeyScanTasksC
Read-onlyIdempotent

查询大key分析任务列表(只读查询)

Inputs: instance_id (required), limit, offset, region, +2 more.

ListClientsListClientsC
Read-onlyIdempotent

获取会话列表(只读查询)

Inputs: instance_id (required), addr, sort, limit, +5 more.

ListConfigHistoriesListConfigHistoriesC
Read-onlyIdempotent

查询实例参数修改记录列表(只读查询)

Inputs: instance_id (required), limit, offset, region, +1 more.

ListConfigurationsListConfigurationsC
Read-onlyIdempotent

查询实例配置参数(只读查询)

Inputs: instance_id (required), region, project_id.

ListDiagnosisTasksListDiagnosisTasksB
Read-onlyIdempotent

查询实例诊断任务列表(只读查询)

Inputs: instance_id (required), limit, offset, region, +1 more.

ListFlavorsListFlavorsC
Read-onlyIdempotent

查询产品规格(只读查询)

Inputs: engine, region, capacity, cpu_type, +5 more.

ListGroupReplicationInfoListGroupReplicationInfoC
Read-onlyIdempotent

查询分片信息(只读查询)

Inputs: instance_id (required), region, project_id.

ListHotKeyScanTasksListHotKeyScanTasksC
Read-onlyIdempotent

查询热key分析任务列表(只读查询)

Inputs: instance_id (required), limit, offset, region, +2 more.

ListInstancesListInstancesC
Read-onlyIdempotent

查询所有实例列表(只读查询)

Inputs: ip, name, tags, limit, +8 more.

ListMonitoredObjectsListMonitoredObjectsC
Read-onlyIdempotent

查询主维度信息列表(只读查询)

Inputs: dim_name (required), limit, offset, region, +1 more.

ListMonitoredObjectsOfInstanceListMonitoredObjectsOfInstanceC
Read-onlyIdempotent

查询单个主维度下子维度监控对象列表(只读查询)

Inputs: dim_name (required), instance_id (required), region, project_id.

ListRedislogListRedislogC
Read-onlyIdempotent

查询Redis运行日志列表(只读查询)

Inputs: log_type (required), instance_id (required), limit, offset, +2 more.

ListSlowlogListSlowlogC
Read-onlyIdempotent

查询慢日志(只读查询)

Inputs: end_time (required), start_time (required), instance_id (required), role, +6 more.

ShowBackgroundTaskProgressShowBackgroundTaskProgressC
Read-onlyIdempotent

查询后台任务详细信息(只读查询)

Inputs: task_id (required), instance_id (required), region, project_id.

ShowBandwidthsShowBandwidthsC
Read-onlyIdempotent

获取实例分片带宽(只读查询)

Inputs: instance_id (required), region, project_id.

ShowBigkeyScanTaskDetailsShowBigkeyScanTaskDetailsC
Read-onlyIdempotent

查询大key分析详情(只读查询)

Inputs: bigkey_id (required), instance_id (required), region, project_id.

ShowConfigHistoryDetailShowConfigHistoryDetailC
Read-onlyIdempotent

查询实例参数修改记录详情(只读查询)

Inputs: history_id (required), instance_id (required), region, project_id.

ShowDiagnosisTaskDetailsShowDiagnosisTaskDetailsC
Read-onlyIdempotent

查询指定诊断报告(只读查询)

Inputs: report_id (required), region, project_id.

ShowHotkeyTaskDetailsShowHotkeyTaskDetailsC
Read-onlyIdempotent

查询热key分析详情(只读查询)

Inputs: hotkey_id (required), instance_id (required), region, project_id.

ShowInstanceShowInstanceC
Read-onlyIdempotent

查询指定实例(只读查询)

Inputs: instance_id (required), region, project_id.

ShowInstanceTopologyShowInstanceTopologyC
Read-onlyIdempotent

查询集群实例拓扑关系图(只读查询)

Inputs: instance_id (required), region, project_id.

ShowInstanceVersionShowInstanceVersionB
Read-onlyIdempotent

根据实例ID获取实例内核版本信息(只读查询)

Inputs: instance_id (required), region, project_id.

ShowIpWhitelistShowIpWhitelistB
Read-onlyIdempotent

查询指定实例的IP白名单(只读查询)

Inputs: instance_id (required), region, project_id.

ShowNodesInformationShowNodesInformationC
Read-onlyIdempotent

查询实例节点信息(只读查询)

Inputs: instance_id (required), region, project_id.

ShowReplicationStatesShowReplicationStatesC
Read-onlyIdempotent

获取副本状态(只读查询)

Inputs: group_id (required), instance_id (required), region, project_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 28 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions: instance listing vs. detail, config parameters vs. config history, and diagnosis vs. hotkey/bigkey analysis are separated. A few pairs are close enough to require care, such as ShowNodesInformation vs. BatchShowNodesInformation, ListMonitoredObjects vs. ListMonitoredObjectsOfInstance, and ListConfigurations vs. ListConfigHistories, but the descriptions distinguish them.

    Naming Consistency5/5

    The names follow a consistent PascalCase verb-noun convention throughout, using List/Show/BatchShow prefixes with descriptive resource nouns. The List vs. Show distinction is applied consistently across collections and individual resources.

    Tool Count2/5

    At 28 tools, the surface is heavy for a server whose tools are all read-only query operations. Many tools form narrow pairs around diagnostics, hotkeys, bigkeys, nodes, and config history, which could likely be consolidated.

    Completeness2/5

    The server covers a broad read-only observability surface, but it has no create, update, delete, restart, backup, scaling, or whitelist modification operations. For a DCS instance management domain, this is a significant lifecycle gap that would block common agent workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI to safely view and operate Redis databases with read-only mode by default and support for key operations.
      11
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables exploring and diagnosing a Redis instance from MCP clients with read-only safety, using SCAN instead of KEYS for safe key enumeration.
      7
      877 npm
      2
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Read-only Redis MCP server with a configurable command allowlist for safe production diagnostics, enabling exact read-only subcommands like CLIENT LIST and SLOWLOG GET.
      5
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables safe, read-only interaction with Redis databases via cursor-based tools for retrieving keys, hashes, lists, sets, and sorted sets, backed by ACL DRYRUN-verified privilege checks.
      13
      MIT