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
aioshutiland 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:
mvandcpverify destination data before unlinking or finalizing, preventing data loss on partial failures. - Reversible Mutations & Undo:
chmodandchownreturn previous modes and ownership to facilitate immediate undo/redo, with automatic rollback on failure. - Soft-Deletion & Recovery:
rmsupportstrash=Truesoft-deletion with a matchingrestoretool. - Zip-Slip Protection:
unpack_archivevalidates all archive member paths against directory traversal / zip-slip attacks. - Detailed Metadata: Tools like
lsandstatprovide comprehensive information (size, mtime, mode, owner, etc.). - HTTP Transport Support: Includes built-in support for SSE and Streamable HTTP transports.
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 (supportstrash=Truesoft-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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shutil_mcp-0.4.0.tar.gz.
File metadata
- Download URL: shutil_mcp-0.4.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.1 CPython/3.14.6 Linux/7.1.8-200.fc44.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b0dace1ad17ca9f2de2ecc162787f66ed3ff9dbe9b9988f7ad05ba8ac515190
|
|
| MD5 |
01bfa853bbc288015ba84a3aa35870d5
|
|
| BLAKE2b-256 |
a9f3b31748ede8e23e97d328445f706815bfdcb64bfd37c815c20ca89a2a2540
|
File details
Details for the file shutil_mcp-0.4.0-py3-none-any.whl.
File metadata
- Download URL: shutil_mcp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.1 CPython/3.14.6 Linux/7.1.8-200.fc44.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c91ff10c9157ca1b8b85e4919c0073416c62ea70797856344db387c4d61b770f
|
|
| MD5 |
a3b30f7198f01d89cc9a3529f49b4ba0
|
|
| BLAKE2b-256 |
6466e9ef5ea5a5cd359fab118fbb734f5d69ae73a5d8c46e478e05bae8b71270
|