shutil-mcp
v1.0.0MCP server for asynchronous shell utilities using aioshutil
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
make_archive
Create an archive file (zip, tar, etc.) with overwrite protection. Args: base_name: Name of the file to create (including path) format: Archive format (e.g., 'zip', 'tar', 'gztar') root_dir: Directory that will be the root of the archive (default: current) base_dir: Directory from which archiving starts (default: current) overwrite: Whether to overwrite existing archive file (default: True)
| Parameter | Type | Description |
|---|---|---|
base_name * | string | |
format * | string | |
base_dir | ||
overwrite | boolean | |
root_dir |
unpack_archive
Unpack an archive file with zip-slip safety inspection and overwrite protection. Args: filename: Path to the archive extract_dir: Directory to extract into (default: current) format: Archive format (optional) overwrite: Whether to overwrite existing files (default: True)
| Parameter | Type | Description |
|---|---|---|
filename * | string | |
extract_dir | ||
format | ||
overwrite | boolean |
get_archive_formats
Get a list of supported archive formats.
cp
Copy files or directories recursively with verification. Supports size verification and overwrite protection. Args: src: Source path dst: Destination path follow_symlinks: Whether to follow symlinks (default: True) overwrite: Whether to overwrite existing destination files (default: True)
| Parameter | Type | Description |
|---|---|---|
dst * | string | |
src * | string | |
follow_symlinks | boolean | |
overwrite | boolean |
mv
Move or rename files or directories with fault tolerance. Destination is verified before deleting origin. If any error occurs during move, the original source file remains preserved intact. Args: src: Source path dst: Destination path overwrite: Whether to overwrite existing destination files (default: True)
| Parameter | Type | Description |
|---|---|---|
dst * | string | |
src * | string | |
overwrite | boolean |
rm
Remove a file or directory by moving it to the trash (soft-delete). rm NEVER permanently deletes anything. The target is moved into a .trash folder so it can be recovered later with the restore tool. The JSON response reports the current trash size, what share of total storage it occupies, and the contents of the trash (original path + deletion timestamp). To permanently purge the trash, use the empty_trash tool -- but only after the user has explicitly confirmed. Args: path: Path to remove (soft-deleted into trash)
| Parameter | Type | Description |
|---|---|---|
path * | string |
restore
Restore a file or directory from the trash folder. By default the item is restored to its original path (recorded when it was trashed). Provide ``dst`` to restore to a different location. Args: trash_path: Path to the trashed item dst: Destination path to restore to (default: original path from trash metadata) overwrite: Whether to overwrite an existing destination (default: False)
| Parameter | Type | Description |
|---|---|---|
trash_path * | string | |
dst | ||
overwrite | boolean |
empty_trash
Permanently delete everything in the trash folder. WARNING: This is the ONLY operation that permanently destroys data. It irreversibly removes all trashed items. Only call this after the user has explicitly confirmed they want to purge the trash. Args: path: Any path inside the jail; its trash folder (.trash) is emptied (default: current directory).
| Parameter | Type | Description |
|---|---|---|
path | string |
gc_trash
Garbage-collect trash entries older than max_age_seconds. Scans all .trash directories inside the jail (or the default .trash location when no jail is set) and permanently deletes entries whose timestamp prefix is older than max_age_seconds. Args: max_age_seconds: Maximum age in seconds before deletion (default: 86400 = 24 h).
| Parameter | Type | Description |
|---|---|---|
max_age_seconds | integer |
chmod
Change file or directory permissions with automatic rollback on failure. If the operation fails, permissions stay intact or rollback to the original state. The response JSON includes 'previous_mode' to enable immediate 1-step undo. Args: path: Path to modify mode: Numeric mode (e.g., 0o755, 493, "755", "0755", "0o755")
| Parameter | Type | Description |
|---|---|---|
mode * | ||
path * | string |
chown
Change file or directory ownership with automatic rollback on failure. If the operation fails, ownership stays intact or rolls back to previous user and group. The response JSON includes 'previous_user' and 'previous_group' to enable immediate 1-step undo. Args: path: Path to modify user: Username or numeric UID (default: None) group: Group name or numeric GID (default: None)
| Parameter | Type | Description |
|---|---|---|
path * | string | |
group | ||
user |
which
Find the path to an executable. Args: cmd: Executable name path: Search path (default: None, uses system PATH)
| Parameter | Type | Description |
|---|---|---|
cmd * | string | |
path |
mkdir
Create a directory. Args: path: Directory path to create parents: Create parent directories if they don't exist (default: True)
| Parameter | Type | Description |
|---|---|---|
path * | string | |
parents | boolean |
touch
Create an empty file or update file timestamps. Args: path: File path to create or update
| Parameter | Type | Description |
|---|---|---|
path * | string |
cat
Read file content, optionally limited to a specific line range. Args: path: File path to read start_line: First line to include (1-based, inclusive). None for start of file. end_line: Last line to include (1-based, inclusive). None for end of file.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
end_line | ||
start_line |
ls
List directory contents with detailed metadata. Args: path: Directory path to list (default: ".")
| Parameter | Type | Description |
|---|---|---|
path | string |
disk_usage
Get disk usage statistics for a path. Args: path: Path to check disk usage for (default: ".")
| Parameter | Type | Description |
|---|---|---|
path | string |
stat
Get detailed file or directory metadata. Args: path: Path to the file or directory
| Parameter | Type | Description |
|---|---|---|
path * | string |
glob
Find files matching glob patterns. Args: pattern: Glob pattern (e.g., '**/*.py', '*.txt', 'src/**/*.ts') path: Root directory to search from (default: '.')
| Parameter | Type | Description |
|---|---|---|
pattern * | string | |
path | string |
grep
Search file contents using regex patterns. Args: pattern: Regex pattern to search for path: File or directory to search in (default: '.') include: Optional file glob pattern to filter (e.g., '*.py') case_sensitive: Whether search is case-sensitive (default: True) max_results: Maximum number of matches to return (default: 100)
| Parameter | Type | Description |
|---|---|---|
pattern * | string | |
case_sensitive | boolean | |
include | ||
max_results | integer | |
path | string |
tree
Get a recursive directory tree as nested JSON. Args: path: Root directory to start from (default: '.') max_depth: Maximum depth to traverse (default: None = unlimited)
| Parameter | Type | Description |
|---|---|---|
max_depth | ||
path | string |