filesystem mcp server
An MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.
An MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.
A Model Context Protocol (MCP) server that provides filesystem operations for Claude AI.
This MCP server provides the following filesystem operations:
path
(string)Reads complete file contents with UTF-8 encoding
read_multiple_files: Read multiple files simultaneously
paths
(string[])Failed reads Will not stop the entire operation
write_file: Create new file or overwrite existing
Inputs:
path
(string): File locationcontent
(string): File contentcreate_directory: Create new directory or ensure it exists
path
(string)Succeeds silently if directory exists
list_directory: List directory contents with [FILE] or [DIR] prefixes
Input: path
(string)
move_file: Move or rename files and directories
source
(string)destination
(string)Fails if destination exists
search_files: Recursively search for files/directories
path
(string): Starting directorypattern
(string): Search patternReturns full paths to matches
get_file_info: Get detailed file/directory metadata
path
(string)Returns:
list_allowed_directories: List all directories the server is allowed to access
The server only allows operations within directories specified via command-line arguments.
npm install
npm run build
Run the server with one or more allowed directories:
node build/index.js /path/to/allowed/dir1 /path/to/allowed/dir2
Add the server to your MCP configuration file:
{
"mcpServers": {
"filesystem-server": {
"command": "node",
"args": [
"/path/to/filesystem-server/build/index.js",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2"
],
"disabled": false,
"autoApprove": []
}
}
}
ISC