home / mcp / readonly filesystem mcp server

Readonly Filesystem MCP Server

Node.js MCP server that exposes read-only filesystem operations for approved directories

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can run the Readonly Filesystem MCP Server to expose read-only access to specific directories through the MCP interface. It enables reading files, listing directories, searching files, and getting file metadata within pre-approved paths, while enforcing readonly access where configured.

How to use

To use this MCP server, install or run it via your preferred MCP client workflow and point it at the directories you want to expose. The server supports operations like reading file contents, listing directories, searching for files, and retrieving file metadata. You can mount and expose multiple directories, ensuring the server only accesses locations you authorize.

How to install

Prerequisites: You need Node.js installed on your system. Make sure you have access to a command shell where you can run MCP commands.

Install and run the MCP server using the NPX method shown in the configuration example. This approach runs the server without a separate local installation step.

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

Available tools

read_file

Read complete contents of a file or a portion of it, returning UTF-8 text. You can specify start and end lines.

read_multiple_files

Read multiple files concurrently. If a read fails, it won’t stop other reads.

list_directory

List the contents of a directory with prefixes to distinguish files and subdirectories.

search_files

Recursively search for files or directories matching a pattern, with optional exclusions and case-insensitive matching.

get_file_info

Retrieve metadata for a file or directory, including size, timestamps, type, and permissions.

list_allowed_directories

Return all directories the server is permitted to read or write.