home / mcp / readonly filesystem mcp server
Node.js MCP server that exposes read-only filesystem operations for approved directories
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.
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.
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"
]
}
}
}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 concurrently. If a read fails, it won’t stop other reads.
List the contents of a directory with prefixes to distinguish files and subdirectories.
Recursively search for files or directories matching a pattern, with optional exclusions and case-insensitive matching.
Retrieve metadata for a file or directory, including size, timestamps, type, and permissions.
Return all directories the server is permitted to read or write.