filesystem
Python server implementing Model Context Protocol (MCP) for filesystem operations.
The Filesystem MCP Server is a Python-based server that implements the Model Context Protocol (MCP) to facilitate various filesystem operations. It allows users to perform tasks such as reading and writing files, creating, listing, and deleting directories, moving files and directories, searching for files, and retrieving file metadata. The server is designed to operate within specified directories, ensuring that all operations are contained within a defined scope. This makes it a secure and efficient tool for managing filesystem tasks programmatically.
Features
- Read/write files
- Create/list/delete directories
- Move files/directories
- Search files
- Get file metadata
Tools
read_file
Read complete contents of a file with UTF-8 encoding.
read_multiple_files
Read multiple files simultaneously without stopping on failed reads.
write_file
Create or overwrite a file with specified content.
edit_file
Make selective edits using pattern matching and formatting with dry run mode.
create_directory
Create a new directory or ensure it exists, creating parent directories if needed.
list_directory
List directory contents with [FILE] or [DIR] prefixes.
move_file
Move or rename files and directories, failing if the destination exists.
search_files
Recursively search for files/directories with case-insensitive matching.
get_file_info
Get detailed metadata of a file or directory.
list_allowed_directories
List all directories the server is allowed to access.