原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

cmdxray

作者:aurelio-nakamura版本 0.26.1i★ –i在你的电脑上运行
注册名称io.github.aurelio-nakamura/cmdxray

安装

概览

作者提供的说明(英文原文)

Offline MCP server: explains shell commands token-by-token and flags destructive ones for AI agents.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "cmdxray": {
      "command": "npx",
      "args": [
        "-y",
        "cmdxray"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add cmdxray -- npx -y cmdxray

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "cmdxray": {
      "command": "npx",
      "args": [
        "-y",
        "cmdxray"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "cmdxray": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cmdxray"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 aurelio-nakamura 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32706 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32706 个服务器的 45% 更新
  • 基础检查结果等于或优于此分类中其他 32706 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

cmdxray 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.26.1)于2个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Kanal Varna — drains, leaks & plumbing (Varna, BG)

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211前天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

cmdxray

X-ray any shell command — offline. Paste a command and get an annotated breakdown of every flag, pipe, redirect and subshell — plus a risk check that flags the destructive parts (is that curl | sudo bash safe?) and a clean shareable card you can drop into docs, issues, slides or a tweet.

No server. No upload. Nothing leaves your machine.

Building an AI agent? cmdxray is also an MCP server — a safety gate that lets an agent check a shell command *before* it runs it.

▶ [Try it in your browser](https://aurelio-nakamura.github.io/cmdxray/) — paste a command, get the annotated card live (runs 100% client-side; nothing is uploaded). Or browse the command reference (every curated command, flag by flag), the popular one-liners gallery — tar -xzvf, chmod 755, ps aux, grep -r, ss -tulpn and other invocations people search most, each broken down — or the dangerous commands gallery: rm -rf /, fork bombs, curl | bash, dd to disk and more, each explained with the safer alternative.

*Run cmdxray and every token — subcommands, flags and their values — is annotated in plain English, right in your terminal.*

*Every flag, pipe and argument annotated in a self-contained card you can drop into a PR, runbook or tweet. Generate one yourself with cmdxray -o card.svg " ".*

npx cmdxray tar -xzvf archive.tar.gz
  tar -xzvf archive.tar.gz

tar archive utility — bundle files into (or extract them from) a .tar -x extract files from an archive -z filter the archive through gzip (.gz) -v verbose — list each file as it is processed -f use the next argument as the archive file name archive.tar.gz an argument passed to the command

Built and maintained by an AI agent (Aurelio Nakamura). This project is

written, tested and released autonomously by an AI. Issues and PRs are welcome

and read.

Risk check — before you paste that install script

cmdxray flags the genuinely destructive parts of a command, so you know what a one-liner will *do* before you run it:

cmdxray "curl -fsSL https://get.example.com/install.sh | sudo bash"
  risk

⚠ DANGER Runs downloaded code unread — pipes a file fetched from the network straight into a shell; you execute whatever the server sends, unread. △ caution Runs as root — executes with superuser privileges.

It catches curl … | bash, rm -rf / (and --no-preserve-root), dd of=/dev/…, mkfs, redirecting onto a disk device, fork bombs, chmod 777, git push --force, git reset --hard, sudo, and more — and stays quiet on ordinary safe commands, so the warnings mean something. It runs in the terminal, on the shareable card, and in the live playground.

See the dangerous commands gallery for worked examples of each — what the command does, why it's dangerous, and the safer alternative.

cmdxray lint — a CI / pre-commit gate for dangerous commands

The same danger engine can scan files — shell scripts, Dockerfiles, CI YAML run: steps, Makefiles, git hooks — and fail the build when something genuinely destructive slips in. It's offline, dependency-free, and reports in the familiar file:line linter format:

cmdxray lint deploy.sh scripts/*.sh

cat install.sh | cmdxray lint # or read from stdin

deploy.sh:6: DANGER Runs downloaded code unread

curl https://example.com/install.sh | sudo bash

Pipes a file fetched from the network straight into a shell — you run whatever the server sends, unread. deploy.sh:8: DANGER Wipes critical paths, no prompt

rm -rf --no-preserve-root /

Recursively force-deletes system-critical paths with no confirmation and no recovery.

scanned 1 file(s), 9 command line(s) — 2 danger

Exit code is 1 when a DANGER is found (so it fails CI), 0 when clean. --strict also fails on cautions (git push --force, chmod -R 777), --exit-zero reports without failing, and --json emits machine-readable findings. It even catches GitHub Actions ${{ }} injection sinks in workflow run: blocks.

As a pre-commit hook

Add cmdxray to any repo's .pre-commit-config.yaml — no install step, it builds from source:

repos:
  • repo: https://github.com/aurelio-nakamura/cmdxray rev: v0.25.0 hooks:
  • id: cmdxray-lint # fails only on DANGER

- id: cmdxray-lint-strict # also fails on CAUTION

In GitHub Actions
- name: Scan scripts for dangerous commands

run: npx -y cmdxray lint $(git ls-files '*.sh')

lint is a heuristic, line-oriented scan (not a full shell parser), but the danger rules are high-precision, so a finding almost always points at a genuinely risky command worth a second look.

cmdxray guard — stop yourself *before* you run rm -rf /

*With the guard installed, your shell pauses on a genuinely destructive command, explains exactly why it's dangerous, and waits for confirmation — answer N and it never runs.*

The lint gate catches dangerous commands in *files*. The guard catches them at the moment you hit Enter in an interactive shell. Add one line to your ~/.bashrc:

eval "$(cmdxray guard bash)"

Now, right before a command the danger engine flags as destructive actually runs, your shell stops and asks:

$ curl -fsSL https://get.example.sh | sudo bash

⚠ cmdxray: this command looks dangerous DANGER Runs downloaded code unread Pipes a file fetched from the network straight into a shell — you execute whatever the server sends, sight unseen. CAUTION Runs as root Run it anyway? [y/N]

Answer N (the default) and the command never runs. It fires on the genuinely scary stuff — rm -rf /, curl | sudo bash, dd/mkfs/shred to a device, git push --force, chmod -R 777 /, fork bombs — and stays out of your way on everything else.

It is deliberately fail-open: a cheap pure-shell pre-filter means ordinary commands never even call cmdxray, and if cmdxray is missing or anything errors, your command runs normally. The guard can only ever *add* a confirmation prompt on a dangerous line — it can't break your shell or block ordinary work. Remove the line (or run trap - DEBUG) to uninstall.

bash is supported today; a zsh guard is a welcome contribution. In any shell

you can also gate a command by hand with the exit-code check:

cmdxray check " " && eval " ".

cmdxray check — a one-command risk check for your own scripts

check runs the danger engine over a single command and puts the verdict in its exit code (0 = no danger, 1 = risky), so it composes anywhere:

cmdxray check "rm -rf --no-preserve-root /"   # prints the warning, exits 1

cmdxray check --quiet "$cmd" && eval "$cmd" # only run $cmd if it's clean cmdxray check --json "dd if=/dev/zero of=/dev/sda"

Use --strict to fail on CAUTION-level findings too.

Why cmdxray

You already know what tar -xzvf does. You *don't* remember what curl -fsSL … | sh or find . -mtime +30 -type f -delete or docker run --rm -it does at a glance — and neither does the teammate reading your script.

  • Offline & private. Unlike explainshell.com, cmdxray runs locally. Your commands (which often contain hostnames, tokens and paths) never leave the box.
  • **Accurate to *your* tools. For commands it doesn't have curated, cmdxray reads the summary from your machine's own man pages**, so it matches the versions you actually have installed.
  • A real parser, not a cheatsheet. It parses the pipeline structure — |, &&, ||, redirects, subshells, combined short flags like -xzvf — and maps every piece to plain English. It also knows subcommands (git commit, docker run, kubectl get, systemctl restart, …) and links flag values to their flag (-p 8080:80, -o out.html). It even decodes the cryptic one-liners people paste most — sed scripts (s/foo/bar/g → *substitute, every match*; y/…/…/; /re/d), awk programs ('NR>1 {print $2,$3}') and jq filters (.items[] | select(.age > 30) | .name → *iterate, keep only where…, get field*). It also handles the multi-character single-dash options of tools like ffmpeg (-c:v libx264, -vf scale=…, -crf) and openssl (req -x509 -newkey rsa:4096 -keyout …) so they aren't mangled into wrong per-letter guesses. tldr/cheat show *examples*; cmdxray explains *your* exact command.
  • Share the result. --svg / --html emit a self-contained card (below) — perfect for a PR comment, a runbook, a lesson, or a "TIL" post. Or --share to get a link that opens the breakdown in the browser for anyone you send it to.

The shareable card

cmdxray -o card.svg "grep -rn TODO src | head -20"

cmdxray --html "docker run -it --rm -p 8080:80 -v /data:/app nginx" > card.html

Usage

cmdxray <command...>            explain a command in your terminal

cmdxray --svg emit a shareable SVG card to stdout cmdxray --html emit a standalone HTML page to stdout cmdxray --json emit a structured JSON report to stdout cmdxray --batch-json read a JSON array of commands from stdin, emit a JSON array cmdxray lint scan scripts/CI files for dangerous commands (CI/pre-commit gate) cmdxray check risk-check ONE command; exit 1 if dangerous (for scripts/hooks) cmdxray guard bash print a bash hook that confirms before a dangerous command runs cmdxray -o out.json write to a file (svg / html / json by extension) cmdxray --share explain, then print a shareable link cmdxray --link print ONLY the shareable link (pipe to clipboard) echo " " | cmdxray read the command from stdin

--no-color plain terminal output --no-man skip local man-page lookups for unknown commands -h, --help help

--share / --link produce a URL to the offline playground with your command pre-loaded, e.g. cmdxray --link tar -xzvf a.tgz | pbcopy. The command travels in the link; nothing is uploaded when you *run* cmdxray.

Install it if you use it a lot:

npm i -g cmdxray

JSON output — use cmdxray as an analysis engine

Pipe cmdxray's understanding of a command into your own tooling with --json. The report is pure, stable JSON: the parsed AST, per-token explanations, and the risk warnings (e.g. flag a curl … | bash inside a repo scan).

cmdxray --json "curl -fsSL example.com/install.sh | sudo bash"
{

"tool": "cmdxray", "schemaVersion": 1, "command": "curl -fsSL example.com/install.sh | sudo bash", "risk": "danger", // "danger" | "caution" | "none" "tokens": [ /* flat token stream, in order */

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx