Provides read-only Git repository operations including status, diff, show, and log commands for safely inspecting version control information.
Exposes safe, read-only Unix/Linux command-line tools for file system navigation, text processing, searching, and system information retrieval without destructive operations.
Provides macOS-specific system information tools and BSD-compatible Unix utilities for safely inspecting macOS environments.
Enables YAML querying and manipulation through the yq command-line tool for processing and filtering YAML data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Safe Unix MCPshow me the last 10 lines of the application log file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
safe-unix-mcp
A stdio MCP server that exposes read-only Unix-like tools to AI agents (Crush).
Transport: stdio (MCP).
Host: any MCP client (e.g., Crush).
OS: Linux/macOS (BSD/GNU differences are handled conservatively).
Why
POSIX
findincludes-exec/-okwhich execute commands; we forbid them.GNU/BSD
find -deleteis destructive; also forbidden.Many coreutils have dangerous flags (e.g.,
sed -i); we block them.
References:
MCP transports & specification.
POSIX Shell & Utilities (Open Group).
GNU Coreutils manual.
Installation
Clone the repository
Install globally
This makes the mcp-safe-unix command available system-wide.
Quick Setup for Crush
After installing globally, run the setup utility to automatically configure your Crush config:
This interactive script will:
Create
~/.crush.jsonif it doesn't existAdd the safe-unix MCP server configuration
Detect and optionally remove potentially unsafe Unix/shell servers
Update existing safe-unix configuration if already present
Options:
Manual Setup
If you prefer manual configuration, add the following to your ~/.crush.json:
Verify installation
Usage with Crush
Automatic Setup (Recommended)
Use the setup utility after installation:
Manual Configuration
Add to your ~/.crush.json configuration file:
If you prefer not to install globally, you can specify the full path to the script:
Or use npx:
Available Tools
The server exposes the following safe, read-only Unix tools:
Directory & file listing:
safe_ls,safe_pwd,safe_stat,safe_fileView/paging:
safe_cat,safe_head,safe_tail,safe_less,safe_moreSearch & filtering:
safe_grep,safe_awk,safe_sedText transforms:
safe_cut,safe_paste,safe_tr,safe_sort,safe_uniq,safe_fmt,safe_fold,safe_columnCounting/checksums:
safe_wc,safe_cksum,safe_shaArchive inspection:
safe_tar_list,safe_zipinfo,safe_unzip_listFS usage:
safe_du,safe_dfProcess & env:
safe_env,safe_id,safe_uname,safe_date,safe_ps,safe_uptimeSafe find:
safe_find(without-exec,-ok,-delete)Git (read-only):
safe_git(status, diff, show, log, etc.)JSON/YAML:
safe_jq,safe_yqHex/encoding:
safe_hexdump,safe_xxd,safe_odTrees:
safe_treemacOS:
safe_sw_vers