Provides basic file system functionality on Linux with planned improvements for native path handling, Linux-specific system information retrieval, and file permissions support
Supports basic file operations, directory management, and system information retrieval on macOS with plans for native path handling and macOS-specific features in future updates
File System MCP Server
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.
Platform Support
The server is designed to work across different operating systems, but with varying levels of functionality:
Windows
Full feature support
Drive listing
Special folders access
Windows-specific path handling
Detailed system information
macOS/Linux
Basic file operations
Directory operations
File search and metadata
Basic system information
Note: Some Windows-specific features are not available
Future Implementation
Planned macOS Support
Native path handling for macOS
macOS-specific system information retrieval
Integration with macOS file system features
Support for macOS-specific file attributes
Implementation of macOS-specific utilities (similar to windows_utils.py)
Planned Linux Support
Native path handling for Linux
Linux-specific system information retrieval
Integration with Linux file system features
Support for Linux file permissions and attributes
Implementation of Linux-specific utilities
Cross-Platform Improvements
Unified path handling system
Platform-agnostic drive detection
Consistent system information API
Standardized file attributes across platforms
Cross-platform file system event monitoring
Universal file collection system
Timeline
Phase 1: Basic cross-platform compatibility improvements
Phase 2: Platform-specific feature implementations
Phase 3: Advanced cross-platform features
Phase 4: Performance optimizations and refinements
Features
File Operations
Copy files with backup support
Move files with backup support
Delete files with safety checks
Read file contents
Write file contents
Get file information (size, creation time, modification time)
Search files by name pattern
Create file collections for organizing related files
Directory Operations
List directory contents
Create directories
Delete directories
List directories recursively (tree-like structure)
Search directories by name pattern
System Information
Get system information (OS, CPU, memory, disk usage)
Get disk information (total space, used space, free space)
Get directory information (file count, total size)
Project Structure
Collections Storage
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:
Dependencies
Required Dependencies
FastMCP
Pydantic
pywin32 (Windows only)
WMI (Windows only)
To install dependencies:
Setup
Clone the repository:
Create and activate a virtual environment:
Install dependencies:
Usage
For detailed MCP configuration instructions across different development environments (Claude, Cursor, Windsurf), visit: MCP Configuration Guide
Integration with Claude
To integrate the File System MCP server with Claude, add the following to your claude_desktop_config.json
file:
Finding Your Python Path
To find your Python executable path, use the following command:
Windows (PowerShell):
Windows (Command Prompt/Terminal):
Linux/macOS (Terminal):
Replace /absolute/path/to/python
with the output from the appropriate command above.
Example Configuration
For Windows, your configuration might look like this:
For macOS/Linux:
After adding the configuration:
Save the
claude_desktop_config.json
fileRestart Claude
You can now use the file system tools by asking Claude to perform file operations
Available Tools
File Operations
copy_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 files
Directory Operations
list_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 pattern
System Information
get_system_info
: Get system informationget_disk_info
: Get disk usage informationget_directory_info
: Get directory statistics
Known Issues
The following features are currently experiencing issues and may not work as expected:
Delete File Function
The
delete_file
function may fail to properly delete files in some casesUsers are advised to verify file deletion manually or use alternative methods when critical
Issue is under investigation and will be fixed in a future update
List Drives Function
The
list_drives
function may not correctly detect or display all available drivesSome drives may be missing from the list or show incorrect information
This is a known limitation and will be addressed in future updates
Platform-Specific Limitations
Windows-specific features are not available on macOS/Linux
Some path handling may differ between platforms
System information retrieval varies by platform
Error Handling
The server includes comprehensive error handling for:
Invalid file paths
File/directory not found
Permission issues
Disk space limitations
Invalid operations
Platform-specific errors
Security
All file operations include path validation
Backup files are created before destructive operations
System information access is restricted to safe operations
File operations are performed with proper error handling
Contributing
Fork the repository
Create a feature branch
Commit your changes
Push to the branch
Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built with FastMCP
Uses Pydantic for data validation
Inspired by modern file system management tools
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.Last updated -912
- -securityAlicense-qualityA Model Context Protocol (MCP) server that allows AI models to safely access and interact with local file systems, enabling reading file contents, listing directories, and retrieving file metadata.Last updated -610MIT License
- AsecurityAlicenseAqualityAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.Last updated -15264MIT License
- -securityFlicense-qualityA Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.Last updated -2096