A comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.
A powerful file system management server built with FastMCP that provides a comprehensive set of tools for file and directory operations. This server allows you to perform various file system operations through a structured API, making it ideal for automation and integration with other systems.
The server is designed to work across different operating systems, but with varying levels of functionality:
file-system-mcp-server/
├── fs_server.py # Main server implementation
├── windows_utils.py # Windows-specific utilities (Windows only)
├── requirements.txt # Project dependencies
└── test_prompts_example.md # Example test prompts
Collections can be stored in any directory specified by the user. If no storage location is specified, collections will be stored in a default location within the project's data/collections
directory.
Example usage:
# Store in default location create_collection("my_collection", ["file1.txt", "file2.txt"]) # Store in custom location create_collection("my_collection", ["file1.txt", "file2.txt"], storage_path="/path/to/store")
To install dependencies:
pip install -r requirements.txt
git clone https://github.com/calebmwelsh/file-system-mcp-server.git cd file-system-mcp-server
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
For detailed MCP configuration instructions across different development environments (Claude, Cursor, Windsurf), visit: MCP Configuration Guide
To integrate the File System MCP server with Claude, add the following to your claude_desktop_config.json
file:
{ "mcpServers": { "file-system": { "command": "/absolute/path/to/python", "args": [ "/absolute/path/to/file-system-mcp-server/fs_server.py" ] } } }
To find your Python executable path, use the following command:
Windows (PowerShell):
(Get-Command python).Source
Windows (Command Prompt/Terminal):
where python
Linux/macOS (Terminal):
which python
Replace /absolute/path/to/python
with the output from the appropriate command above.
For Windows, your configuration might look like this:
{ "mcpServers": { "file-system": { "command": "C:\\Users\\YourUsername\\AppData\\Local\\Programs\\Python\\Python39\\python.exe", "args": [ "C:\\Users\\YourUsername\\Documents/file-system-mcp-server/fs_server.py" ] } } }
For macOS/Linux:
{ "mcpServers": { "file-system": { "command": "/usr/local/bin/python3", "args": [ "/Users/YourUsername/Documents/file-system-mcp-server/fs_server.py" ] } } }
After adding the configuration:
claude_desktop_config.json
filecopy_file
: Copy a file with optional backupmove_file
: Move a file with optional backupdelete_file
: Delete a file with safety checksread_file
: Read file contentswrite_file
: Write contents to a fileget_file_info
: Get detailed file informationsearch_files
: Search files by name patterncreate_collection
: Create a collection of fileslist_directory
: List directory contentscreate_directory
: Create a new directorydelete_directory
: Delete a directorylist_directory_recursively
: Show directory structure in tree formatsearch_directories
: Search directories by name patternget_system_info
: Get system informationget_disk_info
: Get disk usage informationget_directory_info
: Get directory statisticsThe following features are currently experiencing issues and may not work as expected:
Delete File Function
delete_file
function may fail to properly delete files in some casesList Drives Function
list_drives
function may not correctly detect or display all available drivesPlatform-Specific Limitations
The server includes comprehensive error handling for:
This project is licensed under the MIT License - see the LICENSE file for details.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!