Skip to main content
Glama
cwt

shutil-mcp

by cwt

shutil-mcp

An MCP server providing asynchronous shell utilities using aioshutil.

This project offers a set of file system tools designed for AI agents, returning structured JSON output instead of raw text. This allows for more precise and direct consumption of file system data by AI models.

Features

  • Asynchronous Operations: Leverages aioshutil and thread executors for non-blocking file system tasks.

  • JSON Output: All tools return minified JSON, optimized for AI agents.

  • Jail Support: Restrict file system access to a specific directory tree for security.

  • Verification & Integrity: mv and cp verify destination data before unlinking or finalizing, preventing data loss on partial failures.

  • Reversible Mutations & Undo: chmod and chown return previous modes and ownership to facilitate immediate undo/redo, with automatic rollback on failure.

  • Soft-Deletion & Recovery: rm supports trash=True soft-deletion with a matching restore tool.

  • Zip-Slip Protection: unpack_archive validates all archive member paths against directory traversal / zip-slip attacks.

  • Detailed Metadata: Tools like ls and stat provide comprehensive information (size, mtime, mode, owner, etc.).

  • HTTP Transport Support: Includes built-in support for SSE and Streamable HTTP transports.

Related MCP server: File Manager MCP Server

Available Tools

  • ls: List directory contents with detailed metadata.

  • cp: Copy files or directories recursively with verification.

  • mv: Move/rename files or directories with safe pre-removal verification.

  • rm: Remove files or directories (supports trash=True soft-deletion).

  • restore: Restore files or directories from trash.

  • chmod: Change file/directory permissions with rollback and previous mode.

  • chown: Change file/directory ownership with rollback and previous owner.

  • disk_usage: Get disk usage statistics for a path.

  • which: Find the path to an executable.

  • cat: Read file content, optionally limited to a specific line range.

  • glob: Find files matching glob patterns.

  • grep: Search file contents using regex patterns.

  • tree: Get a recursive directory tree as nested JSON.

  • make_archive: Create archive files (zip, tar, etc.) with overwrite guards.

  • unpack_archive: Unpack archive files safely with zip-slip protection.

  • get_archive_formats: List supported archive formats.

Installation

pip install shutil-mcp

Usage

Run with stdio transport

shutil-mcp --transport stdio

Run with jail restriction

shutil-mcp --transport stdio --jail /path/to/projects

Run as SSE server

shutil-mcp --transport sse --jail /path/to/projects --port 8000

Development

See DEVELOPMENT.md for detailed development instructions.

License

MIT

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
103dResponse time
Release cycle
Releases (12mo)
Commit activity

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables secure filesystem operations with directory sandboxing and optional read-only mode. Supports file reading/writing, directory management, file searching, and text operations while restricting access to specified directories.
    12
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides secure file system operations for AI assistants including directory listing, file reading/writing, deletion, searching, and copying. Features safety controls like path validation, permission checks, and file size limits.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides secure, sandboxed file system access for AI assistants to read, write, and manage project files with controlled command execution capabilities, all confined to a designated workspace directory.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides secure file read and write operations within a sandboxed directory, allowing AI assistants to safely create, modify, and access files without risk of accessing the broader file system.

View all related MCP servers

Related MCP Connectors

  • Securely search and manage workspace context files for AI agents and teams.

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Project management MCP for AI agents with safe task reads and writes.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cwt/shutil-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server