sabiz/fs-ops-server
3.2
If you are the rightful owner of fs-ops-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
FS Ops Server is a secure Model Context Protocol (MCP) server designed for file system operations.
Tools
14
Resources
0
Prompts
0
FS Ops Server
A Model Context Protocol (MCP) server that provides secure file system operations.
Features
- Read, write, and manipulate files and directories
- Search files by name pattern or content using regex
- Get file metadata
- Apply changes or diff patches to files
- Secure access control with configurable allowed directories
Security
This server restricts file system access to specified directories only. Access is controlled via:
- Command-line arguments:
--allowed-dirs /path/to/dir1,/path/to/dir2
- Environment variable:
FS_OPS_ALLOWED_DIRS=/path/to/dir1,/path/to/dir2
If both are provided, they are merged. If no restrictions are set, all directories are allowed (not recommended for production).
Installation
- Ensure you have Rust installed (https://rustup.rs/)
- Clone this repository
- Build the project:
cargo build --release
- Run tests to ensure everything is working:
cargo test
Usage
Basic Usage
./target/release/fs-ops-server
With Allowed Directories
./target/release/fs-ops-server --allowed-dirs /home/user/documents,/tmp
Or using environment variable:
FS_OPS_ALLOWED_DIRS=/home/user/documents,/tmp ./target/release/fs-ops-server
Combined
FS_OPS_ALLOWED_DIRS=/home/user/documents ./target/release/fs-ops-server --allowed-dirs /tmp
MCP Integration
This server implements the Model Context Protocol and can be used with MCP-compatible clients.
Available Tools
read_file
: Read file contentsread_file_with_lines
: Read file with line rangewrite_file
: Write content to filepatch_file
: Patch file by replacing linesapply_changes
: Apply a list of text changes to a filecopy_file
: Copy files or directoriesmove_file
: Move or rename files/directoriesdelete_file
: Delete files or directorieslist_dir
: List directory contentslist_dir_recursive
: List directory contents recursivelycreate_dir_recursive
: Create directories recursivelysearch_files
: Search files by name patterngrep_search
: Search file contents using regexget_metadata
: Get file/directory metadatareplace_in_file
: Replace text in file
License
MIT License