Filesystem MCP Server
@javillegasna
关于 Filesystem MCP Server
Simple and secure file system mcp server
基本信息
配置
工具
10Read complete contents of a file
Read multiple files simultaneously
Create new file or overwrite existing (exercise caution with this)
Make selective edits using advanced pattern matching and formatting
Create new directory or ensure it exists
List directory contents with [FILE] or [DIR] prefixes
Move or rename files and directories
Recursively search for files/directories
Get detailed file/directory metadata
List all directories the server is allowed to access
概览
What is Filesystem MCP Server?
Filesystem MCP Server is a Python server that implements the Model Context Protocol (MCP) for filesystem operations. It allows tools to read, write, and manage files and directories within explicitly allowed paths. It is designed for AI assistants and other MCP clients that need controlled file system access.
How to use Filesystem MCP Server?
The server is started as an MCP server and requires the allowed directories to be specified via command-line arguments. Once connected, an MCP client can invoke the provided tools (e.g., read_file, write_file, list_directory) to perform filesystem operations within those directories.
Key features of Filesystem MCP Server
- Read and write files with UTF-8 encoding
- Selective file editing with pattern matching and dry-run preview
- Create, list, and delete directories recursively
- Move or rename files and directories
- Recursive file search with glob-style exclusion patterns
- Get detailed file metadata (size, times, permissions)
Use cases of Filesystem MCP Server
- An AI assistant reads and edits source code files in a project directory
- Automated file management: create directories, move files, and list contents
- Search for files matching a pattern across a subdirectory tree
- Preview and apply targeted edits to configuration or documentation files
FAQ from Filesystem MCP Server
What operations can Filesystem MCP Server perform?
It can read, write, edit, move, and delete files and directories. It also supports listing directory contents, searching for files, and retrieving file metadata.
Which directories can the server access?
Only directories explicitly specified when starting the server via the args parameter. The tool list_allowed_directories shows which directories are accessible.
Can edits be previewed before applying?
Yes. The edit_file tool has a dryRun parameter (boolean). When set to true, it returns detailed diff and match information without modifying the file.
How does the file editing feature work?
It supports line-based and multi-line content matching with whitespace normalization and indentation preservation. Multiple edits can be applied simultaneously, and the tool maintains correct positioning.
What happens if I move a file to a destination that already exists?
The move_file tool fails if the destination path already exists. It will not overwrite an existing file or directory.
文件与存储 分类下的更多 MCP 服务器
Claude Document MCP Server
alejandroBallesterosCA lightweight MCP server for processing, editing, and interacting with PDF, Word, Excel, and CSV documents.
Mcp Directory
chatmcpdirectory for Awesome MCP Servers
WORK IN PROGRESS - USE WITH CAUTION - Windows:
hanwegMCP server for working with PDF files
Google Drive server
isaacphiModel Context Protocol (MCP) Server for reading from Google Drive and editing Google Sheets
Filesystem MCP Server (@sylphlab/filesystem-mcp)
sylphlab📁 Secure, efficient MCP filesystem server - token-saving batch operations with project root confinement
评论