Hitachi raidcom command builder (Community)

io.github.visubramaniam由 GitHub 账号 visubramaniam 发布v0.1.8更新于 Oct 30, 2026

Builds and checks Hitachi raidcom commands and scripts. Build-only: never contacts a storage system.

概览

AI 生成的概览

根据自然语言请求生成并校验 Hitachi raidcom(CCI)命令与 shell 脚本,全程不连接存储系统。

可以做什么
  • 查找与解释命令:用日常用语检索 raidcom 命令目录,并获取单条命令的语法、选项、支持机型与示例
  • 构建与检查命令:把结构化参数生成并校验为命令行,或解析粘贴的命令行并报告问题
  • 构建脚本:用 foreach 或 zip 按范围展开步骤,附加状态检查与可选的资源组锁定
  • 使用现成配方:列出并生成配置、池、卷变更、命令设备和清单等常用作业脚本
  • 查询机型限制:按 VSP 机型给出 LDEV、LUN、池、序列号和端口号的合法范围
适用场景
适合在起草 Hitachi VSP 存储操作时获得正确的 raidcom 语法、经过校验的 ID 与端口,或一份可审阅的脚本,而不是手写命令。也适合编写 runbook,以及在有人于装有 CCI 的主机上执行前检查粘贴的命令。
运行要求
以 npm 包 raidcom-mcp 通过 npx 在本地运行,需要 Node.js 22.19 或更高版本;仅生成命令时无需访问存储系统或安装 CCI。可选的 HTTP 模式使用 RAIDCOM_TRANSPORT,除非对所有人开放,否则需要至少 32 个字符的 bearer 令牌 RAIDCOM_HTTP_TOKEN。
安装前请注意
仅生成文本:产出的命令需由人审阅并在别处执行,错误只有在有人运行脚本时才会作用到阵列。变更类命令应在 raidcom lock resource 下运行,最好先用 -checkmode precheck。脚本可加入登录行,从 shell 读取 RAIDCOM_USER 和 RAIDCOM_PASSWORD。若以 HTTP 方式在不设 RAIDCOM_HTTP_TOKEN(RAIDCOM_HTTP_OPEN)的情况下提供服务,任何能访问该端口的人都能使用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hitachi raidcom command builder (Community),将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

raidcom-mcp: build Hitachi raidcom commands from plain-language requests

[npm] [Release] [CI]

[Hitachi raidcom command builder (Community) MCP server]

A community MCP server that turns a request such as "present four 100 GB volumes from pool 0 to host esx01 on CL1-A and CL2-A" into validated raidcom commands. It is build-only: it never connects to a storage system, never runs a command and holds no credentials. It returns command text (or a shell script) for a person to review and run on a host with CCI installed. That makes it safe to host online for anyone to use.

It is an independent project, not an official Hitachi Vantara product.

What it does

  • Finds the right command. raidcom_list_commands ranks the 178 commands in the catalogue against a question (BM25 with synonyms and verb intent) and says how confident it is.
  • Builds one command. raidcom_build_command takes a command name and options as structured data, checks them against the manual's syntax and the storage model's limits, and returns the command line.
  • Builds many. raidcom_build_script repeats steps over ranges (foreach, zip), adds get command_status after asynchronous commands, optionally locks the resource group, and returns a script that stops at the first failure.
  • Ready-made workflows. raidcom_list_recipes and raidcom_build_recipe cover 14 common jobs: FC, iSCSI and NVMe/TCP provisioning, DP pools, mainframe (3390) pools, extending and deleting volumes, command devices, zero-page reclaim, inventory, copy groups.
  • Checks an existing command. raidcom_check_command parses a pasted command line (never executing it; shell operators are refused) and reports every problem.
  • Knows the model limits. raidcom_model_limits gives the LDEV, LUN, pool, serial and port ranges of VSP One Block 24/26/28, VSP 5000 series and VSP E series.

All eight tools are marked read-only. There is no tool that executes anything.

Use the hosted server

A public instance runs at https://raidcom-mcp.onrender.com/mcp. It needs no sign-in.

  • Claude (desktop or web): Settings → Connectors → Add custom connector, paste the URL, leave the advanced (OAuth) settings empty.
  • Claude Code: claude mcp add --transport http raidcom https://raidcom-mcp.onrender.com/mcp
  • Microsoft 365 Copilot (Copilot Studio): your agent → Tools → Add a tool → New tool → Model Context Protocol; paste the URL, authentication None.
  • GitHub Copilot (VS Code): add { "servers": { "raidcom": { "type": "http", "url": "https://raidcom-mcp.onrender.com/mcp" } } } to .vscode/mcp.json, then use Copilot Chat in Agent mode.

To run it yourself instead, see Setup.

How the catalogue is made

spec/raidcom-catalog.json is generated by scripts/generate-catalog.mjs from the text of the Command Control Interface Command Reference (MK-90RD7009). For every command it keeps the name, supported models, a one-line summary, each syntax form (as a small grammar), each option's value shape and a short description, and the command lines of the manual's examples. Hitachi's prose, tables and output samples are not copied. The manuals themselves are not part of this repository; to regenerate the catalogue with your own copy:

pdftotext -layout CCI_Command_Reference.pdf cci-reference.txtnpm run generate-catalog -- cci-reference.txt

tests/unit/catalog.test.mjs replays every example in the manual through the parser and validator (about 96% pass; the rest are places where the manual's syntax line and its examples disagree).

Validation

  • Unknown options, wrong number of values, values outside an option's allowed words, and missing required options (checked against the syntax grammar) are errors with a suggested fix.
  • LDEV IDs, LUN IDs, pool IDs, serial numbers and port names (CL1-A, CL3-B-12) are checked against the model you give, or the widest range of any model.
  • Values that a shell could misread (; | & $ \ > < ' "and so on) are refused, values containing spaces or#are quoted, and values starting with- are refused so they can't add options. Global options (instance, pair_type, serial`, ...) are checked before anything is written. See SECURITY.md.
  • LDEV IDs can be decimal, 0x hex or mainframe CU:LDEV (dd:0f); recipes and scripts expand ranges such as 100-109 and dd:00-dd:0f.
  • Because the manual's syntax lines are occasionally incomplete, strict: false turns missing option errors into warnings. Unknown options and out-of-range values stay errors.
  • Out of scope: the pair* commands (paircreate, pairdisplay, ...) from the Quick Reference, and raidcom -login/-logout lines as commands of their own (scripts can add them with login: true, reading $RAIDCOM_USER and $RAIDCOM_PASSWORD from the shell).

Setup

You need Node.js 22.19 or later. The server is on npm, so most clients can start it with npx:

Claude Code

claude mcp add raidcom -- npx -y raidcom-mcp

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "raidcom": { "command": "npx", "args": ["-y", "raidcom-mcp"] }  }}

From source

git clone https://github.com/visubramaniam/raidcom-mcp.gitcd raidcom-mcpnpm cinpm run build

Then use node /path/to/raidcom-mcp/dist/index.js as the command in the examples above.

Claude Desktop, standalone packages

Each release has a Claude Desktop extension (.mcpb), standalone packages for macOS, Linux and Windows with Node.js bundled, the npm package, and a skill zip. See INSTALL.md.

Claude Code plugin

/plugin install raidcom-community --marketplace visubramaniam/raidcom-mcp

See README.plugin.md.

Hosted over HTTP

RAIDCOM_TRANSPORT=http RAIDCOM_HTTP_HOST=0.0.0.0 RAIDCOM_HTTP_TOKEN=$(openssl rand -hex 32) \RAIDCOM_HTTP_BEHIND_TLS_PROXY=true RAIDCOM_HTTP_ALLOWED_HOSTS=raidcom.example.com node dist/index.js

The endpoint is /mcp (stateless Streamable HTTP). /healthz reports the version and, behind a proxy, the address the server takes as the caller's, to check the proxy settings.

Clients that add servers as connectors (Claude, Microsoft 365 Copilot) can't send a fixed bearer token: they connect without authentication or through OAuth, which this server doesn't implement. For them, run without a token and with RAIDCOM_HTTP_OPEN=true, as the public instance does. Behind Cloudflare (Render, for example), set RAIDCOM_HTTP_CLIENT_IP_HEADER=cf-connecting-ip so the rate limits apply per user. See INSTALL.md and README.docker.md.

Configuration

VariableDefaultMeaning
RAIDCOM_TRANSPORTstdiostdio or http
RAIDCOM_HTTP_HOST127.0.0.1Address to listen on
RAIDCOM_HTTP_PORT8361Port (0 picks a free one)
RAIDCOM_HTTP_TOKENnoneBearer token, at least 32 characters. Required unless RAIDCOM_HTTP_OPEN=true
RAIDCOM_HTTP_OPENfalseServe anyone who can reach the port, without a token
RAIDCOM_HTTP_TLS_CERT, RAIDCOM_HTTP_TLS_KEYnonePEM files; the server then speaks HTTPS
RAIDCOM_HTTP_BEHIND_TLS_PROXYfalseA proxy or load balancer ends TLS. Needed for non-loopback addresses without TLS
RAIDCOM_HTTP_ALLOWED_HOSTSnoneExtra Host values to accept (* for any)
RAIDCOM_HTTP_ALLOWED_ORIGINSnoneOrigin values to accept (* for any)
RAIDCOM_HTTP_RATE_LIMIT120Requests per minute per client (0 for none)
RAIDCOM_HTTP_CLIENT_IP_HEADERnoneA header your proxy sets to the client's address, e.g. cf-connecting-ip behind Cloudflare (Render uses Cloudflare). Takes precedence over X-Forwarded-For
RAIDCOM_HTTP_DEBUG_CLIENTtrue/healthz also shows the forwarding headers it received (the caller's own request), to choose the two settings above. Set to false to turn it off
RAIDCOM_HTTP_TRUST_PROXYfalseTake the client address from X-Forwarded-For: true for one proxy in front, or the number of proxies (see INSTALL.md)
MCPRUSH_TOKENnoneToken issued by the mcprush marketplace. Adds a second endpoint (below) that answers only requests carrying it in x-mcprush-token; /mcp is unchanged
RAIDCOM_HTTP_MCPRUSH_PATH/mcprushPath of that endpoint
RAIDCOM_CATALOG, RAIDCOM_LIMITS, RAIDCOM_RECIPES, RAIDCOM_EXAMPLESbundledUse another spec file (an empty RAIDCOM_EXAMPLES turns the example questions off)

Values are trimmed, and true/false settings accept any case; any other value for them stops the server with a message. At startup the server warns about RAIDCOM_ variables it doesn't recognise (a misspelt name, or one with a stray space), and over HTTP logs one line with its effective settings.

Tests

npm test

runs the unit tests (tests/unit) and the search evaluation (tests/search-eval.mjs: 40 tuning and 30 held-out requests, each with a minimum top-1 and top-3 score that may only go up, and a check that results rated high-confidence are right at least 85% of the time). npm run package builds the release packages and npm run smoke tests the npm package as installed.

Documentation

The wiki has a quick start, deployment guide, tools and recipe reference, troubleshooting and more.

Contributing

See CONTRIBUTING.md. Security problems: SECURITY.md. Privacy: PRIVACY.md.

License

MIT, see LICENSE. "Hitachi", "raidcom" and "VSP" are trademarks of their owners; this project is not affiliated with or endorsed by Hitachi.

来源:README.md,提交 80eba41

工具

8

raidcom_list_commands

Find raidcom commands

Find raidcom commands. Use this first when you do not know the exact command name. With no arguments, lists every object (ldev, lun, host_grp, pool, ...) with the actions available on it. With `query` (plain words, e.g. "map a volume to a host group", "grow a pool", "show free ldev ids"), ranks matching commands and rates the confidence of the top result. With `action` and/or `object`, lists exactly those commands. Then call raidcom_describe_command, or raidcom_build_command if you already know the options.

输入参数limitqueryactionobject

raidcom_describe_command

Describe a raidcom command

Everything needed to build one raidcom command: what it does, which models support it, whether it is read-only, destructive or asynchronous, each syntax form, every option with the number and kind of values it takes (and the words it accepts, where it accepts only a few), and examples. Call it before raidcom_build_command when you are unsure which options a command needs or which of its syntax forms fits the request.

输入参数optioncommand必填

raidcom_build_command

Build a raidcom command

Build one raidcom command from structured arguments and validate it. Nothing is executed and no storage system is contacted: you get command text to review and run elsewhere. Unknown options, wrong value counts, missing required options, bad port names and out-of-range LDEV, LUN, pool and serial numbers are reported as errors with a fix. Example: {"command": "add ldev", "options": {"-pool": 0, "-ldev_id": 256, "-capacity": "100G"}, "model": "vsp-one-b28", "global": {"instance": 0}} → `raidcom add ldev -pool 0 -ldev_id 256 -capacity 100G -I0`. For many similar commands use raidcom_build_script, not repeated calls. When the user asks for a command, show them the `command` from the result.

输入参数modelglobalstrictcommand必填options

raidcom_check_command

Check a raidcom command line

Validate and explain a raidcom command line the user already has (for example one pasted from a runbook). It is parsed, not executed: shell operators such as ; | & > are refused. Returns the normalised command, what each option means, and every problem found. Credentials after -login are dropped.

输入参数modelstrictcommand_line必填

raidcom_build_script

Build a raidcom script

Build a shell script of raidcom commands from steps. Each step is a command with options, optionally repeated with `foreach` (every combination) or `zip` (values advance together), so "create LDEVs 100 to 109 in pool 0, then map each to port CL1-A" is two steps. Every expanded command is validated; the script is returned only if all of them are valid, otherwise you get the errors per step. The script checks each command's exit status, adds `raidcom get command_status` after asynchronous commands, and can lock the resource group and log in (credentials are read from RAIDCOM_USER and RAIDCOM_PASSWORD in the user's shell, never written into the script). Nothing is executed.

输入参数loginmodelsteps必填globalstrictdescriptionlock_resource

raidcom_list_recipes

List raidcom recipes

Ready-made workflows: provision volumes to an FC, iSCSI or NVMe/TCP host, create or grow a pool, create a mainframe (3390) pool, extend or delete volumes, create a command device, reclaim zero pages, read-only inventory, copy groups. With no arguments lists them. With `recipe`, shows its parameters and steps. With `query`, ranks recipes by keyword. Use raidcom_build_recipe to turn one into a script.

输入参数queryrecipe

raidcom_build_recipe

Build a raidcom recipe script

Build the script for a recipe from its parameters (see raidcom_list_recipes). Lists such as ldev_ids accept ranges: ["100-109"]. Example: recipe provision-fc-volumes with {"pool": 0, "ldev_ids": ["100-103"], "capacity": "100G", "ports": ["CL1-A", "CL2-A"], "host_grp": "esx01", "host_mode": "VMWARE_EX", "wwns": ["210000e08b0256f8"]}. Returns the script and the individual commands. Nothing is executed.

输入参数loginmodelglobalparams必填recipe必填strictlock_resource

raidcom_model_limits

Show storage model limits

Valid parameter ranges for a storage model (serial number, LDEV ID, pool ID, LU number, port names), taken from the Command Reference appendices. Without `model`, lists the models.

输入参数model

版本历史

1
  1. v0.1.8最新Oct 29, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分