A fast, asynchronous MCP server for efficient filesystem operations, built with the power of Rust.
2.9K
Rust MCP Filesystem is a blazingly fast, asynchronous, and lightweight MCP (Model Context Protocol) server designed for efficient handling of various filesystem operations.
This project is a pure Rust rewrite of the JavaScript-based @modelcontextprotocol/server-filesystem, offering enhanced capabilities, improved performance, and a robust feature set tailored for modern filesystem interactions.
🚀 Refer to the project documentation for installation and configuration instructions.
*.rs, src/**/*.txt, and logs/error-???.log are valid and can be used to match specific file types, recursive directory searches, or patterned filenames.| 🟢 Tools (14) | 🔴 Prompts | 🔴 Resources | 🔴 Logging | 🔴 Experimental |
|---|
| Tool Name | Description | |
|---|---|---|
| 1. |
read_file
| Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Only works within allowed directories. |
| 2. |
create_directory
| Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories. |
| 3. |
directory_tree
| Get a recursive tree view of files and directories as a JSON structure.
Each entry includes name, type (file/directory), and children for directories.
Files have no children array, while directories always have a children array (which may be empty).
The output is formatted with 2-space indentation for readability. Only works within allowed directories. |
| 4. |
edit_file
| Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories. |
| 5. |
get_file_info
| Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories. |
| 6. |
list_allowed_directories
| Returns a list of directories that the server has permission to access. Subdirectories within these allowed directories are also accessible. Use this to identify which directories and their nested paths are available before attempting to access files. |
| 7. |
list_directory
| Get a detailed listing of all files and directories in a specified path.
Results clearly distinguish between files and directories with [FILE] and [DIR]
prefixes. This tool is essential for understanding directory structure and
finding specific files within a directory. Only works within allowed directories. |
| 8. |
move_file
| Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories. |
| 9. |
read_multiple_files
| Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories. |
| 10. |
search_files
| Recursively search for files and directories matching a pattern. Searches through all subdirectories from the starting path. The search is case-insensitive and matches partial names. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories. |
| 11. |
write_file
| Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories. |
| 12. |
zip_files
| Creates a ZIP archive by compressing files. It takes a list of files to compress and a target path for the resulting ZIP file. Both the source files and the target ZIP file should reside within allowed directories. |
| 13. |
unzip_file
| Extracts the contents of a ZIP archive to a specified target directory. It takes a source ZIP file path and a target extraction directory. The tool decompresses all files and directories stored in the ZIP, recreating their structure in the target location. Both the source ZIP file and the target directory should reside within allowed directories. |
| 14. |
zip_directory
| Creates a ZIP archive by compressing a directory , including files and subdirectories matching a specified glob pattern. It takes a path to the folder and a glob pattern to identify files to compress and a target path for the resulting ZIP file. Both the source directory and the target ZIP file should reside within allowed directories. |
◾ generated by mcp-discovery
Content type
Image
Digest
sha256:cf5c1c476…
Size
7 MB
Last updated
about 1 month ago
docker pull rustmcp/filesystem