
File System
Summary
The Filesystem MCP Server is a Node.js server that implements the Model Context Protocol (MCP) for performing various filesystem operations. It provides a robust API for reading, writing, and editing files, as well as managing directories. The server supports advanced file editing with features like pattern matching, whitespace normalization, and fuzzy matching, making it ideal for complex file manipulations. It also offers functionalities to move files, search directories, and retrieve file metadata. The server is restricted to operate within specified directories to ensure security. This project is useful for developers who need to automate or manage filesystem tasks programmatically within a controlled environment.
Available Actions(10)
read_file
Read complete contents of a file. Input: `path` (string). Reads complete file contents with UTF-8 encoding.
read_multiple_files
Read multiple files simultaneously. Input: `paths` (string[]). Failed reads won't stop the entire operation.
write_file
Create new file or overwrite existing. Inputs: `path` (string): File location, `content` (string): File content.
edit_file
Make selective edits using advanced pattern matching. Inputs: `path` (string), `edits` (array), `dryRun` (boolean), `options` (object).
create_directory
Create new directory or ensure it exists. Input: `path` (string). Creates parent directories if needed.
list_directory
List directory contents with [FILE] or [DIR] prefixes. Input: `path` (string).
move_file
Move or rename files and directories. Inputs: `source` (string), `destination` (string).
search_files
Recursively search for files/directories. Inputs: `path` (string), `pattern` (string), `excludePatterns` (string[]).
get_file_info
Get detailed file/directory metadata. Input: `path` (string). Returns size, creation time, modified time, access time, type, and permissions.
list_allowed_directories
List all directories the server is allowed to access. No input required.
社区评论
暂无评论. 成为第一个评论的人!
登录以参与讨论