LogoSTMCP
Download
Filesystem MCP Server

Filesystem MCP Server

This project is a Node.js server implementing the Model Context Protocol (MCP) for secure filesystem operations.

Tools

1. read_text_file

Read complete contents of a file as text with optional head/tail line filtering, treating files as UTF-8 text regardless of extension.

2. read_media_file

Read an image or audio file and return base64 data with the corresponding MIME type by streaming the file content.

3. read_multiple_files

Read multiple files simultaneously with fault tolerance, where failed reads won't stop the entire operation.

4. write_file

Create new file or overwrite existing file with specified content at the given path location.

5. edit_file

Make selective edits using advanced pattern matching and formatting with features like whitespace normalization, indentation preservation, and git-style diff output.

6. create_directory

Create new directory or ensure it exists, creating parent directories if needed and succeeding silently if directory already exists.

7. list_directory

List directory contents with [FILE] or [DIR] prefixes to distinguish between files and directories.

8. move_file

Move or rename files and directories from source to destination, failing if destination already exists.

9. search_files

Recursively search for files and directories using pattern matching with support for exclude patterns and case-insensitive matching.

10. get_file_info

Get detailed file or directory metadata including size, creation time, modified time, access time, type, and permissions.

11. list_allowed_directories

List all directories that the server is allowed to access for read/write operations based on current access control settings.

JSON Config

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}

Useful Links

Information

Categories