Skip to main content

shutil-mcp

M8ven Live Monitored

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.
  • Tool Annotations & Hints: Declares readOnlyHint, destructiveHint, idempotentHint, and openWorldHint on every tool for agent safety and host warnings.
  • 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.
  • Safe Deletion & Recovery: rm always soft-deletes into .trash (never permanently deletes) and reports trash size and storage usage; restore recovers items, gc_trash collects expired items, and empty_trash purges the trash.
  • 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.

Available Tools

  • ls: List directory contents with detailed metadata.
  • cp: Copy files or directories recursively with verification and overwrite protection.
  • mv: Move/rename files or directories with safe pre-removal verification.
  • rm: Soft-delete by moving to .trash; never permanently deletes and reports trash statistics.
  • restore: Restore files or directories from trash (defaults to original path).
  • empty_trash: Permanently purge the trash folder (only after explicit user confirmation).
  • gc_trash: Garbage-collect expired trash entries based on age threshold.
  • mkdir: Create a new directory.
  • touch: Create an empty file or update file timestamps.
  • chmod: Change file/directory permissions with rollback and previous mode.
  • chown: Change file/directory ownership with rollback and previous owner.
  • stat: Get detailed file or directory metadata.
  • 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

shutil_mcp-0.5.2.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shutil_mcp-0.5.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file shutil_mcp-0.5.2.tar.gz.

File metadata

  • Download URL: shutil_mcp-0.5.2.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.7 Linux/7.1.8-200.fc44.x86_64

File hashes

Hashes for shutil_mcp-0.5.2.tar.gz
Algorithm Hash digest
SHA256 87e383a3bfa2b37556c6ac4ef41433eade5100f52b126b480165d5f592ac6198
MD5 c8f620ea3fdb4b7acfa894ce549f318d
BLAKE2b-256 1483091d6a8784b0f141be78110e740a782034d9e35f318cad06721b31192e16

See more details on using hashes here.

File details

Details for the file shutil_mcp-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: shutil_mcp-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.7 Linux/7.1.8-200.fc44.x86_64

File hashes

Hashes for shutil_mcp-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d46dd6d5536e1f5033264f1fdf4b3aad01e61c6c074e859b6aa05b3225dff720
MD5 bb7e8bdc883d93d6710214103406cb7a
BLAKE2b-256 a27bc6b66582dd595a1cea417fcdfe38bbd2541d1736837d8bc9d2fa5846ddb1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page