MCP

Scan a local directory with smart-tree before opening MCP

On Linux/macOS/WSL, after the official install.sh, run st --version first, then st --security-scan . to see attack patterns; st --cleanup deletes suspicious integrations, so do not use it as the first call.

Official source · smart-tree

Install

curl -sSL https://raw.githubusercontent.com/8b-is/smart-tree/main/scripts/install.sh | bash

Who it's for

For people who want a fast look at a local directory tree and are willing to use the same binary for security scanning and an MCP service. Official copy says Smart Tree is a blazingly fast, AI-friendly directory visualization tool, 10-24x faster than classic tree, built in Rust, with a Security Scanner and 30+ MCP tools.

This fits if you can run the official install script on Linux, macOS, or WSL, and the first time you only want to confirm a successful install, plus at most one read-only scan. Do not make the first try a cleanup delete.

If you cannot accept this program reading files in the current workspace, do not run a scan. Official page: https://github.com/8b-is/smart-tree

First try in 3 minutes

Use only this install: curl -sSL https://raw.githubusercontent.com/8b-is/smart-tree/main/scripts/install.sh | bash . This is the Linux/macOS/WSL one line install. Do not treat other installers as the main path.

Prerequisite: you can run curl and bash, and you accept that the script changes this machine's PATH and binaries. After install, first run st --version for Verify installation. Only continue after you see a version output.

One low-risk call: st --security-scan . Official description is Scan codebase for attack patterns, and it names IPFS injection and fake verification. This reads the current directory; the page does not say it deletes files. Do not add undocumented parameters.

Success signal: the command finishes and prints scan result text. Official docs do not list result fields; if you do not see a class of alert, record only that the page did not document it.

A read-only scan is not zero risk. It reads local code. Official docs do not claim no network, no local reads, or no privacy boundary.

Use cases

Case 1: Scan the current directory for attack patterns. After install and a passing st --version, run st --security-scan . at the target repo root. Read the output only against attack patterns already written on the page; do not invent rule names.

Case 2: Start an MCP Server from the interactive menu. Official menu item 6 is MCP Server, described as Model Context Protocol (stdio). The same table also has HTTP Daemon and Custom Command. The page does not write the command that opens that menu, so do not invent start flags; only confirm that the stdio item exists. 30+ MCP tools also lack individual tool names; do not invent calls.

Limits

After install, st --cleanup will Scan and remove malicious MCP servers, hooks, and hidden directories; that is a delete action. There is also st --cleanup -y, which is Non-interactive cleanup (auto-confirm). Do not use either on the first try. If you use them later, first confirm what will be removed, and know the page gives no undo path.

Official copy also mentions Security Scanner, Aye Consciousness, and Spicy TUI, but writes no matching commands or flags; if they are missing, do not invent them. Directory visualization itself reads the filesystem; when you use it as an MCP service, it likewise exposes this machine's directory context.